distutils/boost question

Gerhard Häring gerhard.haering at gmx.de
Fri Jun 28 15:12:19 EDT 2002


Achim Domma wrote in comp.lang.python:
> "Gerhard Häring" <gerhard at bigfoot.de> wrote:
>> The easiest solution is to statically link in the Boost.Python library.
> 
> With boost.python V2 dynamic linking will be a requirement. Isn't
> there another solution?
 
On Windows, the DLL search rules are such that putting the support DLL
in the same directory as the .pyd does help. If you get that working
with distutils, please drop me a note.

On Unix, you need to put the shared library in a directory that is in
the dynamic loader's search path. /usr/lib, /usr/local/lib, ... That's
AFAIK currently not possible with distutils. It's no problem when
using your favourite Unix package format. Writing a SPEC file, for
example, is pretty straightforward, when using the documentation and
existing SPEC files as a template.

Another ugly solution is to write a little wrapper script that sets
the LD_LIBRARY_PATH environment variable appropriately before running
Python. That's the quick and dirty fix.

Gerhard
-- 
mail:   gerhard <at> bigfoot <dot> de       registered Linux user #64239
web:    http://www.cs.fhm.edu/~ifw00065/    OpenPGP public key id AD24C930
public key fingerprint: 3FCC 8700 3012 0A9E B0C9  3667 814B 9CAA AD24 C930
reduce(lambda x,y:x+y,map(lambda x:chr(ord(x)^42),tuple('zS^BED\nX_FOY\x0b')))



More information about the Python-list mailing list