Merged revisions 2121-2135 via svnmerge from
[scons.git] / test / SWIG / live.py
index 93336ca162398ac6ede23d2be7636d381b5e8143..d319af786938a98f197d0005e956639341c465b4 100644 (file)
@@ -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'])