summaryrefslogtreecommitdiffstats
path: root/test/SWIG/live.py
diff options
context:
space:
mode:
authorSteven Knight <knight@baldmt.com>2007-07-14 15:30:04 (GMT)
committerSteven Knight <knight@baldmt.com>2007-07-14 15:30:04 (GMT)
commitc1c5babea02556d1dbf3280d7644aa3323f1b876 (patch)
tree0637b8519aaebc4e457f58553899ead8dedb1252 /test/SWIG/live.py
parent0bef9160a93a51ab9671c0a19d144ca027355e24 (diff)
downloadSCons-c1c5babea02556d1dbf3280d7644aa3323f1b876.zip
SCons-c1c5babea02556d1dbf3280d7644aa3323f1b876.tar.gz
SCons-c1c5babea02556d1dbf3280d7644aa3323f1b876.tar.bz2
Merged revisions 2121-2135 via svnmerge from
http://scons.tigris.org/svn/scons/branches/core ........ r2128 | stevenknight | 2007-07-13 06:27:11 -0500 (Fri, 13 Jul 2007) | 2 lines Use the "swig -classic" option on pre-2.0 Python versions. ........ r2130 | stevenknight | 2007-07-13 09:42:45 -0500 (Fri, 13 Jul 2007) | 2 lines Remove left-over cut-and-paste stuff about loadable modules and frameworks. ........ r2131 | stevenknight | 2007-07-13 12:08:37 -0500 (Fri, 13 Jul 2007) | 4 lines Refactor the structure of the tests to make the java input strings separate from the parse_java() calls. (Prep for enhancing the parser for Java 1.5 anonymous class files.) ........ r2132 | stevenknight | 2007-07-13 12:24:09 -0500 (Fri, 13 Jul 2007) | 3 lines Copy the Java 1.4 nested-anonymous-class test case from test/Java/live.py. Remove a commented-out unit test already added elsewhere. ........ r2133 | stevenknight | 2007-07-13 16:16:51 -0500 (Fri, 13 Jul 2007) | 4 lines Support the changed naming of .class files for nested anonymous inner classes in Java 1.5 by adding a new $JAVAVERSION variable that can be set to reflect the javac version being used. ........ r2134 | stevenknight | 2007-07-13 20:28:34 -0500 (Fri, 13 Jul 2007) | 5 lines Add a $SWIGOUTDIR variable. Add it, when set, to the command line as an argument to -outdir. Have the emitter use it to figure out where the generated .java files will be (something we didn't do at all before, -outdir aside). ........ r2135 | stevenknight | 2007-07-13 23:51:21 -0500 (Fri, 13 Jul 2007) | 2 lines Minor unit test fixes for old Python versions (1.6 and 2.0). ........
Diffstat (limited to 'test/SWIG/live.py')
-rw-r--r--test/SWIG/live.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/SWIG/live.py b/test/SWIG/live.py
index 93336ca..d319af7 100644
--- a/test/SWIG/live.py
+++ b/test/SWIG/live.py
@@ -99,6 +99,11 @@ foo = Environment(SWIGFLAGS='-python',
FRAMEWORKSFLAGS='%(frameworks)s',
)
+import sys
+if sys.version[0] == '1':
+ # SWIG requires the -classic flag on pre-2.0 Python versions.
+ foo.Append(SWIGFLAGS = ' -classic')
+
swig = foo.Dictionary('SWIG')
bar = foo.Clone(SWIG = r'%(_python_)s wrapper.py ' + swig)
foo.LoadableModule(target = 'foo', source = ['foo.c', 'foo.i'])