summaryrefslogtreecommitdiffstats
path: root/test/scons-time
diff options
context:
space:
mode:
authorPaweł Tomulik <ptomulik@meil.pw.edu.pl>2018-10-22 19:26:30 (GMT)
committerPaweł Tomulik <ptomulik@meil.pw.edu.pl>2018-10-22 19:26:30 (GMT)
commit76ff51ee816e39f98ee26393ac530e9d44a8c9bd (patch)
tree63dcacc37a07a9d6ef37cb47370ec1a50034a639 /test/scons-time
parentacd60358a5f20a6d82dab42c00ad16a5e07e6428 (diff)
downloadSCons-76ff51ee816e39f98ee26393ac530e9d44a8c9bd.zip
SCons-76ff51ee816e39f98ee26393ac530e9d44a8c9bd.tar.gz
SCons-76ff51ee816e39f98ee26393ac530e9d44a8c9bd.tar.bz2
use absolute python path in sheabangs
Diffstat (limited to 'test/scons-time')
-rw-r--r--test/scons-time/run/config/python.py7
-rw-r--r--test/scons-time/run/option/python.py7
2 files changed, 8 insertions, 6 deletions
diff --git a/test/scons-time/run/config/python.py b/test/scons-time/run/config/python.py
index 92d1600..c8842c1 100644
--- a/test/scons-time/run/config/python.py
+++ b/test/scons-time/run/config/python.py
@@ -29,10 +29,11 @@ Verify specifying an alternate Python executable in a config file.
"""
import os
-import sys
import TestSCons_time
+_python_ = TestSCons_time._python_
+
test = TestSCons_time.TestSCons_time()
test.write_sample_project('foo.tar.gz')
@@ -44,7 +45,7 @@ python = r'%(my_python_py)s'
""" % locals())
test.write(my_python_py, """\
-#!/usr/bin/env python%s
+#!%(_python_)s
from __future__ import print_function
import sys
profile = ''
@@ -53,7 +54,7 @@ for arg in sys.argv[1:]:
profile = arg[10:]
break
print('my_python.py: %%s' %% profile)
-""" % sys.version_info[0])
+""" % locals())
os.chmod(my_python_py, 0o755)
diff --git a/test/scons-time/run/option/python.py b/test/scons-time/run/option/python.py
index e508e11..27ca072 100644
--- a/test/scons-time/run/option/python.py
+++ b/test/scons-time/run/option/python.py
@@ -29,10 +29,11 @@ Verify the run --python option to specify an alternatie Python executable.
"""
import os
-import sys
import TestSCons_time
+_python_ = TestSCons_time._python_
+
test = TestSCons_time.TestSCons_time()
test.write_sample_project('foo.tar.gz')
@@ -40,7 +41,7 @@ test.write_sample_project('foo.tar.gz')
my_python_py = test.workpath('my_python.py')
test.write(my_python_py, """\
-#!/usr/bin/env python%s
+#!%(_python_)s
import sys
profile = ''
for arg in sys.argv[1:]:
@@ -48,7 +49,7 @@ for arg in sys.argv[1:]:
profile = arg[10:]
break
sys.stdout.write('my_python.py: %%s\\n' %% profile)
-""" % sys.version_info[0])
+""" % locals())
os.chmod(my_python_py, 0o755)