[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: How to package a Python module with shared libraries ?



* Sylvestre Ledru <sylvestre@debian.org>, 2010-04-25, 23:33:
> * All Scilab libraries are stored in /usr/lib/scilab/
>
> * cdll.LoadLibrary("/usr/lib/scilab/libscilab.so") will fails
> since /usr/lib/scilab is not in the search path for libraries
[...]
> * I don't want load explicitly all Scilab libraries (there are a few)
>
> * Calling python the following way make things work:
> LD_LIBRARY_PATH=/usr/lib/scilab python
> but I want to avoid the user to have to do manipulations

You could try setting RUNPATH/RPATH into the extension module.  If
it's using distutils you can use --rpath to setup.py build_ext, see
the --help of the build_ext sub-command.
I forgot to say but I also tried with the rpath but library load of
Python does not seems to follow it.

Since I am also the packager of Scilab, I could also move the library
into /usr/lib but since Scilab has many libraries, I was hoping to store
them separately but if there is no other way, I could do that...

Or you could just try building libraries in /usr/lib/scilab with rpath. Then cdll.LoadLibrary("/usr/lib/scilab/libscilab.so") should work as intended.

--
Jakub Wilk

Attachment: signature.asc
Description: Digital signature


Reply to: