- Split the non-SCons-specific functionality from SConf.py to a new,
re-usable Conftest.py module.
+ From Christoph Wiedemann:
+
+ - Fix test/SWIG.py to find the Python include directory in all cases.
+
RELEASE 0.92 - Wed, 20 Aug 2003 03:45:28 -0500
if swig:
- version = string.join(string.split(sys.version, '.')[:2], '.')
+ version = sys.version[:3] # see also sys.prefix documentation
test.write("wrapper.py",
"""import os
test.write('SConstruct', """
foo = Environment(SWIGFLAGS='-python',
- CPPPATH='/usr/include/python%s/',
+ CPPPATH='%s/include/python%s/',
SHCCFLAGS='',
SHOBJSUFFIX='.o',
SHLIBPREFIX='')
bar = foo.Copy(SWIG = r'%s wrapper.py ' + swig)
foo.SharedLibrary(target = 'foo', source = ['foo.c', 'foo.i'])
bar.SharedLibrary(target = 'bar', source = ['bar.c', 'bar.i'])
-""" % (version, python))
+""" % (sys.prefix, version, python))
test.write("foo.c", """\
char *