Le lundi 26 avril 2010 à 00:14 +0200, Jakub Wilk a écrit : > * Sylvestre Ledru <sylves...@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. Indeed. I rebuilt Scilab with the rpath and it works. Thanks for the tip! I wonder what is the best solution: * move all content of /usr/lib/scilab/ to /usr/lib/ (it is more than 70 shared lib). But I would have to do that upstream also just for this Python module. * add the rpath for the libraries in /usr/lib/scilab/
(Sorry if I leave the scope of Python here) Sylvestre -- To UNSUBSCRIBE, email to debian-python-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/1272281208.1523.79492.ca...@korcula.inria.fr