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/SConsignFile.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/SConsignFile.py')
-rw-r--r-- | test/sconsign/script/SConsignFile.py | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/test/sconsign/script/SConsignFile.py b/test/sconsign/script/SConsignFile.py index dc45cc1..5e56624 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 TestSCons import TestSConsign +_python_ = TestSCons._python_ + test = TestSConsign.TestSConsign(match = TestSConsign.match_re) test.subdir('sub1', 'sub2') @@ -41,22 +42,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): @@ -71,20 +72,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) |