[PATCH] setup: make error message for missing Python headers more helpful
Mads Kiilerich
mads at kiilerich.com
Thu Apr 11 15:37:26 CDT 2013
# HG changeset patch
# User Mads Kiilerich <mads at kiilerich.com>
# Date 1360539792 -3600
# Mon Feb 11 00:43:12 2013 +0100
# Node ID 027e7edd2707aba417c22fc9bf813d73ef54f6ea
# Parent 2019611e6858ce9b297da4fe7631bc7b7b00c777
setup: make error message for missing Python headers more helpful
diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -297,9 +297,10 @@
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')):
+ h = os.path.join(get_python_inc(), 'Python.h')
+ if not os.path.exists(h):
raise SystemExit('Python headers are required to build '
- 'Mercurial')
+ 'Mercurial but wasn\'t found in %s' % h)
def find_modules(self):
modules = build_py.find_modules(self)
More information about the Mercurial-devel
mailing list