diff options
author | William Deegan <bill@baddogconsulting.com> | 2018-11-13 18:58:06 (GMT) |
---|---|---|
committer | William Deegan <bill@baddogconsulting.com> | 2018-11-13 18:58:06 (GMT) |
commit | c2aba592affffdb12d2f95e251ccfc566b6dd674 (patch) | |
tree | 3f1719afc1ec7408135659f154f4b4072f8b44af /test/sconsign/script/Signatures.py | |
parent | ade84bc59db524fbccd670bfadefa786407c7c0b (diff) | |
parent | 648cf42a89845ccad012e02609ca8958e62ce272 (diff) | |
download | SCons-c2aba592affffdb12d2f95e251ccfc566b6dd674.zip SCons-c2aba592affffdb12d2f95e251ccfc566b6dd674.tar.gz SCons-c2aba592affffdb12d2f95e251ccfc566b6dd674.tar.bz2 |
Merge remote-tracking branch 'upstream/master' into subst_rewrite
Diffstat (limited to 'test/sconsign/script/Signatures.py')
-rw-r--r-- | test/sconsign/script/Signatures.py | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/test/sconsign/script/Signatures.py b/test/sconsign/script/Signatures.py index 5babe67..7797bce 100644 --- a/test/sconsign/script/Signatures.py +++ b/test/sconsign/script/Signatures.py @@ -36,6 +36,8 @@ SourceSignatures('timestamp') with TargetSignatures('content'). import TestSCons import TestSConsign +_python_ = TestSCons._python_ + test = TestSConsign.TestSConsign(match = TestSConsign.match_re) # Note: We don't use os.path.join() representations of the file names @@ -60,22 +62,22 @@ 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 +test.write(fake_cc_py, r"""#!%(_python_)s import os import re import sys path = sys.argv[1].split() -output = open(sys.argv[2], 'wb') -input = open(sys.argv[3], 'rb') +output = open(sys.argv[2], 'w') +input = open(sys.argv[3], 'r') -output.write('fake_cc.py: %s\n' % sys.argv) +output.write('fake_cc.py: %%s\n' %% sys.argv) def find_file(f): for dir in path: p = dir + os.sep + f if os.path.exists(p): - return open(p, 'rb') + return open(p, 'r') return None def process(infp, outfp): @@ -90,20 +92,20 @@ def process(infp, outfp): process(input, output) sys.exit(0) -""") +""" % locals()) -test.write(fake_link_py, r"""#!/usr/bin/env python +test.write(fake_link_py, r"""#!%(_python_)s import sys -output = open(sys.argv[1], 'wb') -input = open(sys.argv[2], 'rb') +output = open(sys.argv[1], 'w') +input = open(sys.argv[2], 'r') -output.write('fake_link.py: %s\n' % sys.argv) +output.write('fake_link.py: %%s\n' %% sys.argv) output.write(input.read()) sys.exit(0) -""") +""" % locals()) test.chmod(fake_cc_py, 0o755) test.chmod(fake_link_py, 0o755) |