building extensions with gcc and python 2.2
kseehof at neuralintegrator.com
Mon Oct 14 04:22:16 CEST 2002
>martin at v.loewis.de (Martin v. Loewis) wrote in
>news:m3k7kmqgfn.fsf at mira.informatik.hu-berlin.de:
> > Ken Seehof <kseehof at neuralintegrator.com> writes:
> >> Should I use Cygwin or Mingw?
> > If you use Cygwin, your users will need a complete Cygwin
> > installation, including the Python that comes with cygwin; you will
> > not be able to use your extension modules with PythonLabs Python,
> > ActivePython, or the Win32 extensions.
>i use gcc from cygwin with --compiler=mingw and the extensions work
>perfectly with the python.org dist.
What's the significance of --compiler setting versus where gcc is from?
Do you have an example project that I can see? I don't have prior experience
with gcc (I've spent way too much time in Microsoft land :-).
>whats certainly speaks for mingw instead of cygwin is the download size.
>cygwin is great when you want the posix emualtion but native win32 dlls are
>probably what Ken wants when he used VC++ before and for that is mingw.
> > If you use Mingw, it probably will not work without tricks being done
> > to the import library.
>yes, one needs to build the own one with pexports and dlltool. but thats
>easy and has only to be done once.
Is this required if I use gcc from cygwin with --compiler=mingw?
If so, what tricks do I need to do?
>Chris <cliechti at gmx.net>
I definitely have to support standard win32 extensions, and I don't want to
build my own special python, since that would seem to blow away any
compatibility with the rest of the world. So apparently pure cygwin is out.
Download size probably isn't a major priority for me, but all other things
being equal, I'll pick the smaller size. Compatibility and convenience
are more important.
I need my extension to compile on mac and linux as well as windows,
so having standard posix behavior would be nice (but not if it means
building my own python). Anyway, it's probably not that difficult for me
to hide any posix/win32 inconsistencies.
Thanks for your help,
More information about the Python-list