# And, lastly, install the appropriate packages in the
# appropriate subdirectory.
#
- env.Install(os.path.join('build', 'dist'), install_targets)
+ b_d_files = env.Install(os.path.join('build', 'dist'), install_targets)
+ Local(b_d_files)
#
#
src_tar_gz = os.path.join('build', 'dist', '%s.tar.gz' % psv)
src_zip = os.path.join('build', 'dist', '%s.zip' % psv)
+ Local(src_tar_gz, src_zip)
+
for file in sfiles:
env.SCons_revision(os.path.join(b_ps, file), file)
sys.stdout.write("\nFailed the following test:\n")
else:
sys.stdout.write("\nFailed the following %d tests:\n" % len(fail))
- paths = map(lambda x: x.path, no_result)
+ paths = map(lambda x: x.path, fail)
sys.stdout.write("\t" + string.join(paths, "\n\t") + "\n")
if no_result:
if len(no_result) == 1:
return 127
else:
try:
- args = [cmd_interp, '/C', quote(string.join(args)) ]
+ args = [cmd_interp, '/C', escape_cmd(string.join(args)) ]
ret = os.spawnve(os.P_WAIT, cmd_interp, args, env)
except OSError, e:
ret = exitvalmap[e[0]]
if ' ' in arg or '\t' in arg:
return '"%s"' % arg
else:
- return arg
+ return str(arg)
# Several functions below deal with Environment variable
# substitution. Part of this process involves inserting
in the string before passing it to the command interpreter."""
self.data = cmd
- # Populate flatdata (the ting returned by str()) with the
+ # Populate flatdata (the thing returned by str()) with the
# non-escaped string
self.escape(lambda x: x, lambda x: x)
"""Return the string in its current state."""
return self.flatdata
+ def __len__(self):
+ """Return the length of the string in its current state."""
+ return len(self.flatdata)
+
+ def __getitem__(self, index):
+ """Return the index'th element of the string in its current state."""
+ return self.flatdata[index]
+
def escape(self, escape_func, quote_func=quote_spaces):
"""Escape the string with the supplied function. The
function is expected to take an arbitrary string, then
""")
test.write('SConstruct', """
-env = Environment()
-static_libs = ParseConfig(env, ["%s", "%s", "--libs --cflags"])
+env = Environment(CPPPATH = [], LIBPATH = [], LIBS = [], CCFLAGS = '')
+static_libs = ParseConfig(env, [r"%s", r"%s", "--libs --cflags"])
print env['CPPPATH']
print env['LIBPATH']
print env['LIBS']
""" % (sys.executable, test_config))
test.write('SConstruct2', """
-env = Environment()
-static_libs = ParseConfig(env, "%s %s --libs --cflags")
+env = Environment(CPPPATH = [], LIBPATH = [], LIBS = [], CCFLAGS = '')
+static_libs = ParseConfig(env, r"%s %s --libs --cflags")
print env['CPPPATH']
print env['LIBPATH']
print env['LIBS']
test.write("cat.py", """\
import sys
-open(sys.argv[1], 'w').write(open(sys.argv[2], 'r').read())
+open(sys.argv[1], 'wb').write(open(sys.argv[2], 'rb').read())
""")
for fn in file_names: