[Numpy-svn] r4799 - trunk/numpy/core

numpy-svn at scipy.org numpy-svn at scipy.org
Wed Feb 13 04:53:36 EST 2008


Author: cdavid
Date: 2008-02-13 03:53:32 -0600 (Wed, 13 Feb 2008)
New Revision: 4799

Modified:
   trunk/numpy/core/SConstruct
Log:
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

Modified: trunk/numpy/core/SConstruct
===================================================================
--- trunk/numpy/core/SConstruct	2008-02-13 06:11:19 UTC (rev 4798)
+++ trunk/numpy/core/SConstruct	2008-02-13 09:53:32 UTC (rev 4799)
@@ -20,6 +20,7 @@
     # 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 @@
 #---------------
 # 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(' ', '_')




More information about the Numpy-svn mailing list