[Python-Dev] Deprecate support for mingw - add to PEP 11

59 views
Skip to first unread message

uco...@gmail.com

unread,
Feb 20, 2021, 11:37:18 PM2/20/21
to pytho...@python.org
I think perhaps we should admit that this build system is no longer supported. From everything I can tell, the mingw project is no longer maintained. The project's site, mingw.org, is no longer live; the project on sourceforge, although still downloaded daily, had its last commit almost 3 years ago - a commit which changed the official project URI to a new link that now is also dead.
Looking over BPO there are a little over 50 bugs open against mingw, but only 7 that have any meaningful activity within the last three years. Three of those issues explicitly mention mingw-w64 which is an active fork of the original mingw project (active homepage, commits almost daily, new release within the last 6 months) and I wonder if this is the project the other 4 projects meant by "mingw"?
Ideally any features and flags in the code base for mingw would be checked to already be working with mingw-w64 or else modified to work, but this would require a sponsor for this platform, which appears to be missing. Further, there is no buildbot for mingw, which should be a requirement to be a fully supported platform, as per this PEP. This potential work appears non-trivial with a cursory look at the mingw-w64-python pacman project, which contains close to 100 patch files. I am purposing instead that mingw be deprecated and, if a sponsor comes along, mingw-w64 can become re-supported, or newly supported depending on you point of view, as allowed by the PEP.
_______________________________________________
Python-Dev mailing list -- pytho...@python.org
To unsubscribe send an email to python-d...@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at https://mail.python.org/archives/list/pytho...@python.org/message/XIWF3OYL7OQRBVRBBQCBKPPJH5OKVVRC/
Code of Conduct: http://python.org/psf/codeofconduct/

Dan Stromberg

unread,
Feb 21, 2021, 12:12:28 AM2/21/21
to uco...@gmail.com, Python-Dev
mingw-w64 might be a small change.

But while one is it at, it might make sense to evaluate:
Apparently clang on Windows is working on calling convention compatibility with Visual Studio.

Dan Stromberg

unread,
Feb 21, 2021, 1:01:07 PM2/21/21
to uco...@gmail.com, Python-Dev

It looks like CPython remains 100% C, so clang becomes more attractive:
https://stackoverflow.com/questions/6329688/llvm-and-visual-studio-obj-binary-incompatibility

Then again, do we allow C++ extension modules?  That might make C++ more relevant, even if CPython itself is purely C.

Emily Bowman

unread,
Feb 21, 2021, 8:55:39 PM2/21/21
to Dan Stromberg, uco...@gmail.com, Python-Dev
On Sun, Feb 21, 2021 at 10:02 AM Dan Stromberg <drsa...@gmail.com> wrote:

It looks like CPython remains 100% C, so clang becomes more attractive:
https://stackoverflow.com/questions/6329688/llvm-and-visual-studio-obj-binary-incompatibility

Then again, do we allow C++ extension modules?  That might make C++ more relevant, even if CPython itself is purely C.
 
Extensions can easily be built in any language, C++ is even documented, and I've built a simple one in Rust when I was learning it -- as long as you use the equivalent of extern "C" { } for that language, or rebuild the headers you need in another language (quite an undertaking, admittedly, even with a header parser).

The line "You will still need the C compiler that was used to build Python; typically Microsoft Visual C++." hasn't been accurate in a long time either (it's been in there since Python 2.2, when VC++ 6.0 was the latest, which had quite a few... quirks), anything that can digest the headers can link via the C API just fine. I guess since it's just not tested or supported, so you're on your own if you run into any issues with memory management, threading conflicts, compiler bugs, header conversion issues, etc.

-Em

Victor Stinner

unread,
Feb 22, 2021, 6:36:18 AM2/22/21
to Dan Stromberg, uco...@gmail.com, Python-Dev
pybind11 is a famous C++ extension module for Python. Yes, the Python
C API is usable in C++ thanks to extern "C" { ... } being used in
headers.

Victor
> Message archived at https://mail.python.org/archives/list/pytho...@python.org/message/HEK67QOUQ4RD42HLBDTR3CJJNEMB3HJF/
--
Night gathers, and now my watch begins. It shall not end until my death.
_______________________________________________
Python-Dev mailing list -- pytho...@python.org
To unsubscribe send an email to python-d...@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at https://mail.python.org/archives/list/pytho...@python.org/message/Q7D6ENQNDANZGZQ5AORKGFH6EBEW5AI6/

reiter.c...@gmail.com

unread,
Feb 22, 2021, 1:47:37 PM2/22/21
to pytho...@python.org
In case anyone is wondering what mingw-w64-python is referring to: https://packages.msys2.org/base/mingw-w64-python

The MSYS2 project [0] maintains a CPython variant that builds with gcc/clang+mingw-w64 on Windows. We lack the manpower to reduce the diff to upstream though. The yearly rebuilds, the move to isolated builds and the move away from distutils keeps us busy. But if anyone wants to help you now know where to find us.

[0] https://www.msys2.org/
_______________________________________________
Python-Dev mailing list -- pytho...@python.org
To unsubscribe send an email to python-d...@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at https://mail.python.org/archives/list/pytho...@python.org/message/6N3XVYCMKQGQF43ZIIZDA56P6QF436OI/
Reply all
Reply to author
Forward
0 new messages