[Pythonmac-SIG] Linking against a Python extension
bob at redivi.com
Tue Dec 20 22:25:28 CET 2005
> First question: Is it possible to link against a normally built Python
> More specifically, I want to pass the '.so' file of some Python extension
> as an extra link argument to the 'weave.inline' function. This seems to
> work quite well on Linux. But I suspect, on Mac OS X the answer is 'no'.
> I just want this confirmed.
No. That's not the right way to do it anyway, you need to make a table of
pointers available as a PyCObject or similar and get at it that way. Look
at how something like Numeric exports its interface.
> Second question: Can I use distutils right out-of-the-box to create a
> dynamically linked shared library on OS X?
I doubt it. Even if you could, don't do that. It's not portable and the
search paths for dynamic libraries are relative to DYLD_LIBRARY_PATH and
the executable, so you wouldn't be ab
More information about the Pythonmac-SIG