Commit 517c36d5 authored by Robert Bradshaw's avatar Robert Bradshaw

Refuse to compile for Python < 2.4

parent a0fff9f2
...@@ -484,6 +484,9 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode): ...@@ -484,6 +484,9 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode):
code.putln("#ifndef Py_PYTHON_H") code.putln("#ifndef Py_PYTHON_H")
code.putln(" #error Python headers needed to compile C extensions, please install development version of Python.") code.putln(" #error Python headers needed to compile C extensions, please install development version of Python.")
code.putln("#else") code.putln("#else")
code.putln("#if PY_VERSION_HEX < 0x02040000")
code.putln(" #error Cython requires Python 2.4+.")
code.putln("#else")
code.globalstate["end"].putln("#endif /* Py_PYTHON_H */") code.globalstate["end"].putln("#endif /* Py_PYTHON_H */")
code.put(""" code.put("""
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment