View Single Post

   
  #1 (permalink)  
Old 02-21-2008, 05:33 AM
Henrik Carlqvist
 
Posts: n/a
Default Installing python modules from source in Slackware 12

When installing ocfs2-tools on Slackware 12 I have also tried to get
ocfs2console working. This program requires some python modules, among
them pygtk. It seems as if the installation of ocfs2console also
installs some python modules.

To me it seems as if python modules, when compiled from source, like most
other software, by default prefers to install itself below /usr/local.

However, when trying to use a python script that calls those modules they
are not found. Debugging with strace shows that python only looks in
/usr/lib/python*/site-packages, not /usr/local/lib/python*/site-packages.

I am not very familiar with Python myself. I don't know how to write
python programs and I don't know what to expect from a default python
installation. The only thing that I can say is that something seems to be
broken here.

Is the Slackware 12 python installation broken as it doesn't look in
/usr/local for modules?

Is pygtk broken as it installs in /usr/local without telling python to
look for modules there?

I think that the problem can be solved by giving the switch --prefix=/usr
to the configure script of pygtk. By doing so it will install in /usr
instead of /usr/local. I see two drawbacks with this solution.

1) Maybe I'm pedantic, but I think that software which I have compiled
from source myself should go to /usr/local.

2) Pygtk uses a configure script, but many other python modules uses a
setup.py script instead. I don't think setup.py usually is able to take
any prefix argument.

Does anyone know if it is the Slackware python installation which is
broken, or if it is python modules like pygtk, pygobject and ocfs2console
that is broken?

regards Henrik
--
The address in the header is only to prevent spam. My real address is:
hc1(at)poolhem.se Examples of addresses which go to spammers:
root@localhost postmaster@localhost

Reply With Quote