Bug 3587 - Location of files in 64 bits architectures.
Summary: Location of files in 64 bits architectures.
Status: RESOLVED FIXED
Alias: None
Product: pycairo
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
Hardware: x86 (IA32) Linux (All)
: high normal
Assignee: Steve Chaplin
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-06-21 08:59 UTC by Marco Monteiro
Modified: 2005-06-22 00:37 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description Marco Monteiro 2005-06-21 08:59:38 UTC
In 64 bits architectures, .py files end up under
$prefix/lib/site-packages/cairo, and .so files end up under
$prefix/lib64/site-packages/cairo. The problem is that as
$prefix/lib64/site-packages/cairo does not contain __init__.py, that directory
is unusable by python imports.

To correct this, in 64 bits architectures all relevant files should go into
$prefix/lib64/site-packages/cairo directory.
Comment 1 Steve Chaplin 2005-06-21 19:34:09 UTC
I'm not sure where the 'lib64' part is coming from. I would expect all files to
end up in $prefix/lib/site-packages/cairo. Is $prefix/lib64/site-packages a
standard python directory or is it specific to your Linux distribution?
If I do
$ cd Python-2.4.1/Lib/distutils
$ grep lib64 * */*
it returns nothing - lib64 does not look like a standard Python directory name
to me.

Are you building pycairo using configure/autogen or setup.py? (configure is the
preferred way to build pycairo, setup.py is a user contributed file)
Also what Python version and Linux distribution are you using?
Comment 2 Marco Monteiro 2005-06-22 00:17:40 UTC
I'm using FC4 for AMD64.
The /lib64 hierarchy is standard. From Filesystem Hierarchy Standard:

"The 64-bit architectures PPC64, s390x, sparc64 and AMD64 must place 64-bit
libraries in /lib64, and 32-bit (or 31-bit on s390) libraries in /lib."

As pycairo contains .so files, and those are compiled for my 64 bits
architecture, they should go under /lib64. Also, in FC4 at least, almost all
python modules are under /usr/lib64, although some go under /usr/lib.

I'm building pycairo using configure/autogen. Finally, it's version 2.4.1 of Python.
Comment 3 Steve Chaplin 2005-06-22 05:55:57 UTC
Here's a fix which should work:
edit cairo/Makefile.am
delete the line "pycairodir = $(pythondir)/cairo"
Change the line "nodist_pycairo_PYTHON = __init__.py" to
"nodist_pycairoexec_PYTHON = __init__.py"
rerun 'configure' and 'make install'.

Could you test it and report back to say if it was successful.
Comment 4 Marco Monteiro 2005-06-22 08:13:23 UTC
Success. That indeed corrects it for me.

Note: I just noticed that pycairo.pc is still under /lib/pkgconfig. There is no
problem with that. It all works. But maybe that should go under /lib64/pkgconfig.
Looking in /usr/lib64/pkgconfig on FC4 makes me believe that that is the correct
place for it.  (But, I'm now just bitching, for I lack a better thing to do; pay
me no attention. ;)

Thank you.
Comment 5 Steve Chaplin 2005-06-22 17:37:27 UTC
Patch applied to cvs, closing bug report.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.