##// END OF EJS Templates
setup: user-friendly error message if Python headers are missing
Nicolas Dumazet -
r12649:6c0e1aee default
parent child Browse files
Show More
@@ -55,6 +55,7 b' from distutils.command.build_py import b'
55 from distutils.spawn import spawn, find_executable
55 from distutils.spawn import spawn, find_executable
56 from distutils.ccompiler import new_compiler
56 from distutils.ccompiler import new_compiler
57 from distutils.errors import CCompilerError
57 from distutils.errors import CCompilerError
58 from distutils.sysconfig import get_python_inc
58
59
59 scripts = ['hg']
60 scripts = ['hg']
60 if os.name == 'nt':
61 if os.name == 'nt':
@@ -246,6 +247,9 b' class hgbuildpy(build_py):'
246 if ext.name.startswith("mercurial."):
247 if ext.name.startswith("mercurial."):
247 self.py_modules.append("mercurial.pure.%s" % ext.name[10:])
248 self.py_modules.append("mercurial.pure.%s" % ext.name[10:])
248 self.distribution.ext_modules = []
249 self.distribution.ext_modules = []
250 else:
251 if not os.path.exists(os.path.join(get_python_inc(), 'Python.h')):
252 raise SystemExit("Python headers are required to build Mercurial")
249
253
250 def find_modules(self):
254 def find_modules(self):
251 modules = build_py.find_modules(self)
255 modules = build_py.find_modules(self)
General Comments 0
You need to be logged in to leave comments. Login now