[Python-Dev] MinGW And The other Py2.4 issue
abkhd at hotmail.com
Sun Dec 12 20:21:11 CET 2004
Nick Craig-Wood wrote:
>I'm following this thread with interest because we are considering
>embedding Python into this project, and I'm wondering whether we can
>cross compile python using mingw (almost certainly by the sound of
>it), but probably harder would be to make python module build and
>install system work cross-wise.
I am following this thread with interest too, because I can certainly report
that it is now indeed possible and quite easy to compile not only Python's
2.4 extensions but also Python itself in MinGW with the help of pyMinGW.
Indeed there is no need to buy or even download 400MB+ of code to do so.
After patching the Python 2.4 source with pyMinGW-24, and issuing the
make -f python24.mak all
We get Python and all its subprojects (socket, ssl, etc.) ready to run:
$ /c/temp/py24/python/dist/src/MinGW/python -i
Python 2.4.1a0 (#60, Dec 6 2004, 21:05:41)
[GCC 3.4.1 (mingw special)] on win32
Type "help", "copyright", "credits" or "license" for more information.
To compile Armin's Psyco 1.3 in my MinGW compiled Python, I simply issued:
python setup.py build
python setup.py bdist_wininst
And I had a /dist/psyco-1.3.win32-py2.4.exe file ready to be installed. It
works fine at this end (note that I poked myself in the Windows registry to
insert the pythoncore version information etc., but that should not be the
case with those running the official Windows distribution). I only wonder if
extensions created this way will work just as good in the latter. Because if
they did, then going down the road of extensive downloads or expensive
investment would be truly and totally unnecessary.
 pyMinGW can be found here:
Express yourself instantly with MSN Messenger! Download today it's FREE!
More information about the Python-Dev