distutils, shared libraries and Mac OS X

Matthew King matt at avaquest.com
Wed Dec 12 15:48:53 EST 2001


Hi.  I was just installing Sketch on Mac OS X 10.1.1 and ran into the 
following problem with Python 2.1.1 distutils.

Shared libraries on OS X have the .dylib extension and because of this 
find_library_file() was failing to find my tcl/tk libraries...

As a fix, in distutils/unixccompiler.py I made the following change:

76c76,78
<
---
 >     import sys
 >     if sys.platform[:-1] == "darwin": # Mac OS X
 >         shared_lib_extension = ".dylib"

this worked, but I'm curious if there was a better way to do it?

any advice would be appreciated.

- matt




More information about the Python-list mailing list