From: Robert Bradshaw Date: Thu, 19 Mar 2009 18:58:58 +0000 (-0700) Subject: Trac #247, better error reporting when Python.h not found. X-Git-Tag: 0.11.1.alpha~43 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=11ed9af821654f83a55713bd3e132a45b56c6130;p=cython.git Trac #247, better error reporting when Python.h not found. --- diff --git a/Cython/Compiler/ModuleNode.py b/Cython/Compiler/ModuleNode.py index 937240d0..e3cb4b6f 100644 --- a/Cython/Compiler/ModuleNode.py +++ b/Cython/Compiler/ModuleNode.py @@ -406,6 +406,9 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode): code.putln('#define PY_SSIZE_T_CLEAN') for filename in env.python_include_files: code.putln('#include "%s"' % filename) + code.putln("#ifndef Py_PYTHON_H") + code.putln(" #error Python headers needed to compile C extensions, please install development version of Python.") + code.putln("#endif") code.putln("#ifndef PY_LONG_LONG") code.putln(" #define PY_LONG_LONG LONG_LONG") code.putln("#endif")