From 24119de00110b6eb9e769c6753d1ab042bae1509 Mon Sep 17 00:00:00 2001 From: Adrien Kunysz Date: Sun, 4 Nov 2012 14:04:56 +0000 Subject: [PATCH] setup.py: print what executable we were looking for The error message is sometimes confusing. Consider the following situation on Debian 6.0: $ python setup.py Building Qt applications Install PyQt4-devel or disable Qt applications (with --no-qt). $ dpkg -l | grep -i python | grep -i qt ii python-qt4 4.7.3-1+b1 Python bindings for Qt4 ii python-qt4-dev 4.7.3-1 Development files for PyQt4 What is really missing is the pyuic4 executable which is provided by a different package on that distribution. But you have no way to know that unless you go look into setup.py. This change prints what executable we are missing as to help diagnose this kind of problem: $ python setup.py Building Qt applications Could not find executable: pyuic4 Install PyQt4-devel or disable Qt applications (with --no-qt). Notice that until e69adf357b15569157c44c4581f27890674f82ff, the name of the missing executable was printed as well. Signed-off-by: Adrien Kunysz Signed-off-by: Romain Bignon --- setup.py | 1 + 1 file changed, 1 insertion(+) diff --git a/setup.py b/setup.py index 346c3496..40a3196f 100755 --- a/setup.py +++ b/setup.py @@ -41,6 +41,7 @@ def find_executable(name, names): fpath = os.path.join(path, name) + ext if os.path.exists(fpath) and os.access(fpath, os.X_OK): return fpath + print >>sys.stderr, 'Could not find executable: %s' % name def build_qt():