When make is missing, setup.py prints a message suggesting to install
PyQt4-devel even if it already is. This change with the help of
6788c11a6d63824862d340f82da9de46ef63ee60 makes the message more helpful.
Before:
$ python setup.py
Building Qt applications
Install PyQt4-devel or disable Qt applications (with --no-qt).
After:
$ python setup.py
Building Qt applications
Could not find executable: make
Install missing component(s) (see above) or disable Qt applications (with --no-qt).
Signed-off-by: Adrien Kunysz <adrien@kunysz.be>
Signed-off-by: Romain Bignon <romain@symlink.me>
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 e69adf357b,
the name of the missing executable was printed as well.
Signed-off-by: Adrien Kunysz <adrien@kunysz.be>
Signed-off-by: Romain Bignon <romain@symlink.me>
This should force Python 2 on Gentoo (though it worked with default
config), and work again with Arch.
The find_executable() function should work on POSIX and Windows
platforms.
It is also easily possible to override executables.
Generally the code is shorter and PEP8 compliant.
I used autopep8 on some files and did carefully check the changes.
I ignored E501,E302,E231,E225,E222,E221,E241,E203 in my search, and at
least E501 on any autopep8 run.
Other style fixes not related to PEP8:
* Only use new-style classes. I don't think the usage of old-style
classes was voluntary. Old-style classes are removed in Python 3.
* Convert an if/else to a one-liner in mediawiki, change docstring style
change to a comment something that wasn't really appropriate for a
docstring.
* Unneeded first if condition in meteofrance