File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change 16
16
from pathlib import Path
17
17
from tempfile import TemporaryDirectory
18
18
import shutil
19
+ import sys
19
20
from packaging .version import Version
20
21
import nipype
21
22
import subprocess as sp
54
55
55
56
sp .run (
56
57
[
57
- "python" ,
58
+ sys . executable ,
58
59
ex2rst ,
59
60
"--outdir" ,
60
61
str (example_dir ),
70
71
)
71
72
sp .run (
72
73
[
73
- "python" ,
74
+ sys . executable ,
74
75
ex2rst ,
75
76
"--outdir" ,
76
77
str (example_dir ),
Original file line number Diff line number Diff line change @@ -31,7 +31,7 @@ def sh(cmd):
31
31
def compile_tree ():
32
32
"""Compile all Python files below current directory."""
33
33
vstr = "." .join (map (str , sys .version_info [:2 ]))
34
- stat = os .system ("python %s/lib/python%s/compileall.py ." % (sys .prefix , vstr ))
34
+ stat = os .system ("%s %s/lib/python%s/compileall.py ." % (sys . executable , sys .prefix , vstr ))
35
35
if stat :
36
36
msg = "*** ERROR: Some Python files in tree do NOT compile! ***\n "
37
37
msg += "See messages above for the actual file that produced it.\n "
You can’t perform that action at this time.
0 commit comments