# HG changeset patch # User Mads Kiilerich # Date 2013-04-12 20:55:34 # Node ID 012780620d4f4c8d02c1a17c1826095c5e98b10a # Parent e9331e979d7afe98c1a835d39900145c6b56b094 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 @@ class hgbuildpy(build_py): 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)