diff options
author | Steven Knight <knight@baldmt.com> | 2003-09-18 07:42:19 (GMT) |
---|---|---|
committer | Steven Knight <knight@baldmt.com> | 2003-09-18 07:42:19 (GMT) |
commit | 5401afc920c34379547d06db33b77fd076e4ed18 (patch) | |
tree | 592067bf1dc35d113e84debab9728c6fb847ffa3 /test/SWIG.py | |
parent | e6e8507ed69cbbe147cbf448c3f0fce0285cdbdc (diff) | |
download | SCons-5401afc920c34379547d06db33b77fd076e4ed18.zip SCons-5401afc920c34379547d06db33b77fd076e4ed18.tar.gz SCons-5401afc920c34379547d06db33b77fd076e4ed18.tar.bz2 |
Fix test/SWIG.py to find the proper Python include directory in all cases. (Christoph Wiedemann)
Diffstat (limited to 'test/SWIG.py')
-rw-r--r-- | test/SWIG.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/test/SWIG.py b/test/SWIG.py index d36c77e..2a0ee32 100644 --- a/test/SWIG.py +++ b/test/SWIG.py @@ -104,7 +104,7 @@ swig = test.where_is('swig') 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 @@ -116,7 +116,7 @@ os.system(string.join(sys.argv[1:], " ")) test.write('SConstruct', """ foo = Environment(SWIGFLAGS='-python', - CPPPATH='/usr/include/python%s/', + CPPPATH='%s/include/python%s/', SHCCFLAGS='', SHOBJSUFFIX='.o', SHLIBPREFIX='') @@ -124,7 +124,7 @@ swig = foo.Dictionary('SWIG') 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 * |