[Top][All Lists]

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

RE: Cross compile Python for Windows?

From: Russell Haley
Subject: RE: Cross compile Python for Windows?
Date: Sun, 28 Feb 2021 16:24:36 -0800

Hi Lilypond, Jonas,

Once again, sorry for the top post. I’m using the stupid Windows email client. 

A contributor to llvm-mingw has created a shell script that can reliably cross 
build python. He pull in the MSYS2 patches and applies a few of his own and 
then uses the standard autoconf tools to cross build for windows. We have been 
testing the python interpreter with LLDB-MI in Windows with Eclipse. I’ve also 
run a couple of hello world scripts through the interpreter in Windows.

The work can be found here: The python 
build consists of the script and the patches in the 
patches/python folder. That branch should be merged into llvm-mingw sometime in 
the next few months, but you obviously don’t need to wait.

If you need more information, feel free to email me directly or check with Long 
(the author) on GitHub. I’m going to remove myself from this mailing list 
because I am only here for the python stuff. 

Russell Haley

Sent from Mail for Windows 10

From: Jonas Hahnfeld
Sent: Friday, January 22, 2021 12:01 PM
To: Russell Haley;
Subject: Re: Cross compile Python for Windows?

Hey Russell,

Am Donnerstag, dem 21.01.2021 um 22:51 -0800 schrieb Russell Haley:
> Hi there!
> TLDR: I am wandering around the world looking for mingw patches for
> python?
> I am working with the llvm-mingw compiler toolchain project
> (  and we are trying to get
> the lldb.exe/lldb-mi.exe debugger working with various IDEs on
> Windows. We are in desperate need of libpython with the extensions
> built in ( ). The
> llvm-mingw package is cross compiled in a *nix environment (Linux and
> FreeBSD mostly). What we have found is trying to cross compile Python
> with mingw is a bit of a minefield.

ack, see below

> In my pursuit, I was checking the Python issue tracker when I came
> across a very old but very helpful offer of mingw patches:
> I was wondering if those patches exist for a current implementation
> of python 3? Anything you could offer or suggest would be helpful? 
> I’ll pull down your source files on the weekend, but I thought I
> would ask on the mailing list. 

I'm not aware of patches existing for a currently supported version of
Python 3. I attempted to cross-compile Python in GUB, the current tool
to produce binary releases for LilyPond, last year but eventually gave
up because the build system is actively working against that (both
configure and the Makefiles). Instead we're using the embeddable zip
from the Python developers that is probably built using MSVC.
In case you're interested, I had pushed my WIP here:
If you succeed in cross-compiling Python 3 for mingw, please let me /
us know, that could be interesting for the future.


reply via email to

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