[Distutils] Dynamic linking on Linux, Mac OS, et al
Phillip J. Eby
pje at telecommunity.com
Sat Jan 14 23:55:25 CET 2006
At 04:01 PM 1/14/2006 -0500, Jim Fulton wrote:
>Phillip J. Eby wrote:
>>At 10:06 AM 1/14/2006 -0500, Jim Fulton wrote:
>>
>>>On many Linux (Unix?) platforms, you can pass an -rpath/-R option to the
>>>linker at build time that causes the run-time linker to use specific
>>>paths to load libraries. This feature is supported by disutils through
>>>its --rpath/-R build_ext options.
>>
>>But that's not relocatable (to different directories), and eggs are
>>intended to be "zero-install" for simple use cases. So, the solution I
>>came up with uses '.' in the rpath, and a stub loader that changes directories
>
>Changes directories? Uh ... this sounds brittle.
Yep. All the solutions are, unfortunately, except on Windows where it just
works in a sane way to start with.
>No. I want to be able to get a Python egg built in such a way that
>it uses a library in a location I tell it to, rather than in the standard
>system libraries. For example, suppose I have an egg with an extension that
>uses ICU, and that I've installed the ICU libraries in a non-standard place.
>When I build the egg, I want to tell it to use the location that I specify
>for ICU. I can do this with setup now with the -R option to build_ext.
Oh. Sure; you can set it on the command line, e.g. "build_ext -R whatever
bdist_egg", or via any of the normal distutils hooks, including the various
Extension() keyword arguments, config files, etc.
More information about the Distutils-SIG
mailing list