From f01c0cf88eb01dba81c0616ef60366644e93f49c Mon Sep 17 00:00:00 2001 From: "Gustavo J. A. M. Carneiro" Date: Mon, 20 Feb 2012 12:17:26 +0000 Subject: [PATCH] Bug 1273 - Better error message on missing Python development files --- bindings/python/wscript | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/bindings/python/wscript b/bindings/python/wscript index 66790c6c5..10a7c7116 100644 --- a/bindings/python/wscript +++ b/bindings/python/wscript @@ -92,10 +92,21 @@ def configure(conf): try: conf.check_tool('python') + except Configure.ConfigurationError, ex: + conf.report_optional_feature("python", "Python Bindings", False, + "The python interpreter was not found") + return + try: conf.check_python_version((2,3)) + except Configure.ConfigurationError, ex: + conf.report_optional_feature("python", "Python Bindings", False, + "The python found version is too low (2.3 required)") + return + try: conf.check_python_headers() except Configure.ConfigurationError, ex: - conf.report_optional_feature("python", "Python Bindings", False, str(ex)) + conf.report_optional_feature("python", "Python Bindings", False, + "Python library or headers missing") return # stupid Mac OSX Python wants to build extensions as "universal