Modules failing to add runtime library path info at link time

cjblaine cjblaine at gmail.com
Mon Feb 1 23:35:37 EST 2010


On Feb 1, 11:04 pm, cjblaine <cjbla... at gmail.com> wrote:
> On Feb 1, 8:00 pm, Christian Heimes <li... at cheimes.de> wrote:
>
>
>
> > cjblaine wrote:
> > > Where/how can I configure the appropriate portion of our Python
> > > install to do 100% the right thing instead of just 50% (-L)?
>
> > Python's distutils doesn't alter the library search path unless you tell
> > it explicitly.
>
> > > A specific example -- note the -L and lack of -R (Solaris build):
>
> > > % python setup.py build
> > > ....
> > > gcc -shared build/temp.solaris-2.10-sun4u-2.6/pgmodule.o -L/afs/rcf/
> > > apps/catchall/lib -lpq -o build/lib.solaris-2.10-sun4u-2.6/_pg.so
> > > %
>
> > The Extension() class supports the rpath argument. Simply add
> > rpath="/path/to/library/dir" and you are good.
>
> > Christian
>
> Thanks for the reply.
>
> So, python setup.py build rpath="/whatever/lib" ?

Replying to myself:

No.  Actually, Christian, it looks like it's runtime_library_dirs?

class Extension:
...
      runtime_library_dirs : [string]
        list of directories to search for C/C++ libraries at run time
        (for shared extensions, this is when the extension is loaded)

So, how does one inject that into, I assume, setup.cfg ?  Ideally it
could be done via the build command-line, but I don't see a way to do
that when browsing python setup.py build --help

( there is no setup.cfg provided in the PyGreSQL source tree, to )
( continue that example case                                     )



More information about the Python-list mailing list