summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteven Knight <knight@baldmt.com>2003-01-15 05:41:30 (GMT)
committerSteven Knight <knight@baldmt.com>2003-01-15 05:41:30 (GMT)
commit284db25033af74d831c2e6c0f18c3e9415115705 (patch)
tree2d7f5c5c38fe6f5cfcce5fc25613150c8aefee20
parent64d27f9efc30088f70214b4585b83707c56f6c0a (diff)
downloadSCons-284db25033af74d831c2e6c0f18c3e9415115705.zip
SCons-284db25033af74d831c2e6c0f18c3e9415115705.tar.gz
SCons-284db25033af74d831c2e6c0f18c3e9415115705.tar.bz2
Necessary changes towards supporting Jython.
-rw-r--r--etc/TestCmd.py8
-rw-r--r--etc/TestSCons.py4
-rw-r--r--runtest.py20
-rw-r--r--src/engine/SCons/ActionTests.py5
-rw-r--r--src/engine/SCons/Platform/__init__.py22
-rw-r--r--src/engine/SCons/Script/__init__.py6
-rw-r--r--test/AR.py2
-rw-r--r--test/ARFLAGS.py2
-rw-r--r--test/AS.py2
-rw-r--r--test/ASFLAGS.py2
-rw-r--r--test/Alias.py2
-rw-r--r--test/CC.py2
-rw-r--r--test/CFILESUFFIX.py2
-rw-r--r--test/CPPFLAGS.py2
-rw-r--r--test/CXX.py2
-rw-r--r--test/CXXFILESUFFIX.py2
-rw-r--r--test/Command.py2
-rw-r--r--test/CommandGenerator.py6
-rw-r--r--test/DVIPDF.py2
-rw-r--r--test/DVIPDFFLAGS.py2
-rw-r--r--test/DVIPS.py2
-rw-r--r--test/DVIPSFLAGS.py2
-rw-r--r--test/Default.py2
-rw-r--r--test/Depends.py2
-rw-r--r--test/ENV.py2
-rw-r--r--test/Environment.py2
-rw-r--r--test/F77.py2
-rw-r--r--test/F77FLAGS.py2
-rw-r--r--test/Ignore.py2
-rw-r--r--test/LATEX.py2
-rw-r--r--test/LATEXFLAGS.py2
-rw-r--r--test/LEX.py2
-rw-r--r--test/LEXFLAGS.py2
-rw-r--r--test/LINK.py2
-rw-r--r--test/LINKFLAGS.py2
-rw-r--r--test/PDFLATEX.py2
-rw-r--r--test/PDFLATEXFLAGS.py2
-rw-r--r--test/PDFTEX.py2
-rw-r--r--test/PDFTEXFLAGS.py2
-rw-r--r--test/ParseConfig.py4
-rw-r--r--test/Precious.py2
-rw-r--r--test/RANLIB.py2
-rw-r--r--test/RANLIBFLAGS.py2
-rw-r--r--test/Repository/no-repository.py2
-rw-r--r--test/SHCC.py2
-rw-r--r--test/SHCXX.py2
-rw-r--r--test/SHF77.py2
-rw-r--r--test/SHF77FLAGS.py2
-rw-r--r--test/SHLINK.py2
-rw-r--r--test/SHLINKFLAGS.py2
-rw-r--r--test/Scanner.py2
-rw-r--r--test/TAR.py2
-rw-r--r--test/TARFLAGS.py2
-rw-r--r--test/TEX.py2
-rw-r--r--test/TEXFLAGS.py2
-rw-r--r--test/YACC.py2
-rw-r--r--test/YACCFLAGS.py2
-rw-r--r--test/actions.py2
-rw-r--r--test/builderrors.py2
-rw-r--r--test/errors.py2
-rw-r--r--test/multiline.py2
-rw-r--r--test/option--.py2
-rw-r--r--test/option--D.py2
-rw-r--r--test/option--Q.py2
-rw-r--r--test/option--U.py2
-rw-r--r--test/option--debug.py2
-rw-r--r--test/option--max-drift.py2
-rw-r--r--test/option-c.py2
-rw-r--r--test/option-i.py2
-rw-r--r--test/option-j.py2
-rw-r--r--test/option-k.py2
-rw-r--r--test/option-n.py2
-rw-r--r--test/option-q.py2
-rw-r--r--test/option-s.py2
-rw-r--r--test/option-u.py2
-rw-r--r--test/overrides.py2
-rw-r--r--test/scan-once.py1
-rw-r--r--test/special-filenames.py2
-rw-r--r--test/up-to-date.py2
79 files changed, 124 insertions, 92 deletions
diff --git a/etc/TestCmd.py b/etc/TestCmd.py
index bac0a93..6d6db73 100644
--- a/etc/TestCmd.py
+++ b/etc/TestCmd.py
@@ -229,6 +229,14 @@ def match_re_dotall(lines = None, res = None):
if re.compile("^" + res + "$", re.DOTALL).match(lines):
return 1
+if os.name == 'java':
+
+ python_executable = os.path.join(sys.prefix, 'jython')
+
+else:
+
+ python_executable = sys.executable
+
if sys.platform == 'win32':
def where_is(file, path=None, pathext=None):
diff --git a/etc/TestSCons.py b/etc/TestSCons.py
index 4b392d4..219046b 100644
--- a/etc/TestSCons.py
+++ b/etc/TestSCons.py
@@ -22,6 +22,8 @@ import sys
import TestCmd
+python = TestCmd.python_executable
+
class TestFailed(Exception):
def __init__(self, args=None):
self.args = args
@@ -82,7 +84,7 @@ class TestSCons(TestCmd.TestCmd):
else:
kw['program'] = 'scons.py'
if not kw.has_key('interpreter') and not os.environ.get('SCONS_EXEC'):
- kw['interpreter'] = sys.executable
+ kw['interpreter'] = python
if not kw.has_key('match'):
kw['match'] = TestCmd.match_exact
if not kw.has_key('workdir'):
diff --git a/runtest.py b/runtest.py
index ae45185..52e76d4 100644
--- a/runtest.py
+++ b/runtest.py
@@ -36,6 +36,8 @@
# is intended for use in the batch_test_command
# field in the Aegis project config file.
#
+# -P Python Use the specified Python interpreter.
+#
# -p package Test against the specified package.
#
# -q Quiet. By default, runtest.py prints the
@@ -72,10 +74,15 @@ scons = None
scons_exec = None
output = None
+if os.name == 'java':
+ python = os.path.join(sys.prefix, 'jython')
+else:
+ python = sys.executable
+
cwd = os.getcwd()
-if sys.platform == 'win32':
- lib_dir = os.path.join(sys.exec_prefix, "lib")
+if sys.platform == 'win32' or os.name == 'java':
+ lib_dir = os.path.join(sys.exec_prefix, "Lib")
else:
# The hard-coded "python" here is the directory name,
# not an executable, so it's all right.
@@ -88,6 +95,7 @@ Options:
-d, --debug Run test scripts under the Python debugger.
-h, --help Print this message and exit.
-o FILE, --output FILE Print test results to FILE (Aegis format).
+ -P Python Use the specified Python interpreter.
-p PACKAGE, --package PACKAGE
Test against the specified PACKAGE:
deb Debian
@@ -103,9 +111,9 @@ Options:
-x SCRIPT, --exec SCRIPT Test SCRIPT.
"""
-opts, args = getopt.getopt(sys.argv[1:], "adho:p:qXx:",
+opts, args = getopt.getopt(sys.argv[1:], "adho:P:p:qXx:",
['all', 'debug', 'help', 'output=',
- 'package=', 'quiet', 'exec='])
+ 'package=', 'python=', 'quiet', 'exec='])
for o, a in opts:
if o == '-a' or o == '--all':
@@ -119,6 +127,8 @@ for o, a in opts:
if not os.path.isabs(a):
a = os.path.join(cwd, a)
output = a
+ elif o == '-P' or o == '--python':
+ python = a
elif o == '-p' or o == '--package':
package = a
elif o == '-q' or o == '--quiet':
@@ -314,7 +324,7 @@ class Unbuffered:
sys.stdout = Unbuffered(sys.stdout)
for t in tests:
- cmd = string.join([sys.executable, debug, t.abspath], " ")
+ cmd = string.join([python, debug, t.abspath], " ")
if printcmd:
sys.stdout.write(cmd + "\n")
s = os.system(cmd)
diff --git a/src/engine/SCons/ActionTests.py b/src/engine/SCons/ActionTests.py
index 134f8ae..1d57029 100644
--- a/src/engine/SCons/ActionTests.py
+++ b/src/engine/SCons/ActionTests.py
@@ -96,7 +96,10 @@ class Environment:
def items(self):
return self.d.items()
-python = sys.executable
+if os.name == 'java':
+ python = os.path.join(sys.prefix, 'jython')
+else:
+ python = sys.executable
class ActionTestCase(unittest.TestCase):
diff --git a/src/engine/SCons/Platform/__init__.py b/src/engine/SCons/Platform/__init__.py
index 6401433..4987692 100644
--- a/src/engine/SCons/Platform/__init__.py
+++ b/src/engine/SCons/Platform/__init__.py
@@ -57,7 +57,10 @@ def platform_default():
files. Since we're architecture independent, though, we don't
care about the machine architecture.
"""
- if os.name == 'posix':
+ osname = os.name
+ if osname == 'java':
+ osname = os._osType
+ if osname == 'posix':
if sys.platform == 'cygwin':
return 'cygwin'
return 'posix'
@@ -75,14 +78,17 @@ def platform_module(name = platform_default()):
"""
full_name = 'SCons.Platform.' + name
if not sys.modules.has_key(full_name):
- try:
- file, path, desc = imp.find_module(name,
+ if os.name == 'java':
+ eval(full_name)
+ else:
+ try:
+ file, path, desc = imp.find_module(name,
sys.modules['SCons.Platform'].__path__)
- imp.load_module(full_name, file, path, desc)
- except ImportError:
- raise SCons.Errors.UserError, "No platform named '%s'" % name
- if file:
- file.close()
+ imp.load_module(full_name, file, path, desc)
+ except ImportError:
+ raise SCons.Errors.UserError, "No platform named '%s'" % name
+ if file:
+ file.close()
return sys.modules[full_name]
def DefaultToolList(platform, env):
diff --git a/src/engine/SCons/Script/__init__.py b/src/engine/SCons/Script/__init__.py
index 034bf73..487e45e 100644
--- a/src/engine/SCons/Script/__init__.py
+++ b/src/engine/SCons/Script/__init__.py
@@ -440,7 +440,11 @@ class OptParser(OptionParser):
def opt_debug(option, opt, value, parser):
if value == "pdb":
- args = [ sys.executable, "pdb.py" ] + \
+ if os.name == 'java':
+ python = os.path.join(sys.prefix, 'jython')
+ else:
+ python = sys.executable
+ args = [ python, "pdb.py" ] + \
filter(lambda x: x != "--debug=pdb", sys.argv)
if sys.platform == 'win32':
args[1] = os.path.join(sys.prefix, "lib", "pdb.py")
diff --git a/test/AR.py b/test/AR.py
index bd47005..f6ac5ce 100644
--- a/test/AR.py
+++ b/test/AR.py
@@ -29,7 +29,7 @@ import string
import sys
import TestSCons
-python = sys.executable
+python = TestSCons.python
if sys.platform == 'win32':
_exe = '.exe'
diff --git a/test/ARFLAGS.py b/test/ARFLAGS.py
index 5e1b365..36c5cd4 100644
--- a/test/ARFLAGS.py
+++ b/test/ARFLAGS.py
@@ -29,7 +29,7 @@ import string
import sys
import TestSCons
-python = sys.executable
+python = TestSCons.python
if sys.platform == 'win32':
_exe = '.exe'
diff --git a/test/AS.py b/test/AS.py
index b25a1b6..a45cfaf 100644
--- a/test/AS.py
+++ b/test/AS.py
@@ -29,7 +29,7 @@ import string
import sys
import TestSCons
-python = sys.executable
+python = TestSCons.python
if sys.platform == 'win32':
_exe = '.exe'
diff --git a/test/ASFLAGS.py b/test/ASFLAGS.py
index 2bfecf5..8ed6987 100644
--- a/test/ASFLAGS.py
+++ b/test/ASFLAGS.py
@@ -29,7 +29,7 @@ import string
import sys
import TestSCons
-python = sys.executable
+python = TestSCons.python
test = TestSCons.TestSCons()
diff --git a/test/Alias.py b/test/Alias.py
index 9758693..ef69670 100644
--- a/test/Alias.py
+++ b/test/Alias.py
@@ -29,7 +29,7 @@ import sys
import TestSCons
import TestCmd
-python = sys.executable
+python = TestSCons.python
test = TestSCons.TestSCons(match=TestCmd.match_re)
diff --git a/test/CC.py b/test/CC.py
index 2028f3d..4f1083a 100644
--- a/test/CC.py
+++ b/test/CC.py
@@ -29,7 +29,7 @@ import string
import sys
import TestSCons
-python = sys.executable
+python = TestSCons.python
if sys.platform == 'win32':
_exe = '.exe'
diff --git a/test/CFILESUFFIX.py b/test/CFILESUFFIX.py
index c5eb6cb..fc5363c 100644
--- a/test/CFILESUFFIX.py
+++ b/test/CFILESUFFIX.py
@@ -30,7 +30,7 @@ import string
import sys
import TestSCons
-python = sys.executable
+python = TestSCons.python
test = TestSCons.TestSCons()
diff --git a/test/CPPFLAGS.py b/test/CPPFLAGS.py
index 7b27233..9f7b9ee 100644
--- a/test/CPPFLAGS.py
+++ b/test/CPPFLAGS.py
@@ -29,7 +29,7 @@ import string
import sys
import TestSCons
-python = sys.executable
+python = TestSCons.python
if sys.platform == 'win32':
_exe = '.exe'
diff --git a/test/CXX.py b/test/CXX.py
index e3a78a0..cc089e6 100644
--- a/test/CXX.py
+++ b/test/CXX.py
@@ -29,7 +29,7 @@ import string
import sys
import TestSCons
-python = sys.executable
+python = TestSCons.python
if sys.platform == 'win32':
_exe = '.exe'
diff --git a/test/CXXFILESUFFIX.py b/test/CXXFILESUFFIX.py
index e158240..543fc1f 100644
--- a/test/CXXFILESUFFIX.py
+++ b/test/CXXFILESUFFIX.py
@@ -30,7 +30,7 @@ import string
import sys
import TestSCons
-python = sys.executable
+python = TestSCons.python
test = TestSCons.TestSCons()
diff --git a/test/Command.py b/test/Command.py
index 557b34e..772d7db 100644
--- a/test/Command.py
+++ b/test/Command.py
@@ -27,7 +27,7 @@ __revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
import sys
import TestSCons
-python = sys.executable
+python = TestSCons.python
test = TestSCons.TestSCons()
diff --git a/test/CommandGenerator.py b/test/CommandGenerator.py
index c708d15..643e5e6 100644
--- a/test/CommandGenerator.py
+++ b/test/CommandGenerator.py
@@ -28,7 +28,7 @@ import os.path
import sys
import TestSCons
-python = sys.executable
+python = TestSCons.python
test = TestSCons.TestSCons()
@@ -44,7 +44,7 @@ sys.exit(0)
test.write('SConstruct', """
def g(source, target, for_signature, env):
import sys
- python = sys.executable
+ python = r"%s"
return [[python, "build.py", "$TEMPFILE"] + source,
[python, "build.py"] + target + ["$TEMPFILE"]]
@@ -54,7 +54,7 @@ env = Environment(BUILDERS = { 'b' : b },
env.b(target = 'foo1.out', source = 'foo1.in')
env.b(target = 'foo2.out', source = 'foo2.in')
env.b(target = 'foo3.out', source = 'foo3.in')
-""")
+""" % python)
test.write('foo1.in', "foo1.in\n")
diff --git a/test/DVIPDF.py b/test/DVIPDF.py
index 26b6b94..3df22e7 100644
--- a/test/DVIPDF.py
+++ b/test/DVIPDF.py
@@ -30,7 +30,7 @@ import string
import sys
import TestSCons
-python = sys.executable
+python = TestSCons.python
test = TestSCons.TestSCons()
diff --git a/test/DVIPDFFLAGS.py b/test/DVIPDFFLAGS.py
index 1548360..fa6da6c 100644
--- a/test/DVIPDFFLAGS.py
+++ b/test/DVIPDFFLAGS.py
@@ -30,7 +30,7 @@ import string
import sys
import TestSCons
-python = sys.executable
+python = TestSCons.python
test = TestSCons.TestSCons()
diff --git a/test/DVIPS.py b/test/DVIPS.py
index 9cb6d5f..73e62a4 100644
--- a/test/DVIPS.py
+++ b/test/DVIPS.py
@@ -30,7 +30,7 @@ import string
import sys
import TestSCons
-python = sys.executable
+python = TestSCons.python
test = TestSCons.TestSCons()
diff --git a/test/DVIPSFLAGS.py b/test/DVIPSFLAGS.py
index a67a058..8587022 100644
--- a/test/DVIPSFLAGS.py
+++ b/test/DVIPSFLAGS.py
@@ -30,7 +30,7 @@ import string
import sys
import TestSCons
-python = sys.executable
+python = TestSCons.python
test = TestSCons.TestSCons()
diff --git a/test/Default.py b/test/Default.py
index 5f8aff8..32faa99 100644
--- a/test/Default.py
+++ b/test/Default.py
@@ -28,7 +28,7 @@ import os
import sys
import TestSCons
-python = sys.executable
+python = TestSCons.python
test = TestSCons.TestSCons()
diff --git a/test/Depends.py b/test/Depends.py
index cb1fae1..b32162f 100644
--- a/test/Depends.py
+++ b/test/Depends.py
@@ -27,7 +27,7 @@ __revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
import sys
import TestSCons
-python = sys.executable
+python = TestSCons.python
test = TestSCons.TestSCons()
diff --git a/test/ENV.py b/test/ENV.py
index cfaa1b9..cbe8a1d 100644
--- a/test/ENV.py
+++ b/test/ENV.py
@@ -27,7 +27,7 @@ __revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
import sys
import TestSCons
-python = sys.executable
+python = TestSCons.python
test = TestSCons.TestSCons()
diff --git a/test/Environment.py b/test/Environment.py
index 0f3ab8a..76c0c8b 100644
--- a/test/Environment.py
+++ b/test/Environment.py
@@ -27,7 +27,7 @@ __revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
import TestSCons
import sys
-python = sys.executable
+python = TestSCons.python
test = TestSCons.TestSCons()
diff --git a/test/F77.py b/test/F77.py
index 8e53fab..49cacfe 100644
--- a/test/F77.py
+++ b/test/F77.py
@@ -29,7 +29,7 @@ import string
import sys
import TestSCons
-python = sys.executable
+python = TestSCons.python
if sys.platform == 'win32':
_exe = '.exe'
diff --git a/test/F77FLAGS.py b/test/F77FLAGS.py
index 79469c4..5264bbb 100644
--- a/test/F77FLAGS.py
+++ b/test/F77FLAGS.py
@@ -29,7 +29,7 @@ import string
import sys
import TestSCons
-python = sys.executable
+python = TestSCons.python
test = TestSCons.TestSCons()
diff --git a/test/Ignore.py b/test/Ignore.py
index 0470d7e..4d3080f 100644
--- a/test/Ignore.py
+++ b/test/Ignore.py
@@ -27,7 +27,7 @@ __revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
import sys
import TestSCons
-python = sys.executable
+python = TestSCons.python
test = TestSCons.TestSCons()
diff --git a/test/LATEX.py b/test/LATEX.py
index 7aa8187..23cc713 100644
--- a/test/LATEX.py
+++ b/test/LATEX.py
@@ -30,7 +30,7 @@ import string
import sys
import TestSCons
-python = sys.executable
+python = TestSCons.python
test = TestSCons.TestSCons()
diff --git a/test/LATEXFLAGS.py b/test/LATEXFLAGS.py
index a441934..e8886a7 100644
--- a/test/LATEXFLAGS.py
+++ b/test/LATEXFLAGS.py
@@ -30,7 +30,7 @@ import string
import sys
import TestSCons
-python = sys.executable
+python = TestSCons.python
test = TestSCons.TestSCons()
diff --git a/test/LEX.py b/test/LEX.py
index 28cbdec..b43902a 100644
--- a/test/LEX.py
+++ b/test/LEX.py
@@ -30,7 +30,7 @@ import string
import sys
import TestSCons
-python = sys.executable
+python = TestSCons.python
if sys.platform == 'win32':
_exe = '.exe'
diff --git a/test/LEXFLAGS.py b/test/LEXFLAGS.py
index 169ae80..c996770 100644
--- a/test/LEXFLAGS.py
+++ b/test/LEXFLAGS.py
@@ -30,7 +30,7 @@ import string
import sys
import TestSCons
-python = sys.executable
+python = TestSCons.python
if sys.platform == 'win32':
_exe = '.exe'
diff --git a/test/LINK.py b/test/LINK.py
index 5670bc8..6191da2 100644
--- a/test/LINK.py
+++ b/test/LINK.py
@@ -29,7 +29,7 @@ import string
import sys
import TestSCons
-python = sys.executable
+python = TestSCons.python
if sys.platform == 'win32':
_exe = '.exe'
diff --git a/test/LINKFLAGS.py b/test/LINKFLAGS.py
index 1134250..29029f6 100644
--- a/test/LINKFLAGS.py
+++ b/test/LINKFLAGS.py
@@ -29,7 +29,7 @@ import string
import sys
import TestSCons
-python = sys.executable
+python = TestSCons.python
if sys.platform == 'win32':
_exe = '.exe'
diff --git a/test/PDFLATEX.py b/test/PDFLATEX.py
index b49ac89..7025bbc 100644
--- a/test/PDFLATEX.py
+++ b/test/PDFLATEX.py
@@ -30,7 +30,7 @@ import string
import sys
import TestSCons
-python = sys.executable
+python = TestSCons.python
test = TestSCons.TestSCons()
diff --git a/test/PDFLATEXFLAGS.py b/test/PDFLATEXFLAGS.py
index 67e1627..c06757d 100644
--- a/test/PDFLATEXFLAGS.py
+++ b/test/PDFLATEXFLAGS.py
@@ -30,7 +30,7 @@ import string
import sys
import TestSCons
-python = sys.executable
+python = TestSCons.python
test = TestSCons.TestSCons()
diff --git a/test/PDFTEX.py b/test/PDFTEX.py
index 47fdc9d..78e8535 100644
--- a/test/PDFTEX.py
+++ b/test/PDFTEX.py
@@ -30,7 +30,7 @@ import string
import sys
import TestSCons
-python = sys.executable
+python = TestSCons.python
test = TestSCons.TestSCons()
diff --git a/test/PDFTEXFLAGS.py b/test/PDFTEXFLAGS.py
index 34647df..28e02d4 100644
--- a/test/PDFTEXFLAGS.py
+++ b/test/PDFTEXFLAGS.py
@@ -30,7 +30,7 @@ import string
import sys
import TestSCons
-python = sys.executable
+python = TestSCons.python
test = TestSCons.TestSCons()
diff --git a/test/ParseConfig.py b/test/ParseConfig.py
index eaf7802..259a1ca 100644
--- a/test/ParseConfig.py
+++ b/test/ParseConfig.py
@@ -46,7 +46,7 @@ print env['LIBPATH']
print env['LIBS']
print env['CCFLAGS']
print static_libs
-""" % (sys.executable, test_config))
+""" % (TestSCons.python, test_config))
test.write('SConstruct2', """
env = Environment(CPPPATH = [], LIBPATH = [], LIBS = [], CCFLAGS = '')
@@ -56,7 +56,7 @@ print env['LIBPATH']
print env['LIBS']
print env['CCFLAGS']
print static_libs
-""" % (sys.executable, test_config))
+""" % (TestSCons.python, test_config))
good_stdout = test.wrap_stdout(read_str = """\
['/usr/include/fum', 'bar']
diff --git a/test/Precious.py b/test/Precious.py
index e0f8c8f..3260c82 100644
--- a/test/Precious.py
+++ b/test/Precious.py
@@ -28,7 +28,7 @@ import os
import sys
import TestSCons
-python = sys.executable
+python = TestSCons.python
test = TestSCons.TestSCons()
diff --git a/test/RANLIB.py b/test/RANLIB.py
index 04a084f..d1cee99 100644
--- a/test/RANLIB.py
+++ b/test/RANLIB.py
@@ -30,7 +30,7 @@ import string
import sys
import TestSCons
-python = sys.executable
+python = TestSCons.python
if sys.platform == 'win32':
_exe = '.exe'
diff --git a/test/RANLIBFLAGS.py b/test/RANLIBFLAGS.py
index 80aaf16..c1611dc 100644
--- a/test/RANLIBFLAGS.py
+++ b/test/RANLIBFLAGS.py
@@ -29,7 +29,7 @@ import string
import sys
import TestSCons
-python = sys.executable
+python = TestSCons.python
if sys.platform == 'win32':
_exe = '.exe'
diff --git a/test/Repository/no-repository.py b/test/Repository/no-repository.py
index 8659c00..430db26 100644
--- a/test/Repository/no-repository.py
+++ b/test/Repository/no-repository.py
@@ -29,7 +29,7 @@ import string
import sys
import TestSCons
-python = sys.executable
+python = TestSCons.python
if sys.platform == 'win32':
_exe = '.exe'
diff --git a/test/SHCC.py b/test/SHCC.py
index 1d01663..cf5d015 100644
--- a/test/SHCC.py
+++ b/test/SHCC.py
@@ -29,7 +29,7 @@ import string
import sys
import TestSCons
-python = sys.executable
+python = TestSCons.python
test = TestSCons.TestSCons()
diff --git a/test/SHCXX.py b/test/SHCXX.py
index e8fb2b3..2288953 100644
--- a/test/SHCXX.py
+++ b/test/SHCXX.py
@@ -29,7 +29,7 @@ import string
import sys
import TestSCons
-python = sys.executable
+python = TestSCons.python
test = TestSCons.TestSCons()
diff --git a/test/SHF77.py b/test/SHF77.py
index b0bde91..5df2bdf 100644
--- a/test/SHF77.py
+++ b/test/SHF77.py
@@ -29,7 +29,7 @@ import string
import sys
import TestSCons
-python = sys.executable
+python = TestSCons.python
if sys.platform == 'win32':
_obj = '.obj'
diff --git a/test/SHF77FLAGS.py b/test/SHF77FLAGS.py
index f9d729f..8713397 100644
--- a/test/SHF77FLAGS.py
+++ b/test/SHF77FLAGS.py
@@ -29,7 +29,7 @@ import string
import sys
import TestSCons
-python = sys.executable
+python = TestSCons.python
if sys.platform == 'win32':
_obj = '.obj'
diff --git a/test/SHLINK.py b/test/SHLINK.py
index 2812afd..b0d7128 100644
--- a/test/SHLINK.py
+++ b/test/SHLINK.py
@@ -29,7 +29,7 @@ import string
import sys
import TestSCons
-python = sys.executable
+python = TestSCons.python
if sys.platform == 'win32':
lib_ = ''
diff --git a/test/SHLINKFLAGS.py b/test/SHLINKFLAGS.py
index 2b4d60a..86bceb0 100644
--- a/test/SHLINKFLAGS.py
+++ b/test/SHLINKFLAGS.py
@@ -29,7 +29,7 @@ import string
import sys
import TestSCons
-python = sys.executable
+python = TestSCons.python
if sys.platform == 'win32':
lib_ = ''
diff --git a/test/Scanner.py b/test/Scanner.py
index 461f414..42c9f68 100644
--- a/test/Scanner.py
+++ b/test/Scanner.py
@@ -27,7 +27,7 @@ __revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
import sys
import TestSCons
-python = sys.executable
+python = TestSCons.python
test = TestSCons.TestSCons()
diff --git a/test/TAR.py b/test/TAR.py
index fbfacf6..d23c43a 100644
--- a/test/TAR.py
+++ b/test/TAR.py
@@ -30,7 +30,7 @@ import string
import sys
import TestSCons
-python = sys.executable
+python = TestSCons.python
test = TestSCons.TestSCons()
diff --git a/test/TARFLAGS.py b/test/TARFLAGS.py
index 583e274..4c275d5 100644
--- a/test/TARFLAGS.py
+++ b/test/TARFLAGS.py
@@ -30,7 +30,7 @@ import string
import sys
import TestSCons
-python = sys.executable
+python = TestSCons.python
test = TestSCons.TestSCons()
diff --git a/test/TEX.py b/test/TEX.py
index a5f981e..71ff753 100644
--- a/test/TEX.py
+++ b/test/TEX.py
@@ -30,7 +30,7 @@ import string
import sys
import TestSCons
-python = sys.executable
+python = TestSCons.python
test = TestSCons.TestSCons()
diff --git a/test/TEXFLAGS.py b/test/TEXFLAGS.py
index 075750c..bade83a 100644
--- a/test/TEXFLAGS.py
+++ b/test/TEXFLAGS.py
@@ -30,7 +30,7 @@ import string
import sys
import TestSCons
-python = sys.executable
+python = TestSCons.python
test = TestSCons.TestSCons()
diff --git a/test/YACC.py b/test/YACC.py
index 1df8cc5..40c97ab 100644
--- a/test/YACC.py
+++ b/test/YACC.py
@@ -30,7 +30,7 @@ import string
import sys
import TestSCons
-python = sys.executable
+python = TestSCons.python
if sys.platform == 'win32':
_exe = '.exe'
diff --git a/test/YACCFLAGS.py b/test/YACCFLAGS.py
index ba38209..4de649a 100644
--- a/test/YACCFLAGS.py
+++ b/test/YACCFLAGS.py
@@ -30,7 +30,7 @@ import string
import sys
import TestSCons
-python = sys.executable
+python = TestSCons.python
if sys.platform == 'win32':
_exe = '.exe'
diff --git a/test/actions.py b/test/actions.py
index 84b123e..4c3e22f 100644
--- a/test/actions.py
+++ b/test/actions.py
@@ -27,7 +27,7 @@ __revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
import sys
import TestSCons
-python = sys.executable
+python = TestSCons.python
test = TestSCons.TestSCons()
diff --git a/test/builderrors.py b/test/builderrors.py
index 286b115..6b0239c 100644
--- a/test/builderrors.py
+++ b/test/builderrors.py
@@ -28,7 +28,7 @@ import os
import sys
import TestSCons
-python = sys.executable
+python = TestSCons.python
test = TestSCons.TestSCons()
diff --git a/test/errors.py b/test/errors.py
index a79ed6e..924c072 100644
--- a/test/errors.py
+++ b/test/errors.py
@@ -29,7 +29,7 @@ import TestSCons
import string
import sys
-python = sys.executable
+python = TestSCons.python
test = TestSCons.TestSCons(match = TestCmd.match_re_dotall)
diff --git a/test/multiline.py b/test/multiline.py
index ba13516..df0913c 100644
--- a/test/multiline.py
+++ b/test/multiline.py
@@ -28,7 +28,7 @@ import os.path
import sys
import TestSCons
-python = sys.executable
+python = TestSCons.python
test = TestSCons.TestSCons()
diff --git a/test/option--.py b/test/option--.py
index 039ce3a..00fefaa 100644
--- a/test/option--.py
+++ b/test/option--.py
@@ -29,7 +29,7 @@ import string
import sys
import TestSCons
-python = sys.executable
+python = TestSCons.python
test = TestSCons.TestSCons()
diff --git a/test/option--D.py b/test/option--D.py
index 67517cd..e391215 100644
--- a/test/option--D.py
+++ b/test/option--D.py
@@ -28,7 +28,7 @@ import sys
import TestSCons
import os
-python = sys.executable
+python = TestSCons.python
test = TestSCons.TestSCons()
diff --git a/test/option--Q.py b/test/option--Q.py
index b89b042..3030308 100644
--- a/test/option--Q.py
+++ b/test/option--Q.py
@@ -29,7 +29,7 @@ import string
import sys
import TestSCons
-python = sys.executable
+python = TestSCons.python
test = TestSCons.TestSCons()
diff --git a/test/option--U.py b/test/option--U.py
index d700267..f6546ed 100644
--- a/test/option--U.py
+++ b/test/option--U.py
@@ -32,7 +32,7 @@ import TestSCons
test = TestSCons.TestSCons()
-python = sys.executable
+python = TestSCons.python
test.subdir('sub1', 'sub2', 'sub3')
diff --git a/test/option--debug.py b/test/option--debug.py
index e85ca5c..4be24bb 100644
--- a/test/option--debug.py
+++ b/test/option--debug.py
@@ -163,7 +163,7 @@ def num(match, line):
return float(re.match(match, line).group(1))
start_time = time.time()
-test.run(program=sys.executable, arguments='-c pass')
+test.run(program=TestSCons.python, arguments='-c pass')
overhead = time.time() - start_time
start_time = time.time()
diff --git a/test/option--max-drift.py b/test/option--max-drift.py
index fb289eb..7e7384d 100644
--- a/test/option--max-drift.py
+++ b/test/option--max-drift.py
@@ -32,7 +32,7 @@ import string
import sys
import TestSCons
-python = sys.executable
+python = TestSCons.python
test = TestSCons.TestSCons()
diff --git a/test/option-c.py b/test/option-c.py
index 22523bd..f406574 100644
--- a/test/option-c.py
+++ b/test/option-c.py
@@ -28,7 +28,7 @@ import os.path
import sys
import TestSCons
-python = sys.executable
+python = TestSCons.python
test = TestSCons.TestSCons()
diff --git a/test/option-i.py b/test/option-i.py
index 2e905e1..c7bd610 100644
--- a/test/option-i.py
+++ b/test/option-i.py
@@ -28,7 +28,7 @@ import os.path
import sys
import TestSCons
-python = sys.executable
+python = TestSCons.python
test = TestSCons.TestSCons()
diff --git a/test/option-j.py b/test/option-j.py
index b6e8396..edd95ab 100644
--- a/test/option-j.py
+++ b/test/option-j.py
@@ -33,7 +33,7 @@ import string
import sys
import TestSCons
-python = sys.executable
+python = TestSCons.python
try:
import threading
diff --git a/test/option-k.py b/test/option-k.py
index 3899f8e..e80b446 100644
--- a/test/option-k.py
+++ b/test/option-k.py
@@ -28,7 +28,7 @@ import os.path
import sys
import TestSCons
-python = sys.executable
+python = TestSCons.python
test = TestSCons.TestSCons()
diff --git a/test/option-n.py b/test/option-n.py
index 274c49b..8ecd3a7 100644
--- a/test/option-n.py
+++ b/test/option-n.py
@@ -41,7 +41,7 @@ import string
import sys
import TestSCons
-python = sys.executable
+python = TestSCons.python
test = TestSCons.TestSCons()
diff --git a/test/option-q.py b/test/option-q.py
index c6f2131..4650c84 100644
--- a/test/option-q.py
+++ b/test/option-q.py
@@ -32,7 +32,7 @@ import TestSCons
test = TestSCons.TestSCons()
-python = sys.executable
+python = TestSCons.python
test.write('build.py', r"""
import sys
diff --git a/test/option-s.py b/test/option-s.py
index 450e994..63682d2 100644
--- a/test/option-s.py
+++ b/test/option-s.py
@@ -29,7 +29,7 @@ import string
import sys
import TestSCons
-python = sys.executable
+python = TestSCons.python
test = TestSCons.TestSCons()
diff --git a/test/option-u.py b/test/option-u.py
index 5e00ea8..c9044c2 100644
--- a/test/option-u.py
+++ b/test/option-u.py
@@ -31,7 +31,7 @@ import TestSCons
test = TestSCons.TestSCons()
-python = sys.executable
+python = TestSCons.python
test.subdir('sub1', 'sub2', 'sub3')
diff --git a/test/overrides.py b/test/overrides.py
index f535c97..46953d7 100644
--- a/test/overrides.py
+++ b/test/overrides.py
@@ -31,7 +31,7 @@ import sys
test = TestSCons.TestSCons()
-python = sys.executable
+python = TestSCons.python
test.write('SConstruct', """
env = Environment(LIBS=['a'])
diff --git a/test/scan-once.py b/test/scan-once.py
index c60e4d3..8b2f90f 100644
--- a/test/scan-once.py
+++ b/test/scan-once.py
@@ -43,7 +43,6 @@ import sys
import TestCmd
import TestSCons
-#test = TestSCons.TestSCons(match = TestCmd.match_re)
test = TestSCons.TestSCons()
test.subdir('simple',
diff --git a/test/special-filenames.py b/test/special-filenames.py
index 3f05fe3..515803e 100644
--- a/test/special-filenames.py
+++ b/test/special-filenames.py
@@ -68,7 +68,7 @@ test.write("SConstruct", """
env=Environment(BUILDERS = {'Build' : Builder(action = '%s cat.py $TARGET $SOURCE')})
%s
-""" % (sys.executable, string.join(map(buildFileStr, file_names), '\n')))
+""" % (TestSCons.python, string.join(map(buildFileStr, file_names), '\n')))
test.run(arguments='.')
diff --git a/test/up-to-date.py b/test/up-to-date.py
index ab5e607..b2f8d73 100644
--- a/test/up-to-date.py
+++ b/test/up-to-date.py
@@ -29,7 +29,7 @@ import string
import sys
import TestSCons
-python = sys.executable
+python = TestSCons.python
test = TestSCons.TestSCons()