On Jul 27 2004, Tim Gilbert wrote (http://mail.python.org/pipermail/distutils-sig/2004-July/004105.html)
As anybody who might have tried to cross-compile python before has probably noticed, this isn't easy. ... After much furrowing of my brow and hacking of the makefile I've managed to get the compilation to go through the whole way ... Once I'm a little farther along I'll put up a web page with some patches and things that will hopefully make this all a little clearer, but for now I'd like to get a little input.
- Is there interest in adding cross-compilation support to distutils?
Oh, yes. Cross-compiling Python and its extensions (at least as of 2.2.5, the version I tried) is extremely painful, and we need to fix that.
(Beyond that of yours truly.) If so, I'd like to get a discussion going on some options for how to do this - especially, I'd like to have a way to specify via configure arguments or a python script which libraries to include.
Yes, yes, yes.
... Cross-compiling python for ARM howto: http://www.ailis.de/~k/docs/crosscompiling/python.php
I found this quite helpful. However, I'm still facing the problem of keeping setup.py from searching /usr, /usr/local, etc. and finding locally-installed packages. I guess I should write a little patch to disable the implicit automatic search of those directories.
- Dan
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On Sat, Oct 16, 2004 at 12:59:25PM -0700, Dan Kegel wrote:
(Beyond that of yours truly.) If so, I'd like to get a discussion going on some options for how to do this - especially, I'd like to have a way to specify via configure arguments or a python script which libraries to include.
Yes, yes, yes.
I wrote a little howto with details about linux -> win32 cross compilation with the mingw32 compiler. It is here: http://kampfwurst.net/python-mingw32/
For setup.py I used the CC and LDSHARED environment variables to specify the mingw compiler and linker. Includes and LDFLAGS are handled by setup.py itself.
Greetings, Bastian - -- ,''`. Bastian Kleineidam . calvin (at) debian.org : :' : `. `' GnuPG Schlüssel http://kampfwurst.net/gpgkey.txt `-
Dan Kegel wrote:
On Jul 27 2004, Tim Gilbert wrote (http://mail.python.org/pipermail/distutils-sig/2004-July/004105.html)
As anybody who might have tried to cross-compile python before has probably noticed, this isn't easy. ...
- Is there interest in adding cross-compilation support to distutils?
Oh, yes. Cross-compiling Python and its extensions (at least as of 2.2.5, the version I tried) is extremely painful, and we need to fix that.
Guido even likes the idea of adding support (see below).
... Cross-compiling python for ARM howto: http://www.ailis.de/~k/docs/crosscompiling/python.php
I found this quite helpful. However, I'm still facing the problem of keeping setup.py from searching /usr, /usr/local, etc. and finding locally-installed packages. I guess I should write a little patch to disable the implicit automatic search of those directories.
Hah. Found a patch that does that.
Here's a page that describes everything I dug up about this while searching tonight. I wish I'd dug up more of this stuff before I tried actually cross-building Python. http://kegel.com/crosstool/python.html - Dan
Dan Kegel wrote:
On Jul 27 2004, Tim Gilbert wrote (http://mail.python.org/pipermail/distutils-sig/2004-July/004105.html)
As anybody who might have tried to cross-compile python before has probably noticed, this isn't easy. ... After much furrowing of my brow and hacking of the makefile I've managed to get the compilation to go through the whole way ... Once I'm a little farther along I'll put up a web page with some patches and things that will hopefully make this all a little clearer, but for now I'd like to get a little input.
- Is there interest in adding cross-compilation support to distutils?
Oh, yes. Cross-compiling Python and its extensions (at least as of 2.2.5, the version I tried) is extremely painful, and we need to fix that.
(Beyond that of yours truly.) If so, I'd like to get a discussion going on some options for how to do this - especially, I'd like to have a way to specify via configure arguments or a python script which libraries to include.
Yes, yes, yes.
... Cross-compiling python for ARM howto: http://www.ailis.de/~k/docs/crosscompiling/python.php
I found this quite helpful. However, I'm still facing the problem of keeping setup.py from searching /usr, /usr/local, etc. and finding locally-installed packages. I guess I should write a little patch to disable the implicit automatic search of those directories.
I think you need to be more explicit about what you are trying to achieve here:
As far as I understand the setup.py you are talking about is the one that is used to compile the extensions that come with Python (those in Modules/) rather than extensions built using stock distutils.
If that's the case, then you are talking about adding support to that particular setup.py and not distutils in general, so the discussion would need to take place on python-dev rather than here.
What I'd be more interested in is figuring out which things would help distutils users *in general* in order to make cross-compilation feasable.
In particular: * which features are missing ? * which extra commands would be needed ? * what else is missing in support of cross-compilation ?