GNOME Bugzilla – Bug 308004
configure does not check environment for PYTHON
Last modified: 2009-08-15 18:40:50 UTC
Distribution/Version: Yellow Dog Linux 4.0.1 When searching for python, configure should first check the environment to see if PYTHON has been set, before checking the file system in the usual places.
Still a problem in 2.6.20. -Joseph
Take a look at the configure file for gnome-menus-2.11.1.1 for an example of how to resolve this issue. -Joseph
Using the configuration flag --with-python="path-to-python-installation" will cause configure to set pythondir = PYTHON_SITE_PACKAGES rather than pythondir = $(libdir)/python${PYTHON_VERSION}/site-packages -Joseph
For your first point I changed configure to use AM_PATH_PYTHON() and check the environment variable directly. That is commited in CVS and fix your bug. For the second, well if the pythondir is not found on the system, then configure ask python directly where it expects its site-packages to be with: python -c "from distutils import sysconfig; print sysconfig.get_python_lib()" if you don't get the right one that means your python was not configured to find stuff where you expect. Daniel
Daniel, Thank you for working to resolve this bug, which effects * gamin * libxml2 * libxslt The issue with pythondir is that it should be configurable. If there is to be a default value, it should be pythondir = $(libdir)/python${PYTHON_VERSION}/site-packages to be consistent with other GNOME packages. If I am building GARNOME and installing it, for example, under /opt/garnome, I would expect all python packages associated with the GARNOME build to be installed under /opt/garnome/lib/python-2.x/site-packages so that the GARNOME installation is independent of whatever else is installed on the system. GARNOME is never built as "root". Subsequently, any attempt to install python packages in a directory owned by root, /x/y/python-2.4/site-packages will fail. -Joseph
This should be closed by release of libxml2-2.6.21, thanks, Daniel
Daniel, The fix works. It also needs to be applied to libxslt and gamin, which have the same problem. -Joseph
open bugs for them, then ! Daniel