diff options
author | Greg Noel <GregNoel@tigris.org> | 2010-03-25 04:14:28 (GMT) |
---|---|---|
committer | Greg Noel <GregNoel@tigris.org> | 2010-03-25 04:14:28 (GMT) |
commit | 22d352500f1cd6bd0c53d788a5dc44a1fefa676e (patch) | |
tree | 0984fd581082c27cfbfbb7f94d5751b0e6fd2741 /test/Actions | |
parent | 75ac32ac8e32076e25b72a19eb56340cc585fa4e (diff) | |
download | SCons-22d352500f1cd6bd0c53d788a5dc44a1fefa676e.zip SCons-22d352500f1cd6bd0c53d788a5dc44a1fefa676e.tar.gz SCons-22d352500f1cd6bd0c53d788a5dc44a1fefa676e.tar.bz2 |
Move 2.0 changes collected in branches/pending back to trunk for further
development. Note that this set of changes is NOT backward-compatible;
the trunk no longer works with Python 1.5.2, 2.0, or 2.1.
Diffstat (limited to 'test/Actions')
-rw-r--r-- | test/Actions/actions.py | 12 | ||||
-rw-r--r-- | test/Actions/addpost-link.py | 3 | ||||
-rw-r--r-- | test/Actions/function.py | 2 |
3 files changed, 7 insertions, 10 deletions
diff --git a/test/Actions/actions.py b/test/Actions/actions.py index aae2bb9..1837ee7 100644 --- a/test/Actions/actions.py +++ b/test/Actions/actions.py @@ -67,10 +67,9 @@ test.up_to_date(arguments = '.') test.write('SConstruct', """ import os -import string def func(env, target, source): - cmd = r'%(_python_)s build.py %%s 3 %%s' %% (string.join(map(str, target)), - string.join(map(str, source))) + cmd = r'%(_python_)s build.py %%s 3 %%s' %% (' '.join(map(str, target)), + ' '.join(map(str, source))) print cmd return os.system(cmd) B = Builder(action = func) @@ -86,8 +85,7 @@ test.up_to_date(arguments = '.') test.write('SConstruct', """ import os -assert not globals().has_key('string') -import string +assert 'string' not in globals() class bld: def __init__(self): self.cmd = r'%(_python_)s build.py %%s 4 %%s' @@ -96,8 +94,8 @@ class bld: print cmd return os.system(cmd) def get_contents(self, env, target, source): - return self.cmd %% (string.join(map(str, target)), - string.join(map(str, source))) + return self.cmd %% (' '.join(map(str, target)), + ' '.join(map(str, source))) B = Builder(action = bld()) env = Environment(BUILDERS = { 'B' : B }) env.B(target = 'foo.out', source = 'foo.in') diff --git a/test/Actions/addpost-link.py b/test/Actions/addpost-link.py index 9c79662..a148051 100644 --- a/test/Actions/addpost-link.py +++ b/test/Actions/addpost-link.py @@ -39,9 +39,8 @@ _python_ = TestSCons._python_ test = TestSCons.TestSCons() test.write('strip.py', """\ -import string import sys -print "strip.py: %s" % string.join(sys.argv[1:]) +print "strip.py: %s" % " ".join(sys.argv[1:]) """) test.write('SConstruct', """\ diff --git a/test/Actions/function.py b/test/Actions/function.py index 6d18e5c..2039197 100644 --- a/test/Actions/function.py +++ b/test/Actions/function.py @@ -136,7 +136,7 @@ genHeaderBld = SCons.Builder.Builder( env = Environment() env.Append(BUILDERS = {'GenHeader' : genHeaderBld}) -envdeps = map(str, range(int(optEnv['NbDeps']))) +envdeps = list(map(str, range(int(optEnv['NbDeps'])))) env.GenHeader('Out', None, ENVDEPS=envdeps) """) |