Skip to content

Update to v3.14.5#209

Merged
lazka merged 106 commits into
mingw-v3.14.5from
wip/mingw-v3.14.5
May 11, 2026
Merged

Update to v3.14.5#209
lazka merged 106 commits into
mingw-v3.14.5from
wip/mingw-v3.14.5

Conversation

@lazka
Copy link
Copy Markdown
Member

@lazka lazka commented May 11, 2026

range diff:

  1:  6685cd49b10 =   1:  d8e5777c337 build: add --with-nt-threads and make it default on mingw
  2:  f1f479d211a =   2:  46d401c423d build: Define `MS_WINDOWS` (and others) when compiling with MINGW
  3:  e7aa3d69aeb =   3:  66b8217b78a sysmodule: Implement flags "_is_mingw", "is_mingw_ucrt" and "_use_alt_sep"
  4:  129b0041798 =   4:  cd807cef8eb configure: add `MACHDEP` and `platform` on MINGW
  5:  ded60bdad5e =   5:  9d201d99bfe build: Add default cross configuration for MINGW
  6:  0ccdf30b011 =   6:  fc247750f5b configure: enable largefile support by default for Mingw
  7:  0b172b5b719 =   7:  f8408b4ddf9 build: Add `PC/` to `CPPFLAGS` and to `SRCDIRS` on Mingw
  8:  bf5da35d125 =   8:  57ec36ee7b4 build: add MINGW support for posixmodule
  9:  97c8910c37d =   9:  a88414d2154 exports.h: Add support for MINGW
 10:  f7b105face7 =  10:  be75aa86432 configure: add options so that shared build is possible on MINGW
 11:  aacd343ba82 =  11:  2a78c63ecb9 build: Add PYD_PLATFORM_TAG
 12:  0e25866ff85 =  12:  5d44cd7ba4a build: Add dynload_win support for MinGW
 13:  8c0f66c7195 =  13:  bff18c59250 build: Use .pyd extension suffix + fix import lib install location
 14:  2a3451ada8f =  14:  1f9a90c0a0d build: Configure SOABI and EXT_SUFFIX for MINGW
 15:  ea16fa89656 =  15:  68d24cc3f5f build: Define MS_DLL_ID for sys.winver on MINGW
 16:  519a83746f2 =  16:  6e602031708 build: Ignore main program for frozen scripts on MINGW
 17:  d7946b664d6 =  17:  a278df742b7 socketmodule: add MINGW support
 18:  e5d209f8e88 =  18:  e8f12106b70 build: enable winreg, msvcrt, _winapi, winsound and _overlapped modules
 19:  28afc958830 =  19:  36975859b19 sysconfig: make _sysconfigdata.py relocatable
 20:  c2ef066df8a =  20:  075b2fc4034 sysconfig: treat MINGW builds as POSIX builds
 21:  d1dd4699d90 =  21:  c730b41eb26 sysconfig: Change the `get_platform()` method in sysconfig
 22:  abf0ac3b976 =  22:  3de46b67f35 build: semi native build sysconfig
 23:  9f5ea034a83 =  23:  1db6eb2032f ctypes: Add support for stdcall without underscore
 24:  976470d812b =  24:  452222e4878 ctypes: add suppor for ctypes.pythonapi under MINGW
 25:  e096c431bd2 =  25:  ccb6d9cce65 ctypes: find_library('c') should return None with ucrt
 26:  3db8e01f9aa =  26:  5f8a89b17c4 site: Customize for MINGW
 27:  129e69f0b0f =  27:  f495fac1481 site: Change user site-packages path to include the environment info
 28:  40178f07c7e =  28:  421d797ef56 python-config: output Windows paths for the shell variant
 29:  21c0ea4d101 =  29:  f8690c5f225 python-config: use the Python variant of python-config
 30:  d912118d05f =  30:  253c731ea54 mingw: prefer unix sep if MSYSTEM environment variable
 31:  0d7e47cba87 =  31:  5fd893dcec1 build: Remove MAXPATHLEN default
 32:  0e6c7b080f7 =  32:  d9c74626175 build: dont link with gettext
 33:  3de6138ae96 =  33:  9014a5e490d use gnu_printf in format
 34:  6eba1d48245 =  34:  6eb7dafefe4 build: remove usage of MS_COREDLL
 35:  08769017aa6 =  35:  ccf963d4eb3 getcompiler: expose MINGW toolchain related information
 36:  a3361cf2e6e =  36:  4506fd490d7 build: fix signal module build
 37:  0f5887f9ff7 =  37:  b7992c0952b build: build winconsoleio and _testconsole
 38:  903b2b1923c =  38:  810a5f6e63c multiprocessing: expose sem_unlink to fix multiprocessing.Queue
 39:  dc8b61f3b1f !  39:  3e38450e87e build: link win resource files and build pythonw
    @@ Makefile.pre.in: CC=		@CC@
      READELF=	@READELF@
      SOABI=		@SOABI@
      ABIFLAGS=	@ABIFLAGS@
    -@@ Makefile.pre.in: PY_CORE_CFLAGS=	$(PY_STDMODULE_CFLAGS) -DPy_BUILD_CORE
    - PY_CORE_LDFLAGS=$(PY_LDFLAGS) $(PY_LDFLAGS_NODIST)
    - # Strict or non-strict aliasing flags used to compile dtoa.c, see above
    +@@ Makefile.pre.in: PY_CORE_LDFLAGS=$(PY_LDFLAGS) $(PY_LDFLAGS_NODIST)
      CFLAGS_ALIASING=@CFLAGS_ALIASING@
    + # Compilation flags only for ceval.c.
    + CFLAGS_CEVAL=@CFLAGS_CEVAL@
     +RCFLAGS=@RCFLAGS@
      
      
 40:  f7a918288b3 =  40:  c1e24d990a7 pycore_fileutils: add MINGW support
 41:  a3f187ff4f2 =  41:  857bcd71823 configure: fix inet_pton check
 42:  1c748b32c35 =  42:  52293cbc633 importlib: bootstrap path sep
 43:  040e717c92c =  43:  a506032d546 configure: set MINGW stack reserve
 44:  f6b98d23ead =  44:  666faa429ed tests: fix test_bytes
 45:  9b5d4fab66a =  45:  7ed0b01ab60 timemodule: add MINGW support
 46:  fffaf0db61a =  46:  1ae0c205af5 configure: Disable checks for dlopen/dlfcn
 47:  068283b4f96 =  47:  591ba95544d venvlauncher: Build venvlauncher.exe from PC/launcher.c
 48:  25bb7be1e93 =  48:  278b2834842 venvlauncher: try looking for the versioned .exe first and then fall back
 49:  76bb577e9c2 =  49:  00c064dafe9 venvlauncher: Skip find python in Registry for mingw builds
 50:  63b0a302f5a =  50:  3ace2406d2a configure: don't check for clock_ functions
 51:  b24e64690da =  51:  728d92fa49c CI: test the build and add some mingw specific tests
 52:  62e1e490e77 =  52:  b95b0c8066d configure: Default to --without-c-locale-coercion on Windows
 53:  dd3a490220b =  53:  48dc4ae1bac tests: Fix some failing tests
 54:  4c2c82ebbf1 =  54:  712462de79f build: def VPATH when compiling `Python/sysmodule.c`
 55:  a9c7ebdb10d =  55:  e6387fa771f configure: correctly find native python
 56:  a88ebac0dcf =  56:  85a2e296658 build: Add extra flags for `_bootstrap_python`
 57:  86fe49a36c7 =  57:  e8eee9fe9bb getpath: add support for mingw
 58:  755a55247ae =  58:  9fe21ff0587 build: Don't build _posixsubprocess on Windows.
 59:  a6c9c95d9cd =  59:  6748d195654 ssl module: add MINGW support
 60:  a4786481cab =  60:  ac7b4668574 configure: Include `winsock.h` when checking for netdb function
 61:  42926e3068c =  61:  1639bdd7ff6 configure: always build _multiprocessing on Windows
 62:  d7a7bd8e5e7 =  62:  9c0c0583656 configure: build `mmap` module on win32
 63:  9b315c57d76 =  63:  b85d504c244 configure: set BUILDEXEEXT and EXEEXT
 64:  6eb9762d9aa =  64:  a42e95b2d16 configure: fix building some test modules
 65:  29059231661 =  65:  aa028a80199 Always convert `/` to `\\` before passing though pathcch functions
 66:  075c0b49412 =  66:  b4a547b10e0 pylifecycle.h: remove conflicting  _Py_CheckPython3 declaration
 67:  6ae609fe567 =  67:  e1956d6a840 dynload_win: add env var for reverting the legacy DLL loading paths
 68:  9d110eb3233 =  68:  3ed2a31ae4a dynload_win: Port GetPythonImport() to MINGW
 69:  b5bdf5b7ad9 =  69:  991f7ce4d14 dynload_win: make sure to only use backslashes for paths with LoadLibraryExW
 70:  a9aa7a88400 =  70:  6ceebf0043f dynload_win: don't run _Py_CheckPython3 for MINGW builds
 71:  895662ed099 =  71:  08e000d237b build: Build and install libpython3.dll (stable ABI)
 72:  38cc494bd28 =  72:  853ff1b8ed6 configure: define _DEBUG for a debug build
 73:  e42096084cd =  73:  4e22c2faa64 configure: fix multiprocessing module
 74:  054693ddb07 =  74:  be6948b930b build: add MINGW support for selectmodule
 75:  39bd3b9aa95 =  75:  ea3f4e68f87 configure: disable various modules on MINGW
 76:  02fbebbca7a =  76:  458d46c6983 configure: Add libraries to fix ctypes on MINGW
 77:  683cb5b62bc =  77:  24846dd50cd configure: Enable `_uuid` on MINGW
 78:  f0f8e8ccc29 =  78:  0b1a2da286b configure: make `incompatible-pointer-types` a warning
 79:  ae65d5bb519 =  79:  67067b9b815 tests: test_makefile: normalize path
 80:  03c78636ecf =  80:  94ec11016e1 Fix include naming for cross build
 81:  e3ba7b4aede =  81:  fb37b5322e4 Fix format warning
 82:  4a4285669ae =  82:  8e986d8ddf2 Fix pragma warnings
 83:  201956a9160 =  83:  feac4278b4d math, pyhash: MINGW support
 84:  22790586bd9 =  84:  381f5f2b067 tests: Fix test for library name
 85:  d6625c54aab =  85:  c06655ff8f0 dictobject: MINGW support
 86:  d6a5534349d =  86:  a5586b91c5e build: Fix export Py_GetBuildInfo symbol
 87:  0d469027277 =  87:  cbdbfdb2e53 build: Allow profile tests failure
 88:  26d4a70e2ce =  88:  056c2c7bbfa build: add support for building C++ modules.
 89:  af7ce0daa97 =  89:  9f0fca25bcd build: build/fix the wmi module
 90:  0f7c9fb6076 =  90:  bcb2c8a5425 Fix exports for _suggestions module
 91:  1f712c7fa48 =  91:  2798c158d00 compileall: Normalize paths
 92:  8868fca1bd5 =  92:  7fdb4f0fa60 configure: enable 64-bit time support for 32-bit build
 93:  b853df602fa =  93:  af85ed4f7e6 configure: Work around broken pc file
 94:  bc4e944e162 =  94:  b886510eeae makesetup: make sure a library path is passed when building modules
 95:  90df2b487de =  95:  f6853b5dbbf venv: also install the versioned launchers
 96:  835fa2e17ac =  96:  67bfce2880e configure: set _WIN32_WINNT version
 97:  92be3ec4eae =  97:  ff32539df24 tests: fix sysconfig.test_get_platform
 98:  1d43ef7d987 =  98:  8999a084efc pycore_time: fix missing timeval
 99:  72e9e7f8290 =  99:  109cbed29dc mmapmodule: define DONT_USE_SEH
100:  297d36b966c = 100:  cba00c9165a build: Add ABIFLAGS to targets when needed
101:  129d0719a07 = 101:  96c5b989946 sysconfig: patch nt schemes again
102:  e6255eb47cf = 102:  f4ad9cdee3f configure: define _PYTHREAD_NAME_MAXLEN for MINGW
103:  a592f9e3886 = 103:  84c47e3e5bf configure: allow older autoconf
104:  de133ae5c7a = 104:  276f023e216 tests: allow sys.abiflags to exist
105:  834f2f792f4 = 105:  c190a34daf7 configure: fix AC_PATH_TOOL usage
106:  38b01eb98ad = 106:  c1f383430ec makesetup: make sure to link the built libpython

Alexpux and others added 30 commits May 11, 2026 07:09
Co-authored-by: Naveen M K <[email protected]>
Co-authored-by: Алексей <[email protected]>
Co-authored-by: Christoph Reiter <[email protected]>
This is used throughout the Python code but is not defined
when compiling with Mingw-w64 compilers, so define it.
In MSVC these are defined in PC/pyconfig.h, we have to
define it manually because pyconfig.h is created by
autotools.

Co-authored-by: Алексей <[email protected]>
Co-authored-by: Christoph Reiter <[email protected]>
Co-authored-by: Naveen M K <[email protected]>
Co-authored-by: Алексей <[email protected]>
Co-authored-by: Christoph Reiter <[email protected]>
Largefile is supported on Windows.

Co-authored-by: Naveen M K <[email protected]>
Co-authored-by: Алексей <[email protected]>
Co-authored-by: Christoph Reiter <[email protected]>
Also, build `nt` module instead of `posix` when compiling
with MINGW.

Co-authored-by: Naveen M K <[email protected]>
Co-authored-by: Алексей <[email protected]>
Add PYD_PLATFORM_TAG to distinguish C extensions built with different
MinGW toolchain configurations. The tag follows the format:
  mingw_<cpu_arch>_<c_runtime>_<toolchain>

Where:
- cpu_arch: x86_64, i686, aarch64, or armv7
- c_runtime: ucrt or msvcrt
- toolchain: gnu or llvm

This prevents loading extensions built with incompatible configurations.

Co-authored-by: Naveen M K <[email protected]>
Try to match the format defined in pycore_importdl.h for Windows
MS_DLL_ID is used for sys.winver and Windows registry keys
Co-authored-by: Алексей <[email protected]>
Co-authored-by: Naveen M K <[email protected]>
Co-authored-by: Алексей <[email protected]>
Co-authored-by: lovetox <[email protected]>
Co-authored-by: Алексей <[email protected]>
Co-authored-by: Naveen M K <[email protected]>
This would possibly fix building wheels when mingw python
is used and would be unique to each python same as EXT_SUFFIX.

Signed-off-by: Naveen M K <[email protected]>
Co-authored-by: Алексей <[email protected]>
Co-authored-by: Naveen M K <[email protected]>
This is the case used in MINGW

Co-authored-by: Алексей <[email protected]>
Co-authored-by: Алексей <[email protected]>
Co-authored-by: Christoph Reiter <[email protected]>
Just like with MSVC. This fixes a test in test_ctypes.
Co-authored-by: Алексей <[email protected]>
Co-authored-by: Christoph Reiter <[email protected]>
This should avoid mixing of user site-packages between python
from various environments. Previously, the user site-packages
should be located at `~/.local/lib/python3.12` for all environment
including 32-bits variants which caused problems with 64-bit trying to
load 32-bit extensions. Now this path will be changed to
`~/.local/lib/python3.12-<platform tag here>`, for example, in
CLANG64 this would be `~/.local/lib/python3.12-mingw_x86_64_ucrt_llvm`.

Fixes #40
Co-authored-by: Алексей <[email protected]>
Co-authored-by: Christoph Reiter <[email protected]>
so there is no bash required to run it on Windows
os needs ntpath.sep, so define it before importing os

Co-authored-by: Алексей <[email protected]>
Co-authored-by: Christoph Reiter <[email protected]>
Co-authored-by: cat <[email protected]>
Co-authored-by: Naveen M K <[email protected]>
naveen521kk and others added 27 commits May 11, 2026 07:10
The casing and pathseps have to match, so a cross compiler
on Linux find the files.

Co-authored-by: Martin Storsjö <[email protected]>
Invalid "Libs:" value

Also it contains "-L." which is only used at build time by
makesetup and shouldn't be exposed.

python#138800
This is fallout from LIBPYTHON not inluding -L. anymore
Like on Linux we provide python3.x globally, so make
sure those also exist in the venv, so when python3.x is run
the venv version is launched and not the global one.
copy the logic from callproc.c
So we get different names for debug and free threaded builds
setuptools doesn't play along
value copied from the MSVC build config
We require autoreconf to run for the build, and we use
Ubuntu 24.04 for llvm which only ships 2.71. It looks like there
wasno real reason for upstream to require it, so this should be fine.
it's tied to the build system used and not Windows,
and it's used in various places we use such as python-config,
so improve the condition.
It passing "notfound" as the path parameter and not
as the fallback, so this never could have worked
with cross compiling.

Fixes CXX being set to "g++" instead of the cross compiler.

Should be upstreamed.
dependency libs might add system search paths first, so
make sure we link to libpython before that.
Otherwise we link to the system libpython if it already exists.
@lazka lazka merged commit c1f3834 into mingw-v3.14.5 May 11, 2026
28 checks passed
@lazka lazka deleted the wip/mingw-v3.14.5 branch May 11, 2026 06:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants