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/


_______________________________________________
Python-Dev mailing list
[EMAIL PROTECTED]
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to