Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 187826 - python.m4 sets wrong pythondir for multilib
Summary: python.m4 sets wrong pythondir for multilib
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: High normal (vote)
Assignee: Python Gentoo Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 185294 187626
  Show dependency tree
 
Reported: 2007-08-05 16:48 UTC by Angelo Arrifano (RETIRED)
Modified: 2008-04-09 04:16 UTC (History)
5 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Angelo Arrifano (RETIRED) gentoo-dev 2007-08-05 16:48:42 UTC
Hello everybody..

Since python.m4 should be for python herd but belongs to automake package.. I'm CCing you all.

In python.m4 macro:

AC_CACHE_CHECK([for $am_display_PYTHON script directory],
    [am_cv_python_pythondir],
    [am_cv_python_pythondir=`$PYTHON -c "from distutils import sysconfig; print sysconfig.get_python_lib(0,0,prefix='$PYTHON_PREFIX')" 2>/dev/null ||
     echo "$PYTHON_PREFIX/lib/python$PYTHON_VERSION/site-packages"`])
  AC_SUBST([pythondir], [$am_cv_python_pythondir])

this check doesn't set pythondir with correct libdir. I my case with amd64 multilib I get "lib" instead of "lib64". This would lead relying packages to install in a incorrect libdir.

$python -c "from distutils import sysconfig; print sysconfig.get_python_lib(0,0,prefix='/usr')"
/usr/lib/python2.4/site-packages
Comment 1 Samuli Suominen (RETIRED) gentoo-dev 2007-08-05 16:52:23 UTC
One way for fixing this is,

python -c 'from distutils.sysconfig import get_python_lib; import os; print              os.path.normcase(os.path.realpath(get_python_lib()))'

This returns actual directory, instead of symlink.

Had to override python.m4 in bug 187626 because of this borqued handling.
Comment 2 Luis Medinas (RETIRED) gentoo-dev 2007-08-06 12:57:09 UTC
strange i got the right directory.
 python -c "from distutils import sysconfig; print sysconfig.get_python_lib(0,0,prefix='/usr')"
/usr/lib64/python2.5/site-packages

python -c 'from distutils.sysconfig import get_python_lib; import os; print os.path.normcase(os.path.realpath(get_python_lib()))'
/usr/lib64/python2.5/site-packages
Comment 3 Kenneth Prugh (RETIRED) gentoo-dev 2007-08-06 15:35:35 UTC
Doesn't work here, it returns the wrong libdir.

python -c "from distutils import sysconfig; print sysconfig.get_python_lib(0,0,prefix='/usr')"
/usr/lib/python2.4/site-packages

python -c 'from distutils.sysconfig import get_python_lib; import os; print os.path.normcase(os.path.realpath(get_python_lib()))' 
/usr/lib64/python2.4/site-packages

Hmm, metalgod your running Python 2.5, perhaps there is a difference between 2.4?
Comment 4 Christoph Mende (RETIRED) gentoo-dev 2007-08-06 21:04:29 UTC
I get the same results as metalgod here with python-2.5, guess it's just 2.4 that returns the wrong path.
Comment 5 Kenneth Prugh (RETIRED) gentoo-dev 2007-08-07 00:03:19 UTC
Upgrading to python 2.5 fixed it here aswell.
Comment 6 Samuli Suominen (RETIRED) gentoo-dev 2007-11-12 21:48:28 UTC
And another package fails because of Python 2.4, net-wireless/gnome-bluetooth-0.9.1 which has now an fugly sed to work this around.

Can we get 2.5 stabilized please?
Comment 7 Chris Gianelloni (RETIRED) gentoo-dev 2007-11-13 23:29:17 UTC
I'd be happy with either a fixed 2.4 version or a stable 2.5 version.
Comment 8 Samuli Suominen (RETIRED) gentoo-dev 2007-11-17 15:22:46 UTC
python ping
Comment 9 Samuli Suominen (RETIRED) gentoo-dev 2007-11-17 15:23:22 UTC
(In reply to comment #8)
> python ping
> 

Can you supply me a list I need in order to get 2.5 stable for amd64?
Comment 10 Olivier Crete (RETIRED) gentoo-dev 2008-02-11 15:26:15 UTC
Actually, from what I understand, python 2.4 returns something sensible... The first parameter of sysconfig.get_python_lib() is whether the library is platform specific or not. So if you set it to 1, it will return lib64/. The autofoo should install the .py in /usr/lib (pkgpython) and the .so in /usr/$(get_libdir) (pkgpyexec)
Comment 11 Chris Gianelloni (RETIRED) gentoo-dev 2008-04-08 20:46:14 UTC
So, is this broken or not?  More importantly, is this something I need to fix for 2008.0?
Comment 12 Olivier Crete (RETIRED) gentoo-dev 2008-04-09 04:02:28 UTC
the python.m4 in aclocal 1.10 is perfectly fine
The problem with these packages is that they install modules in pythondir instead of pyexecdir