cython-devel

changeset 1879:07c1e0dc312b

Trac #247, better error reporting when Python.h not found.
author Robert Bradshaw <robertwb@math.washington.edu>
date Thu Mar 19 11:58:58 2009 -0700 (2 years ago)
parents 2a899d73e89e
children 3aac44b1f28acde69cfc191f
files Cython/Compiler/ModuleNode.py
line diff
1.1 --- a/Cython/Compiler/ModuleNode.py Thu Mar 19 18:01:59 2009 +0900 1.2 +++ b/Cython/Compiler/ModuleNode.py Thu Mar 19 11:58:58 2009 -0700 1.3 @@ -406,6 +406,9 @@ 1.4 code.putln('#define PY_SSIZE_T_CLEAN') 1.5 for filename in env.python_include_files: 1.6 code.putln('#include "%s"' % filename) 1.7 + code.putln("#ifndef Py_PYTHON_H") 1.8 + code.putln(" #error Python headers needed to compile C extensions, please install development version of Python.") 1.9 + code.putln("#endif") 1.10 code.putln("#ifndef PY_LONG_LONG") 1.11 code.putln(" #define PY_LONG_LONG LONG_LONG") 1.12 code.putln("#endif")