summaryrefslogtreecommitdiffstats
path: root/test/SWIG/generated_swigfile.py
diff options
context:
space:
mode:
authorMats Wichmann <mats@linux.com>2018-08-15 14:16:11 (GMT)
committerMats Wichmann <mats@linux.com>2018-08-15 14:16:11 (GMT)
commit52ecb92eb30698b67de2662a892e20be3f1fda20 (patch)
tree4f93ce6501a5fa057005b5e5a72b4e819d9343de /test/SWIG/generated_swigfile.py
parent2a39eb278ecca56f66011f2d602e12b924ad0e2c (diff)
downloadSCons-52ecb92eb30698b67de2662a892e20be3f1fda20.zip
SCons-52ecb92eb30698b67de2662a892e20be3f1fda20.tar.gz
SCons-52ecb92eb30698b67de2662a892e20be3f1fda20.tar.bz2
Move checking for python header to common location
A previous change added a check for Python.h in one SWIG test which did not have it which turns that test into a skip instead of a fail if the header is not installed. It was pointed out that having 12 tests check for the same thing might be optimised by putting the check in the routine which returns info about the python development environment, so this change makes that modification. Signed-off-by: Mats Wichmann <mats@linux.com>
Diffstat (limited to 'test/SWIG/generated_swigfile.py')
-rw-r--r--test/SWIG/generated_swigfile.py6
1 files changed, 1 insertions, 5 deletions
diff --git a/test/SWIG/generated_swigfile.py b/test/SWIG/generated_swigfile.py
index d09b473..4686dae 100644
--- a/test/SWIG/generated_swigfile.py
+++ b/test/SWIG/generated_swigfile.py
@@ -29,7 +29,6 @@ Verify that SCons realizes the -noproxy option means no .py file will
be created.
"""
-import os
import sys
import TestSCons
@@ -54,11 +53,8 @@ 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 = \
+python, python_include, python_libpath, python_lib, python_h = \
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 = '_'