changeset 18905:012780620d4f

setup: make error message for missing Python headers more helpful
author Mads Kiilerich <mads@kiilerich.com>
date Fri, 12 Apr 2013 16:55:34 -0400
parents e9331e979d7a
children ef7068173a22
files setup.py
diffstat 1 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/setup.py	Mon Feb 11 11:20:12 2013 +0100
+++ b/setup.py	Fri Apr 12 16:55:34 2013 -0400
@@ -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 weren\'t found in %s' % h)
 
     def find_modules(self):
         modules = build_py.find_modules(self)