[Pythonmac-SIG] How to build a dylib

Eric Nieuwland eric.nieuwland at xs4all.nl
Wed Aug 13 22:47:27 EDT 2003


Brian Lenihan wrote:
> You haven't specified anything about your environment, which makes it 
> kind of difficult to give you a definitive answer.  If you are using a 
> framework build of Python 2.3 and Apple's dev tools from Dec 2002 or 
> later, you may not need to do anything special.

Stupid me: framework MacPython 2.3 + Dec 2002 dev tools ( gcc updated )

Jack Jansen wrote:
> Actually, you need a Mach-O bundle with a ".so" extension.
>
> But: if you're using distutils this should all happen automatically, 
> do I understand from your message that somehow it doesn't work for 
> you? What happens?

I have a replacement for a library in /usr/lib installed in 
/usr/local/lib and can't figure out how the modify the library search 
path so it will take the replacement. Strangely enough the search for 
include file seems to be OK.

Ronald Oussoren wrote:
> If this is a python extension module it will magically work ;-)
>
> If the library isn't too large and used from only 1 extension module 
> I'd create a static library and link with that, GCC seems to create 
> position independent code for static libraries as well. This makes it 
> easier to distribute the python extension module that uses your 
> library, as you no longer have to worry about the .dylib. We do this 
> with libffi in PyObjC and nobody has complained about this not > 
> working.

Yes, that was what I was planning to do. So, no more .dylib, just a .so.

--eric




More information about the Pythonmac-SIG mailing list