From 11ed9af821654f83a55713bd3e132a45b56c6130 Mon Sep 17 00:00:00 2001 From: Robert Bradshaw Date: Thu, 19 Mar 2009 11:58:58 -0700 Subject: [PATCH] Trac #247, better error reporting when Python.h not found. --- Cython/Compiler/ModuleNode.py | 3 +++ 1 file changed, 3 insertions(+) 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") -- 2.26.2