After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 308004 - configure does not check environment for PYTHON
configure does not check environment for PYTHON
Status: VERIFIED FIXED
Product: libxml2
Classification: Platform
Component: general
2.6.19
Other Linux
: Normal normal
: ---
Assigned To: Daniel Veillard
libxml QA maintainers
Depends on:
Blocks:
 
 
Reported: 2005-06-17 01:34 UTC by Joseph Sacco
Modified: 2009-08-15 18:40 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Joseph Sacco 2005-06-17 01:34:42 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.
Comment 1 Joseph Sacco 2005-07-16 16:26:17 UTC
Still a problem in 2.6.20.  

-Joseph
Comment 2 Joseph Sacco 2005-07-16 16:41:01 UTC
Take a look at the configure file for gnome-menus-2.11.1.1 for an example of how
to resolve this issue.

-Joseph
Comment 3 Joseph Sacco 2005-07-22 13:46:25 UTC
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
Comment 4 Daniel Veillard 2005-08-24 22:19:52 UTC
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
Comment 5 Joseph Sacco 2005-08-25 01:23:05 UTC
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




Comment 6 Daniel Veillard 2005-09-05 08:59:40 UTC
This should be closed by release of libxml2-2.6.21,

  thanks,

Daniel
Comment 7 Joseph Sacco 2005-09-06 14:40:08 UTC
Daniel,

The fix works. It also needs to be applied to libxslt and gamin, which have the
same problem.

-Joseph
Comment 8 Daniel Veillard 2005-09-06 14:49:11 UTC
open bugs for them, then !

Daniel