summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Cournapeau <cournape@gmail.com>2008-02-13 09:53:32 +0000
committerDavid Cournapeau <cournape@gmail.com>2008-02-13 09:53:32 +0000
commite64f298393c329b0c9a0214a9ec0ff086d87e945 (patch)
tree591db1d6e85c68501972cb40bfddc184989fa38d
parent7711db0ee3d28fe2f28670d69529f39053cbf09f (diff)
downloadnumpy-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/SConstruct6
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(' ', '_')