diff options
author | David Cournapeau <cournape@gmail.com> | 2008-02-13 09:53:32 +0000 |
---|---|---|
committer | David Cournapeau <cournape@gmail.com> | 2008-02-13 09:53:32 +0000 |
commit | e64f298393c329b0c9a0214a9ec0ff086d87e945 (patch) | |
tree | 591db1d6e85c68501972cb40bfddc184989fa38d | |
parent | 7711db0ee3d28fe2f28670d69529f39053cbf09f (diff) | |
download | numpy-e64f298393c329b0c9a0214a9ec0ff086d87e945.tar.gz |
scons build: fail as soon as possible if Python.h is not found. This is particularly useful on windows if the platform sdk is not available
-rw-r--r-- | numpy/core/SConstruct | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/numpy/core/SConstruct b/numpy/core/SConstruct index 209d642c7..efb785c16 100644 --- a/numpy/core/SConstruct +++ b/numpy/core/SConstruct @@ -20,6 +20,7 @@ if os.name == 'nt': # simple code using only typedef and so on, so we need it for configuration # checks env.AppendUnique(LIBPATH = [get_pythonlib_dir()]) +print env["CPPPATH"] #======================= # Starting Configuration @@ -39,6 +40,11 @@ numpyconfig_sym = [] #--------------- # Checking Types #--------------- +if not config.CheckHeader("Python.h"): + raise RuntimeError("Error: Python.h header is not found (or cannot be " +"compiled). On linux, check that you have python-dev/python-devel packages. On" +" windows, check \ that you have the platform SDK.") + def check_type(type, include = None): st = config.CheckTypeSize(type, includes = include) type = type.replace(' ', '_') |