[reportlab-users] installation dir troubles

Frederik Himpe fhimpe at telenet.be
Thu Jun 28 17:33:31 EDT 2007


On Thu, 28 Jun 2007 11:56:53 +0100, Robin Becker wrote:


> Frederik Himpe wrote:

> .........

>> Two examples from the log:

>>

>> byte-compiling

>> /home/fhimpe/python-reportlab/BUILDROOT/python-reportlab-root/usr/lib/python2.5/site-packages/reportlab/tools/__init__.py

>> to __init__.pyc

>> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

>>

>> copying docs/userguide/app_demos.py ->

>> /home/fhimpe/python-reportlab/BUILDROOT/python-reportlab-root/usr/lib64/python2.5/site-packages/reportlab/docs/userguide

>> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

>>

> OK now I see; something appears to be very wrong with your installation

> prefix. You appear to have two. Can you remember how you actually

> installed python? Did you do something like

>

> ./configure --prefix=/home/fhimpe/python-reportlab make

> make install


No, this is standard python 2.5.1 RPM on Mandriva Cooker x86_64 edition.
The log file is created when trying to build a python-reportlab RPM on
Mandriva's official x86_64 build system.

python-reportlab is installed in /home/fhimpe/python-reportlab/...
because the rpmbuild command is running
python setup.py install --root=/home/fhimpe/python-reportlab/BUILDROOT/python-reportlab-root
so it can properly package the contents of this directory in the RPM file.


> We have multiple pythons installed using the above approach. What I

> don't understand is why your machine needs to mention lib64 at all. What

> kind of OS/hardware are you installing on.


Mandriva x86_64 (and also Fedora IIRC), install 64 bit libraries in
/usr/lib64 instead of /usr/lib. This permits a complete biarch system,
where you install standard i586 package libraries (in /usr/lib) on your
x86_64 system.

Unfortunately I don't know python, so I'm not really sure how to fix it.
But looking at setup.py, I think it gets
/usr/lib64/python2.5 from a function copied from Zope, and adds this path
to data files, so they have absolute paths.
The py and pyc files are not considered as data files, but I
guess it's python itself (or a library on which setup.py is based?) which decides
to put them in /usr/lib/python2.5 (which is actually fine on x86_64, as py
and pyc files are arch independant, and python will look in both
/usr/lib/python2.5 and /usr/lib64/python2.5)

Maybe you should compare python-reportlab's setup.py with the one of another
python application. For example the coralftp application
(http://svn.mandriva.com/cgi-bin/viewvc.cgi/packages/cooker/coralftp/pristine/SOURCES/),
has a much simpler
setup.py (it does not have any code to try to detect the absolute path, but
only relative paths are used throughout setup.py). Python decides to put
everything in /usr/lib/python2.5/coralftp, and all works fine then.

--
Frederik Himpe



More information about the reportlab-users mailing list