Skip to content
Snippets Groups Projects
Commit 6c0e1aee1b19 authored by Nicolas Dumazet's avatar Nicolas Dumazet
Browse files

setup: user-friendly error message if Python headers are missing

parent 8be2d78460ef
No related branches found
No related tags found
No related merge requests found
......@@ -55,6 +55,7 @@
from distutils.spawn import spawn, find_executable
from distutils.ccompiler import new_compiler
from distutils.errors import CCompilerError
from distutils.sysconfig import get_python_inc
scripts = ['hg']
if os.name == 'nt':
......@@ -246,6 +247,9 @@
if ext.name.startswith("mercurial."):
self.py_modules.append("mercurial.pure.%s" % ext.name[10:])
self.distribution.ext_modules = []
else:
if not os.path.exists(os.path.join(get_python_inc(), 'Python.h')):
raise SystemExit("Python headers are required to build Mercurial")
def find_modules(self):
modules = build_py.find_modules(self)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment