summaryrefslogtreecommitdiffstats
path: root/test/SWIG/remove-modules.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/SWIG/remove-modules.py')
-rw-r--r--test/SWIG/remove-modules.py25
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