summaryrefslogtreecommitdiffstats
path: root/test/sconsign/script/SConsignFile.py
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/sconsign/script/SConsignFile.py
parentacd60358a5f20a6d82dab42c00ad16a5e07e6428 (diff)
downloadSCons-76ff51ee816e39f98ee26393ac530e9d44a8c9bd.zip
SCons-76ff51ee816e39f98ee26393ac530e9d44a8c9bd.tar.gz
SCons-76ff51ee816e39f98ee26393ac530e9d44a8c9bd.tar.bz2
use absolute python path in sheabangs
Diffstat (limited to 'test/sconsign/script/SConsignFile.py')
-rw-r--r--test/sconsign/script/SConsignFile.py11
1 files changed, 6 insertions, 5 deletions
diff --git a/test/sconsign/script/SConsignFile.py b/test/sconsign/script/SConsignFile.py
index 4adf43d..e9eba66 100644
--- a/test/sconsign/script/SConsignFile.py
+++ b/test/sconsign/script/SConsignFile.py
@@ -30,10 +30,11 @@ using the signatures in an SConsignFile().
"""
import re
-import sys
import TestSCons
import TestSConsign
+_python_ = TestSCons._python_
+
test = TestSConsign.TestSConsign(match = TestSConsign.match_re)
test.subdir('sub1', 'sub2')
@@ -41,7 +42,7 @@ test.subdir('sub1', 'sub2')
fake_cc_py = test.workpath('fake_cc.py')
fake_link_py = test.workpath('fake_link.py')
-test.write(fake_cc_py, r"""#!/usr/bin/env python%s
+test.write(fake_cc_py, r"""#!%(_python_)s
import os
import re
import sys
@@ -71,9 +72,9 @@ def process(infp, outfp):
process(input, output)
sys.exit(0)
-""" % sys.version_info[0])
+""" % locals())
-test.write(fake_link_py, r"""#!/usr/bin/env python%s
+test.write(fake_link_py, r"""#!%(_python_)s
import sys
output = open(sys.argv[1], 'wb')
@@ -84,7 +85,7 @@ output.write('fake_link.py: %%s\n' %% sys.argv)
output.write(input.read())
sys.exit(0)
-""" % sys.version_info[0])
+""" % locals())
test.chmod(fake_cc_py, 0o755)
test.chmod(fake_link_py, 0o755)