Bug 171773

Summary: get_python_lib() returns wrong directory on 64bit archs
Product: [Fedora] Fedora Reporter: Karsten Hopp <karsten>
Component: pythonAssignee: Mihai Ibanescu <mihai.ibanescu>
Status: CLOSED NOTABUG QA Contact: Brock Organ <borgan>
Severity: medium Docs Contact:
Priority: medium    
Version: rawhideCC: katzj
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2005-10-26 16:26:55 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 170489    

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.