Pythondir fixes
This addresses #414 (closed) by eliminating wafhelpers/fix_python_config.py
and making the utilities search PYTHONDIR
and PYTHONARCHDIR
explicitly.
The the devel mailing list, Gary mentioned a concern about this concept breaking if the installed files being moved. If the ntp python module is moved to a location that is not in sys.path
, it will break. That is always going to be the case, and this change doesn't make anything worse in that regard. This is a WONTFIX from me. That is not a use case I think needs supporting. If you break things by manually moving the files, you can keep the pieces. If you want to install at a new location, it is trivial (and the right approach) to install again from a source tree.
Building a distro package is not a move for the purposes of the above paragraph. The following, as done for the Debian packaging, works fine:
./waf configure --prefix
./waf build
./waf install --destdir=debian/tmp
For example, the file debian/tmp/usr/bin/ntpq
has:
PYTHONDIR='/usr/lib/python2.7/dist-packages'
PYTHONARCHDIR='/usr/lib/python2.7/dist-packages'
Thus, when the files are later installed to /usr
, everything works correctly. Granted, in this case, /usr/lib/python2.7/dist-packages
is already in the default sys.path
. But if it wasn't, this would still work correctly.