MinGW And The other Py2.4 issue
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[1]. 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 command: 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.
import sys sys.winver '2.4'
To compile Armin's Psyco 1.3 in my MinGW compiled Python, I simply issued: python setup.py build and then 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. Regards, Khalid [1] pyMinGW can be found here: http://jove.prohosting.com/iwave/ipython/pyMinGW.html _________________________________________________________________ Express yourself instantly with MSN Messenger! Download today it's FREE! http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/
A.B., Khalid wrote:
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[1]. Indeed there is no need to buy or even download 400MB+ of code to do so.
That's good to know, but somewhat unrelated to the issue under discussion. While it is clear from your message that you can build python, as well as python extensions with MingW, it is not that clear whether extensions build with mingw will work in the standard 2.4 distribution, or whether you can use the standard 2.4 distribution to build extensions with mingw. Regards, Martin
At 11:07 PM 12/12/04 +0100, Martin v. Löwis wrote:
it is not that clear whether extensions build with mingw will work in the standard 2.4 distribution, or whether you can use the standard 2.4 distribution to build extensions with mingw.
I thought that it was clarified some time ago, with my success reports for the pre-alpha version. Paul Moore has also independently confirmed this, and posted reasons why he doesn't believe that the dangling references to msvcrt should cause a problem in practice. The item that was unclear was whether newer versions of MinGW could get away *without* building a libpython24.a file, and Paul indicated that this was not possible. So, using the script that I posted previously to build libpython24.a from python24.dll is still a valid path for using MinGW to build extensions for Python on Windows.
participants (3)
-
"Martin v. Löwis"
-
A.B., Khalid
-
Phillip J. Eby