Bug 171773 - get_python_lib() returns wrong directory on 64bit archs
Summary: get_python_lib() returns wrong directory on 64bit archs
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: python
Version: rawhide
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Mihai Ibanescu
QA Contact: Brock Organ
URL:
Whiteboard:
Depends On:
Blocks: 170489
TreeView+ depends on / blocked
 
Reported: 2005-10-26 09:04 UTC by Karsten Hopp
Modified: 2007-11-30 22:11 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2005-10-26 16:26:55 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Karsten Hopp 2005-10-26 09:04:27 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8b5) Gecko/20051008 Fedora/1.5-0.5.0.beta2 Firefox/1.4.1

Description of problem:
get_python_lib() is used in  many packages , p.e. Pyrex to determine where the python files should be installed when 'python setup.py' is being run.
On a 64bit machine get_python_lib() returns '/usr/lib/python2.4/site-packages'
but should return '/usr/lib64/python2.4/site-packages'




Version-Release number of selected component (if applicable):
python-2.4.1-14

How reproducible:
Always

Steps to Reproduce:
On a x86_64 machine (64bit installation):
#python
Python 2.4.1 (#1, Oct  6 2005, 15:06:07)
[GCC 4.0.2 20050928 (Red Hat 4.0.2-1)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from distutils.sysconfig import get_python_lib
>>> get_python_lib()
'/usr/lib/python2.4/site-packages'
>>>

This looks wrong. It should return '/usr/lib64/python2.4/site-packages'


Actual Results:  This results in p.e. Pyrex not being buildable on 64bit archs as it correctly uses %{_libdir} in the specfile, but python provides the wrong path to install the filesin.


Additional info:

Comment 1 Jeremy Katz 2005-10-26 16:26:55 UTC
get_python_lib() returns the non arch-specific directory which is under
/usr/lib.  You need to use get_python_lib(1) to get the platform specific
directory if that's required.

Since Pyrex is pure python, you _want_ things in /usr/lib, not /usr/lib64.  If
they ended up in /usr/lib64 then a noarch package built on a 64bit box wouldn't
work on a 32bit box.  


Note You need to log in before you can comment on or make changes to this bug.