[Pythonmac-SIG] Python C extensions that depend on dynamic
libraries
Nicholas Riley
njriley at uiuc.edu
Sun Jan 11 19:15:08 EST 2004
On Sun, Jan 11, 2004 at 09:53:10PM +0100, Jack Jansen wrote:
> If Bob is right (and I think he is) then you can probably fix this by
> using "g++" in stead of "ld" or "gcc" as the linker command for your
> Python extension.
Distutils doesn't properly support C++ until Python 2.3; for earlier
versions you have to do various bizarre things to force it to link on
various platforms.
> As to the dylib/so issue: that's my stupidity. Back when OSX came out I
> was under the impression (don't know where I got it) that both .dylib
> and .so were "legal" extensions for dynamic libraries on OSX. As .so
> was the standard on most unixen, and for some reason Python's configure
> seemed to pick that I never spent a second thought on it.
>
> I'm not sure what we'll do for 2.4. Either go to whatever is the
> standard on OSX (I haven't a clue whether there is a standard for
> plugins), or come up with one ourselves (.pysomethingorother).
You're not the only one to pick .so; Apache plugins in
/usr/libexec/httpd also end with .so, and are also MH_BUNDLE format.
Tcl uses MH_DYLIB and .dylib, which is bizarre; anyone know about any
examples from other scripting languages?
I think .bundle is likely to cause more confusion than not; something
with Python in the name (akin to .pyd on Windows) seems like a much
better idea, perhaps ".pyext" or ".pymod"?
--
=Nicholas Riley <njriley at uiuc.edu> | <http://www.uiuc.edu/ph/www/njriley>
More information about the Pythonmac-SIG
mailing list