[Distutils] Dynamic linking on Linux, Mac OS, et al

Matthias Urlichs smurf at smurf.noris.de
Fri Jan 6 18:57:00 CET 2006


Hi,

Phillip J. Eby:
> >So why don't you simply link the Python extension and the library
> >to one single .so file?
> 
> Because there are a half-dozen Python extensions in the project sharing the 
> library.  Hence, the need for a "shared library".  :)
> 
So put them all into one .so file and import the required parts from
the modules you want them in.

Anyway, ELF libraries do have an rpath embedded in them. It *is*
possible to hotpatch that to point at wherever the shared library ends
up being installed.

Debian has a package "chrpath" with a tool "chrpath" (what a surprise ;-)
which can do that.

-- 
Matthias Urlichs   |   {M:U} IT Design @ m-u-it.de   |  smurf at smurf.noris.de
Disclaimer: The quote was selected randomly. Really. | http://smurf.noris.de
 - -
"I daresay," said Granny, pushing the Fool aside and stepping over a
writhing taproot. "If anyone locked *me* in a dungeon, there'd be screams."
		-- Terry Pratchett (Wyrd Sisters)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://mail.python.org/pipermail/distutils-sig/attachments/20060106/d870545a/attachment.pgp 


More information about the Distutils-SIG mailing list