packages built with MSVC (Microsoft Visual C++) and packages built with MinGW can have significant compatibility differences.
What differences are there?
If you need a different build of Python to load MinGW packages, you probably want to add a new tag like mingw, rather than change the existing tag. That would mean a PEP like PEP 656 â but simpler if this doesnât need its own version number.
If you donât need a different build of Python, wheel tags probably arenât the right place for this info.
Yes, I agree that the biggest difference is âcan this package be used on Python that built with the same compilerâ.
Nowadays cpython interpreter & most 3rd party packages are compiled by MSVC. But there is still some scenarios that python developers work on mingw / msys2 environment. Those developer may benefit from explicit tag info. Admittedly, such scenarios are relatively rare.
Hang on. If youâre using msys2, thatâs a cygwin variant, so it needs a cygwin build of Python, not the standard python.org build. That is a different platform, although itâs not supported by the Python core team, so thereâs no official platform tags for it.
Yes, and I also noticed that some msys2 distributed packages have sub-variants (like â-ucrtâ). It seems complicated. May be in the future, a standarlized wheel variant specs can address this in a unified way.
No, it doesnât. The msys2 environment is used to make native Windows binaries. You can use msys2 to build extension modules that work with MSVC-compiled CPython. You should not need to care whether MSVC or msys2/mingw was used to build the binaries in a wheel.
Matching the C runtime (ucrt vs msvcrt.dll) is apparently important although Iâve seen mismatched wheels that were widely used and seemed to work fine so Iâm not sure when exactly it breaks. I donât think tags are needed for the C runtime though: normal CPython builds use UCRT so all Windows wheels should do the same.
The complexity about Windows compiler & C runtime exceeds my initial thought.
I think, for a not-too-bad solution, maybe python prebuild libraries on msys2 should be distributed as msys2-specific software packages (which should be installed by pacman, not pip) instead of wheels ?
This is already exactly what happens. You can use pacman to install Python and 1000 different Python packages including pip. Search for âpythonâ here to see the list:
Yeah, which reminds me: one of my regular work is to deal with container images, and for a while, official docker-hub python images were built on alpine linux (musl) but later they all migrated to debian (glibc). I think the reason is lack of first-class support of musl.
However, I think the arch of musl is promising. The code readability and modernity is better than glibc, in my opinion. I think in the future it will be one major arch of cpython.