summaryrefslogtreecommitdiff
path: root/numpy/core
diff options
context:
space:
mode:
authorDavid Cournapeau <cournape@gmail.com>2008-08-09 23:55:21 +0000
committerDavid Cournapeau <cournape@gmail.com>2008-08-09 23:55:21 +0000
commitfd932a4a0aa9e3c26f3fa968b06b9332dfc229b8 (patch)
tree006f4041299f685eecc06f2c6e3179f759ef89c3 /numpy/core
parent4db04374b605c4b7a11ff90afc48d169bcefacb9 (diff)
downloadnumpy-fd932a4a0aa9e3c26f3fa968b06b9332dfc229b8.tar.gz
Give better error message when testing python.h fails.
Diffstat (limited to 'numpy/core')
-rw-r--r--numpy/core/SConscript14
1 files changed, 9 insertions, 5 deletions
diff --git a/numpy/core/SConscript b/numpy/core/SConscript
index a2d5198d2..83c5c39ca 100644
--- a/numpy/core/SConscript
+++ b/numpy/core/SConscript
@@ -5,7 +5,7 @@ import sys
from os.path import join as pjoin, basename as pbasename, dirname as pdirname
from copy import deepcopy
-from numscons import get_python_inc, get_pythonlib_dir
+from numscons import get_pythonlib_dir
from numscons import GetNumpyEnvironment
from numscons import CheckCBLAS
from numscons import write_info
@@ -17,7 +17,7 @@ from scons_support import array_api_gen_bld, ufunc_api_gen_bld, template_bld, \
env = GetNumpyEnvironment(ARGUMENTS)
-env.Append(CPPPATH = [get_python_inc()])
+env.Append(CPPPATH = env["PYEXTCPPPATH"])
if os.name == 'nt':
# NT needs the pythonlib to run any code importing Python.h, including
# simple code using only typedef and so on, so we need it for configuration
@@ -43,9 +43,13 @@ 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.")
+ errmsg = []
+ for line in config.GetLastError():
+ errmsg.append("\t>> %s " % line)
+ print """\ Error: Python.h header cannot be compiled (or cannot be found).
+On linux, check that you have python-dev/python-devel packages. On windows,
+check that you have he platform SDK. You may also use unsupported cflags. Configuration error log says: \n%s""" % ''.join(errmsg)
+ Exit(-1)
def check_type(type, include = None):
st = config.CheckTypeSize(type, includes = include)