Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support MinGW builds #14

Open
jayvdb opened this issue Oct 9, 2019 · 3 comments
Open

Support MinGW builds #14

jayvdb opened this issue Oct 9, 2019 · 3 comments
Labels
enhancement New feature or request

Comments

@jayvdb
Copy link

jayvdb commented Oct 9, 2019

#13 outlines some of the reasons why MinGW builds might be advantageous, but there is also the benefit of gcc/clang toolchain being more managable, and the possibility of using cross-compiling.

The MinGW builds of Python are quite mature, and well maintained with a long list of patches at

https://github.com/msys2/MINGW-packages/tree/master/mingw-w64-python3

There are around 350 Python packages being built and tested in that repo, some with extra patches required.

I have built around around 150 myself on top of wine at https://build.opensuse.org/project/show/home:jayvdb:wine-python3:py37:packages & https://build.opensuse.org/project/show/home:jayvdb:wine-python3:py37:packages-p2 , most with tests running. Builds there disabled to avoid unnecessary load on OBS, but I was able to build standalone CLI apps with it.
(Also Nuitka-built apps at https://build.opensuse.org/project/show/home:jayvdb:wine-python3:py37:packages-Nuitka ;-) )

@indygreg
Copy link
Owner

indygreg commented Oct 9, 2019

I'm all for supporting a MinGW distribution (as well as a Clang on Windows distribution).

I'll be honest, the nhe number of patches required to build CPython for MinGW scares me a bit. It might be less effort (and more useful) to cross-compile a Windows distributing using Linux+Clang.

@jayvdb
Copy link
Author

jayvdb commented Oct 9, 2019

Well the number of patches is the side effect of real users, which is something a new project to build with clang doesnt have. And you would still need many of those patches from MinGW project, which are often run-time patches. As I know you are aware, getting cpython built is only the beginning - to be useful, the distutils needs to be able to compile modules which link correctly, and that is when the patches start piling up.

Anyways, the more the merrier.

Cross linking to indygreg/PyOxidizer#95 which seems blocked on this, or a clang build.

@indygreg indygreg added the enhancement New feature or request label Apr 12, 2020
@ryancinsight
Copy link

ryancinsight commented Sep 19, 2022

This may be possible with the msys2-UCRT version, I have to do a lot less patches compiling with this and most of the time it just works without issues or even the clang toolchain:

https://www.msys2.org/docs/environments/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants