[Pythonmac-SIG] building extensions for 2.3 (darwin build),
and UUID generation
Jack Jansen
Jack.Jansen at cwi.nl
Thu Jan 1 18:01:33 EST 2004
On 31-dec-03, at 21:30, Paul Miller wrote:
>
>> with a setup.py I wrote on Linux, and writing the setup.py was EASY.
>> Take a look at:
>>
>> http://www.python.org/doc/current/ext/building.html
>>
>> It should take you about 10 minutes to get your extension setup and
>> built.
>
> Alas - the examples and docs there seem fairly unix-specific. What if
> I need to include some CoreFoundation framework headers and use the
> CoreFoundation framework?
If you look at the setup.py file at the top of a Python source
distribution you'll find there how all the standard MacPython modules
are built.
The trick is to use the extra_link_args arguments to link against the
framework. For example, here's the distutils magic for the CF module:
exts.append( Extension('_CF', ['cf/_CFmodule.c',
'cf/pycfbridge.c'],
extra_link_args=['-framework',
'CoreFoundation']) )
--
Jack Jansen, <Jack.Jansen at cwi.nl>, http://www.cwi.nl/~jack
If I can't dance I don't want to be part of your revolution -- Emma
Goldman
More information about the Pythonmac-SIG
mailing list