[Pyrex] (no subject)

Krzysztof Stachlewski stach at fr.pl
Tue Aug 17 20:07:14 CEST 2004


angolero at linux.ajusco.upn.mx wrote:

> As somone run pirex on windows succsefully ??
> i have to compile something with cgwin ??

I did.
The easiest way is to have VisualC++ 6.0.
It simply works then.

If you don't have the VisualC++ then you have
no other option but to use mingw32 from cygwin.
AND you don't need cygwin's version of Python,
just the regular Windows' one.
It doesn't work like a charm but it works if
you first do some magic.

You need this patch:
http://mail.python.org/pipermail/distutils-sig/2004-January/003553.html

And you need a tweaked version of libpython23.a
See paragraph 2 of
http://sebsauvage.net/python/mingw.html
for instructions (skip other paragraphs).

Distutils call cc.exe to link the code.
Unfortunately cc.exe is a symlink under cygwin
which is not recognized by a native Win32 application (Python.exe).
So you need to:
cp g++.exe cc.exe
in you /bin directory.

This will work with C programs and moreover it will allow you
to correctly link extension which contain C++ code.

You create an extension with:
python ./setup.py build_ext --compiler=mingw32

Hope that helps (it works on my machine).

-- 
Stach  Tlen: stachobywatelpl, GG: 1811474
        Jabber: stach at jabber atman pl




More information about the Pyrex mailing list