On Nov 30, 2012, at 05:24 AM, Matthias Klose wrote: >So, Barry's [CCed] concern was that an upstream build without any options >would include /usr/local/lib/python2.7/site-packages, which was used by >debian policy as well. Therefore the debian system build now uses >dist-packages for /usr and /usr/local. Otoh, it's most likely that you do >want to use the system packages for everything else, e.g. when building >library bindings.
Historically[1], a from-source build of Python using the default configure, would install Python into /usr/local/bin, with /usr/local/lib/pythonX.Y/site-packages being where third party modules got installed. Debian's interpretation of the FHS allows system owners to install third party software outside of the packaging system to install Python modules into /usr/local/lib/pythonX.Y/site-packages, and for those to be visible to the system Python. Thus we have a clash, because if I install Python from source and some third party modules (e.g. for isolation from the system Python), I could potentially break my system Python. Worse, it might work on Solaris and Gentoo, but break on Debian and Ubuntu. The solution (many years field tested by now) was the switch to dist-packages as the place that the Debian packaging system installs modules and putting /usr/local/lib/pythonX.Y/dist-packages on sys.path. This eliminates potential conflicts between system Python and a from-source install. My suggestion for upstream Xen would be to amend its build command line to something like this: $(PYTHON) setup.py install --prefix=$(PREFIX) $(INSTALL_LAYOUT) Normally $INSTALL_LAYOUT would be empty so people doing Xen builds from source would just get whatever behavior is typical for the Python they're using. The Debian packager would then define INSTALL_LAYOUT='--install-layout=deb' and it would Just Work. Then, if Xen users wanted to install Xen from source into their system Python[2] they would have to either provide the $INSTALL_LAYOUT value, or add /usr/local/lib/pythonX.Y/site-packages to their sys.path manually. Cheers, -Barry [1] I'm not sure how far back it goes, but at least since 1994 when I became involved in Python, but it was true for other *nix free software long before that. [2] Which I personally think is a bit suspect since IMHO only Debian packages should be used with the system Python - and why not use virtualenv or a from-source build of Python?
signature.asc
Description: PGP signature