diff options
| author | Greg Noel <GregNoel@tigris.org> | 2009-04-18 16:56:22 (GMT) |
|---|---|---|
| committer | Greg Noel <GregNoel@tigris.org> | 2009-04-18 16:56:22 (GMT) |
| commit | 588cf4a4fae059bb156ee086ff01a92b2ee025a9 (patch) | |
| tree | df97f69bcf6db6082047925e185d179fa442af55 /test/SWIG/remove-modules.py | |
| parent | 935a23efa2fe53e9dcbf7df8e99f8ee424834f96 (diff) | |
| download | SCons-588cf4a4fae059bb156ee086ff01a92b2ee025a9.zip SCons-588cf4a4fae059bb156ee086ff01a92b2ee025a9.tar.gz SCons-588cf4a4fae059bb156ee086ff01a92b2ee025a9.tar.bz2 | |
Modify the SWIG tests so that OS X is treated like a UNIX platform (which it
really is). OS X now not only runs all the SWIG tests (it used to skip many
of them because it could not find the appropriate files), it now passes all
the tests.
Diffstat (limited to 'test/SWIG/remove-modules.py')
| -rw-r--r-- | test/SWIG/remove-modules.py | 25 |
1 files changed, 10 insertions, 15 deletions
diff --git a/test/SWIG/remove-modules.py b/test/SWIG/remove-modules.py index e0e91da..8ed24ef 100644 --- a/test/SWIG/remove-modules.py +++ b/test/SWIG/remove-modules.py @@ -39,29 +39,23 @@ import TestSCons if sys.platform == 'win32': _dll = '.dll' else: - _dll = '.so' + _dll = '.so' test = TestSCons.TestSCons() swig = test.where_is('swig') - if not swig: test.skip_test('Can not find installed "swig", skipping test.\n') - +python, python_include, python_libpath, python_lib = \ + test.get_platform_python_info() +Python_h = os.path.join(python_include, 'Python.h') +if not os.path.exists(Python_h): + test.skip_test('Can not find %s, skipping test.\n' % Python_h) # handle testing on other platforms: ldmodule_prefix = '_' -python_include_dir = test.get_python_inc() - -Python_h = os.path.join(python_include_dir, 'Python.h') - -if not os.path.exists(Python_h): - test.skip_test('Can not find %s, skipping test.\n' % Python_h) - -python_frameworks_flags = test.get_python_frameworks_flags() - test.write("module.i", """\ %module modulename @@ -69,11 +63,12 @@ test.write("module.i", """\ test.write('SConstruct', """ foo = Environment(SWIGFLAGS='-python', - CPPPATH='%(python_include_dir)s', + CPPPATH=['%(python_include)s'], LDMODULEPREFIX='%(ldmodule_prefix)s', LDMODULESUFFIX='%(_dll)s', - FRAMEWORKS='%(python_frameworks_flags)s', - SWIG=r'%(swig)s', + SWIG=[r'%(swig)s'], + LIBPATH=[r'%(python_libpath)s'], + LIBS='%(python_lib)s', ) import sys |
