Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 4b5a3ed

Browse files
committed
Forgot to raise an exception if Python.h cannot be found.
1 parent d52af76 commit 4b5a3ed

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

numpy/core/setup.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,11 @@ def generate_config_h(ext, build_dir):
139139
log.info('Generating %s',target)
140140

141141
# Check we have the python header (-dev* packages on Linux)
142-
config_cmd.check_header('Python.h')
142+
result = config_cmd.check_header('Python.h')
143+
if not result:
144+
raise SystemError(
145+
"Cannot compiler 'Python.h'. Perhaps you need to "\
146+
"install python-dev|python-devel.")
143147

144148
tc = generate_testcode(target)
145149
result = config_cmd.try_run(tc, library_dirs = default_lib_dirs)

0 commit comments

Comments
 (0)