This service will be undergoing maintenance at 20:00 UTC, 2017-04-03. It is expected to last about 30 minutes
Bug 171773 - get_python_lib() returns wrong directory on 64bit archs
get_python_lib() returns wrong directory on 64bit archs
Product: Fedora
Classification: Fedora
Component: python (Show other bugs)
x86_64 Linux
medium Severity medium
: ---
: ---
Assigned To: Mihai Ibanescu
Brock Organ
Depends On:
Blocks: 170489
  Show dependency treegraph
Reported: 2005-10-26 05:04 EDT by Karsten Hopp
Modified: 2007-11-30 17:11 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2005-10-26 12:26:55 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Karsten Hopp 2005-10-26 05:04:27 EDT
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' 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):

How reproducible:

Steps to Reproduce:
On a x86_64 machine (64bit installation):
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()

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 12:26:55 EDT
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.