Skip to content

Commit 4071b75

Browse files
committed
ENH - make script more portable
1 parent e84f44b commit 4071b75

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

tools/toollib.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,10 @@ def get_nibdir():
3636
raise SystemExit('Invalid nibabel directory: %s' % nibdir)
3737
return nibdir
3838

39-
39+
# import compileall and then get dir os.path.split
4040
def compile_tree():
4141
"""Compile all Python files below current directory."""
42-
vstr = '.'.join(map(str,sys.version_info[:2]))
43-
stat = os.system('python %s/lib/python%s/compileall.py .' %
44-
(sys.prefix,vstr))
42+
stat = os.system('python -m compileall .')
4543
if stat:
4644
msg = '*** ERROR: Some Python files in tree do NOT compile! ***\n'
4745
msg += 'See messages above for the actual file that produced it.\n'

0 commit comments

Comments
 (0)