Building Cygwin-Python extension modules - export strategies

Mark Hadfield m.hadfield at niwa.cri.nz
Tue May 8 02:04:44 EDT 2001


From: "Mark Hadfield" <m.hadfield at niwa.cri.nz>

Replying to my own posting. Oh the shame!

> ...I would
> like to trigger a discussion on this list and ultimately a ruling from the
> Python gods about the one-true-Pythonic-way to write and
> install Python extension modules for the Cygwin version of Python.

The gods weren't listening, or didn't care to answer.

Given the complete lack of interest shown in this subject by the general
Python community, I'll drop it. In case anyone is interested I now think
that on balance the following is the best way to get Python extension
modules to build on for Cygwin Python:

> ... In each C file foomodule.c, replace
>
>     void initfoo ()
>
> with
>
>     DL_EXPORT(void) initfoo ()
>
> where DL_EXPORT is a preprocessor macro.

As Jason Tishler has pointed out, this has the advantage of working with the
traditional Makefile.pre method as well as the distutils.

---
Mark Hadfield
m.hadfield at niwa.cri.nz  http://katipo.niwa.cri.nz/~hadfield
National Institute for Water and Atmospheric Research


-- 
Posted from clam.niwa.cri.nz [202.36.29.1] 
via Mailgate.ORG Server - http://www.Mailgate.ORG



More information about the Python-list mailing list