Creating C modules for Python under Cygwin

Jason Tishler jason at tishler.net
Wed May 8 09:42:42 EDT 2002


Martin,

On Mon, May 06, 2002 at 07:57:45PM +0200, Martin v. Löwis wrote:
> Jason Tishler <jason at tishler.net> writes:
> > I intend to submit a patch to Python CVS with a clean version of the
> > above.  However my motivation would be greater, if I actually knew
> > of someone who is really interested in this functionality.  Is there
> > anyone?
> 
> I wasn't actually suggesting that you work on this; I was merely
> questioning that it does have to be the way that it currently is.
> 
> Now that we all agree that it *could* be done differently, the
> question indeed is whether it should be done differently.

I asked the above question on the Cygwin list.  Someone pointed out
that even though the Python library is static, there still would be a
dependency on the Cygwin DLL.  So, it is impossible for Cygwin Python
to be completely self-contained (i.e., statically linked).

> In the specific case of Cygwin, it may be worth a try to see whether
> -Wl,--export-dynamic works - on other systems, that automatically
> manages to export all symbols from the executable, and indeed Python
> uses that feature, e.g. on Linux.

I tried the above and (unfortunately) it does not work under Cygwin.
AFAICT, one must use a multiple step approach like the one used by the
mkexp.sh script in my previous post.  I'm afraid that integrating these
steps into the Unix style build would end up being "ugly."

Jason






More information about the Python-list mailing list