diff options
author | Paweł Tomulik <ptomulik@meil.pw.edu.pl> | 2018-10-22 19:26:30 (GMT) |
---|---|---|
committer | Paweł Tomulik <ptomulik@meil.pw.edu.pl> | 2018-10-22 19:26:30 (GMT) |
commit | 76ff51ee816e39f98ee26393ac530e9d44a8c9bd (patch) | |
tree | 63dcacc37a07a9d6ef37cb47370ec1a50034a639 /test/sconsign | |
parent | acd60358a5f20a6d82dab42c00ad16a5e07e6428 (diff) | |
download | SCons-76ff51ee816e39f98ee26393ac530e9d44a8c9bd.zip SCons-76ff51ee816e39f98ee26393ac530e9d44a8c9bd.tar.gz SCons-76ff51ee816e39f98ee26393ac530e9d44a8c9bd.tar.bz2 |
use absolute python path in sheabangs
Diffstat (limited to 'test/sconsign')
-rw-r--r-- | test/sconsign/script/SConsignFile.py | 11 | ||||
-rw-r--r-- | test/sconsign/script/Signatures.py | 11 | ||||
-rw-r--r-- | test/sconsign/script/no-SConsignFile.py | 11 |
3 files changed, 18 insertions, 15 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) diff --git a/test/sconsign/script/Signatures.py b/test/sconsign/script/Signatures.py index 9504ce4..0c6dfb5 100644 --- a/test/sconsign/script/Signatures.py +++ b/test/sconsign/script/Signatures.py @@ -35,7 +35,8 @@ SourceSignatures('timestamp') with TargetSignatures('content'). import TestSCons import TestSConsign -import sys + +_python_ = TestSCons._python_ test = TestSConsign.TestSConsign(match = TestSConsign.match_re) @@ -61,7 +62,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 @@ -91,9 +92,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') @@ -104,7 +105,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) diff --git a/test/sconsign/script/no-SConsignFile.py b/test/sconsign/script/no-SConsignFile.py index 3973fc3..6c892e1 100644 --- a/test/sconsign/script/no-SConsignFile.py +++ b/test/sconsign/script/no-SConsignFile.py @@ -31,7 +31,8 @@ Verify that the sconsign script works when using an individual import TestSCons import TestSConsign -import sys + +_python_ = TestSCons._python_ test = TestSConsign.TestSConsign(match = TestSConsign.match_re) @@ -50,7 +51,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 @@ -80,9 +81,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') @@ -93,7 +94,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) |