mingw-cross-env-list
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Mingw-cross-env-list] MXE as virtual environment (python needs to run i


From: Václav Šmilauer
Subject: [Mingw-cross-env-list] MXE as virtual environment (python needs to run itself natively during installation)
Date: Mon, 17 Sep 2012 16:50:32 +0200
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.8.1.19) Gecko/20090105 Lightning/0.8 Thunderbird/2.0.0.19 Mnenhy/0.7.6.666

Hi there,

I am working on Pyhon port for MXE. Python is both scripting language and quite a bit of extension modules, some of which are compiled. Compilation of extension modules uses the distutils framework written in core python itself. The normal build process first build the interpreter, which is the used to drive compilation of extension modules. This is a problem for cross-compilation, as the target binary (python.exe) must be run on the host; this is automatic in Linux with binfmt_misc and wine, but presents other problems (e.g. distutils insists on Z:\... paths when run throught wine+python, but calls the cross-compiler (which does not understand such paths). There are some hacks around it, but they are nevertheless hacks (as far as I have seen).

Using host python for all python-related tasks in the cross-environment might work with some effort, but hacks are very likely ahead again (distutils uses default values of compiler, flags etc which are set when python is built - not sure how easy it is to change those).

A solution which might work is to compile only the base python interpreter (no compiled modules; that works already) first, so that headers can be installed and other compiled libs, which require python (boost-python, pyqt4, ...) can be cross-compiled. As a second step (those would be additional targets for MXE, not required in itself), python installation would be finished/run on the target (through wine, with some minimal and reproducible setup).

Another possibility would be to compile&install python entirely natively (but inside the MXE tree), then use installed headers to cross-compile dependent libraries.

Is there some experience using MXE as virtual environment?

Cheers, Vaclav




reply via email to

[Prev in Thread] Current Thread [Next in Thread]