diff options
author | Pearu Peterson <pearu.peterson@gmail.com> | 2007-05-11 08:20:41 +0000 |
---|---|---|
committer | Pearu Peterson <pearu.peterson@gmail.com> | 2007-05-11 08:20:41 +0000 |
commit | 3757ca12afa8b89e92e16b6814eb1888611b4db0 (patch) | |
tree | e12770643a6baa1c9f4ef788bbe2da432ded5bed /numpy/core/setup.py | |
parent | 6d8010c4654cbc7e9a04495a4401548fa47e332c (diff) | |
download | numpy-3757ca12afa8b89e92e16b6814eb1888611b4db0.tar.gz |
Improved error message for missing Python.h.
Diffstat (limited to 'numpy/core/setup.py')
-rw-r--r-- | numpy/core/setup.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/numpy/core/setup.py b/numpy/core/setup.py index 70dcd5480..458d19a41 100644 --- a/numpy/core/setup.py +++ b/numpy/core/setup.py @@ -42,10 +42,16 @@ def configuration(parent_package='',top_path=None): 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 |