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

numpy-svn at scipy.org numpy-svn at scipy.org
Fri May 11 04:20:50 EDT 2007


Author: pearu
Date: 2007-05-11 03:20:41 -0500 (Fri, 11 May 2007)
New Revision: 3744

Modified:
   trunk/numpy/core/setup.py
Log:
Improved error message for missing Python.h.

Modified: trunk/numpy/core/setup.py
===================================================================
--- trunk/numpy/core/setup.py	2007-05-10 22:42:48 UTC (rev 3743)
+++ trunk/numpy/core/setup.py	2007-05-11 08:20:41 UTC (rev 3744)
@@ -42,10 +42,16 @@
             tc = generate_testcode(target)
             from distutils import sysconfig
             python_include = sysconfig.get_python_inc()
+            python_h = join(python_include, 'Python.h')
+            if not os.path.isfile(python_h):
+                raise SystemError,\
+                      "Non-existing %s. Perhaps you need to install"\
+                      " python-dev|python-devel." % (python_h)
             result = config_cmd.try_run(tc,include_dirs=[python_include],
                                         library_dirs = default_lib_dirs)
             if not result:
-                raise "ERROR: Failed to test configuration"
+                raise SystemError,"Failed to test configuration. "\
+                      "See previous error messages for more information."
 
                 # Python 2.3 causes a segfault when
                 #  trying to re-acquire the thread-state




More information about the Numpy-svn mailing list