Skip to content

Conversation

@lazka
Copy link
Member

@lazka lazka commented Oct 10, 2025

git range-diff v3.12.11..mingw-v3.12.11 v3.12.12..wip/mingw-v3.12.12

  1:  6ba0de42da0 =   1:  3820da317a8 sysconfig: make _sysconfigdata.py relocatable
  2:  38561b67591 =   2:  2115fe6ff95 build: add --with-nt-threads and make it default on mingw
  3:  d565b952e65 =   3:  0f488f1213d Define `MS_WINDOWS` (and others) when compiling with MINGW
  4:  396c8847eda =   4:  ed0ed208960 configure: add `MACHDEP` and `platform` on MINGW
  5:  989e86b3b48 =   5:  86cc1d25993 Add default configuration for MINGW
  6:  b17d5e39dbc =   6:  f3a173acb94 configure: enable largefile support by default for Mingw
  7:  5f97c1f9acd =   7:  2c9f8d3885f Add `PC/` to `CPPFLAGS` and to `SRCDIRS` on Mingw
  8:  cda6ac76637 =   8:  2976481933b posixmodule.c: Define necessary headers for compiling on MINGW
  9:  8046053fef0 =   9:  4ef3c6fcfc1 Build winreg by default when compiling for MINGW
 10:  65a95395727 =  10:  6e8327cc3ab pyport.h: Add support for MINGW
 11:  17ac42a9e03 =  11:  0ff5f856a38 configure: add options so that shared build is possible on MINGW
 12:  3f6018afd94 =  12:  e5719bec6bd Add dynamic loading support for MINGW
 13:  1dd0573aac7 =  13:  69c4541a733 Ignore main program for frozen scripts on MINGW
 14:  9c79fca7a73 =  14:  477ada14d30 Detect winsock2 and setup _socket module on MINGW
 15:  a2f90025512 =  15:  d7e39c2227c Enable some windows specific modules
 16:  e8f2489cdc8 =  16:  407fcf09da4 sysconfig: MINGW build extensions with GCC
 17:  0d4ec3ee1ae =  17:  d6665e5343d sysconfig: treat MINGW builds as POSIX builds
 18:  3071b5192ab =  18:  2b1bb2c6dac Add support for stdcall without underscore
 19:  dc7508ee314 =  19:  877eab86d81 Customize site for MINGW
 20:  a3da6c38d96 =  20:  dcf5c715547 add python config sh
 21:  608ce98d369 =  21:  d11b445c7da mingw: prefer unix sep if MSYSTEM environment variable
 22:  061c843266b =  22:  3c642b927b9 msys cygwin semi native build sysconfig
 23:  99a6cac7eb2 =  23:  6b8582b407c sysconfig: mingw sysconfig like posix
 24:  e0ac3546061 =  24:  e6dd88b08f0 mingw use backslashes in compileall py
 25:  73e185f320f =  25:  1b0d7fda753 mingw pdcurses_ISPAD
 26:  b78fb154797 =  26:  c205e9912fd remove_path_max.default
 27:  a872b0c721d =  27:  037e878c48b dont link with gettext
 28:  8f7da60248a =  28:  893831ac31d ctypes python dll
 29:  dff5e634a9a =  29:  269aa8cd9ad gdbm module includes
 30:  86525e28956 =  30:  cb41ac70252 use gnu_printf in format
 31:  93979947206 =  31:  ac698395e3c mingw fix ssl dont use enum_certificates
 32:  be3f6f4ff43 =  32:  dbf3d4a853e fix using dllhandle and winver mingw
 33:  28bfd9dcda9 =  33:  6614b332854 Add AMD64 to sys config so msvccompiler get_build_version works
 34:  013c102dd2f =  34:  e20536fb7ac MINGW link with additional library
 35:  e1e7676fb6e =  35:  47a51bd876d install msilib
 36:  550b26d8426 =  36:  272a424a36f fix signal module build
 37:  cfdd9f74aef =  37:  3a96d1d80a5 build: build winconsoleio and _testconsole
 38:  4276906624d =  38:  bc6d357a914 expose sem_unlink
 39:  2d45102621b =  39:  0f752f55442 Use cygpty while using isatty
 40:  07aece0a501 =  40:  f01f0889085 build: link win resource files and build pythonw
 41:  fe710f6c733 =  41:  32e36bc1162 fix isselectable
 42:  f3c6343501e =  42:  4f10cdb8782 configure.ac: fix inet_pton check
 43:  52f1dd30b77 =  43:  0c9d32752bd pass gen profile ldflags
 44:  49c4354cf12 =  44:  08294f9fd95 pkg config windows must link ext with python lib
 45:  2df9f65c696 =  45:  4d35d4620d6 importlib bootstrap path sep
 46:  6c285f5e9b9 =  46:  e72a2378f85 warnings fixes
 47:  5eaa5ec6b5f =  47:  114ac5e4c23 fix build testinternalcapi
 48:  468ecaee879 =  48:  852ade1e64a clang arm64
 49:  1d05f487a39 =  49:  f598b5abe85 configure.ac: set MINGW stack reserve
 50:  d14cee31124 =  50:  a1d212c2c49 Don't use os.pathsep to find EOF not all distributions in win32 have them as \ instead check using sys.platform
 51:  231b2d4d380 =  51:  3033d58f6f3 Fix extension suffix for c-extensions on mingw
 52:  097c217e47e =  52:  8593bd4755f Change the `get_platform()` method in sysconfig
 53:  b8a2d27b763 =  53:  3e7467b231d build: Fix ncursesw include lookup
 54:  2e26b3e95ea =  54:  30836e7f007 tests: fix test_bytes
 55:  03671ce0bf4 =  55:  fcfa06e4e11 time: fix strftime not raising for invalid year values
 56:  8d8a7d89d49 =  56:  5e7f059b5d9 ctypes: find_library('c') should return None with ucrt
 57:  fcde121343d =  57:  0a7778d7bcf build: Disable checks for dlopen/dlfcn
 58:  c9f994502e2 =  58:  f661c24c323 Fix install location of the import library
 59:  5146f248c12 =  59:  4e033763394 build: Integrate venvlauncher build/installation into the Makefile
 60:  2a336b4478e =  60:  9ec9f0c5a7b configure.ac: set _WIN32_WINNT version
 61:  2ceeedcaf13 =  61:  025f2540005 configure.ac: don't check for clock_ functions
 62:  1cb7dcd8732 =  62:  f23f3fc51cd expanduser: normpath paths coming from env vars
 63:  23ec3fc8317 =  63:  1eaade51fb3 CI: test the build and add some mingw specific tests
 64:  42eaab00bb6 =  64:  04d4ccfa737 Define PY3_DLLNAME to fix build
 65:  41c2be507eb =  65:  e6ce651ac8a _testconsole.c: Fix casing & path sep
 66:  2c9a95669e3 =  66:  d8f8e18cf11 Return consistent architecture markers for python on mingw/armv7
 67:  c45f5f0f98a =  67:  01ea756b774 handle ncursesw pkg-config when cross-compiling
 68:  76fa04a3505 =  68:  99dbe205f23 mingw_smoketests: fix _UCRT condition
 69:  3debb2dd3a0 =  69:  12dd8cedd47 Modify `sys.winver` to match upstream
 70:  4283ac7a890 =  70:  5e148853344 Change user site-packages path to include the environment info
 71:  5410b83fa92 =  71:  077f7447d50 configure: Include a header in the check for _beginthread
 72:  c7f7a151a52 =  72:  d542017523f configure.ac: Default to --without-c-locale-coercion on Windows
 73:  3b22a18b72c =  73:  10be5ee7595 Fix failing tests
 74:  b31b52e48af =  74:  7f17ffbeccd Don't change os.sep with an empty MSYSTEM env var, not just a missing one
 75:  df24bb7652e =  75:  0aa1973ccba def VPATH when compiling `Python/sysmodule.c`
 76:  418477991a2 =  76:  2837bc7be64 Make `_Py_CheckPython3` extern
 77:  67b6568629d =  77:  aa75fc6c439 link with bcrypt
 78:  2726b17d9ed =  78:  05873e7473b correctly find native python
 79:  fa9ea58652b =  79:  5bf2fad675f Add extra flags for `_bootstrap_python`
 80:  9d6027c1cdd =  80:  0732ca86b6f posixmodule: undefine `HAVE_OPENDIR`
 81:  dc3cb94a0bc =  81:  f05f20c5be4 getpath.py: add support for mingw
 82:  3ac5f2fc5c3 =  82:  4bb41fcf910 Don't  build _posixsubprocess on Windows.
 83:  abc76648354 =  83:  a94b38e4741 `_ssl`: link with `ws2_32`
 84:  f1102c49003 =  84:  a0da3ca2051 Always normalize path in abspath
 85:  a54560597e2 =  85:  ec73278098a Include `winsock.h` when checking for netdb function
 86:  97bbe1f347c =  86:  2888fff678b include `_multiprocessing/semaphore.c` on win32
 87:  c2545fb9dfe =  87:  a778e3ff80c configure: build `mmap` module on win32
 88:  1441e1caba6 =  88:  6c6ab847e6a venv creation fixes
 89:  117dc5b8a35 =  89:  cd38b416953 move the `shutdown` function where `winsock.h` is included
 90:  0cce81ea6f0 =  90:  672b0b08c96 configure.ac: set BUILDEXEEXT and EXEEXT
 91:  0b0a72541f5 =  91:  21653df0470 configure.ac: fix building some test modules
 92:  a27d2bb96d5 =  92:  bd0bf6c5447 Don't convert `sysconfig.get_config_var('VPATH')` to an absolute path
 93:  e7b37fa1777 =  93:  ac3e6cf2a90 Always convert `/` to `\\` before passing though pathcch functions
 94:  a935bf37197 =  94:  cda1f366679 Build venvlauncher.exe from PC/launcher.c
 95:  8dd0930f7dd =  95:  16a48fca4ea getpath.py: fix `dirname`
 96:  1f2a2898c05 =  96:  f8523063e6d getpath: use normpath on all generated paths
 97:  b0908f8b64b =  97:  00d11588b95 pathconfig: normpath sys.path[0]
 98:  38612d894aa =  98:  99d67c56451 smoketests: add some tests for sys/site paths
 99:  066c14bd214 =  99:  480b3a1ff99 Search DLLs only on paths added using `add_dll_directory()`.
100:  7347577f01a = 100:  016327ca538 Build and install libpython3.dll
101:  f78fc1f81a1 = 101:  f72f52c9d19 Port GetPythonImport() to mingw
102:  8d63ba224d9 = 102:  4538f351001 LoadLibraryExW: make sure to only use backslashes for paths
103:  34d859b152e = 103:  c7e9b9f4c5c mingw_smoketests: add a test to check if sysconfig returns correct values for `LIBDIR`
104:  618b83dd7e7 = 104:  23c180a7c8b Add missing library for multiprocessing module
105:  0f110546b3a = 105:  aaee576929e selectmodule: add support for MINGW
106:  1e2a68ccfaa = 106:  31f7d79691b readline: disable on MINGW
107:  6fa96e4de4f = 107:  aba641db02f Add libraries to fix compile of ctypes on MINGW
108:  6fbd5316a04 = 108:  f95f4f4f0be Add `-lpython<version>` while linking stdlib
109:  6843f1f35a1 = 109:  b2eab751414 Enable `_uuid` on MINGW
110:  ffe1a51f595 = 110:  dceead90dec Enable curses library on MINGW
111:  81fdef62bb3 = 111:  62ef1e650f6 mingw_smoketests: disable distutils related tests
112:  ce67dc2ec03 = 112:  9e56012dda8 configure.ac: use autoconf 2.69
113:  494b9665344 = 113:  b67e3c67e65 CI: clean up ignored tests
114:  8e9d8cda56d = 114:  9638204b854 gcc: make `incompatible-pointer-types` as warning
115:  d48b2d21436 = 115:  613d98133c7 test_makefile: normalize path
116:  753581b306e = 116:  c4e2de6cd7e `sysconfig.get_platform()`: use consistent naming
117:  ce5f345ca13 = 117:  cc8c05c2720 Add ucrt to version string
118:  33a869a80d7 = 118:  dee2b16fa1a socketmodule: fix captilization of headers
119:  884f1500fd1 = 119:  b86949a91b2 mingw_smoketests: build extension in a venv
120:  8f366d6aef7 = 120:  963fcc79deb venvlauncher: try looking for the versioned .exe first and then fall back
121:  3fbe82e92e9 = 121:  9aec508e729 CI: update actions
122:  4fd52baa016 = 122:  56fd36b36cb CI: test CLANGARM64
123:  5248fdecf1a = 123:  e15c2cc1ec9 CI: disable pkg-config
124:  c5867c24c13 = 124:  9ea3a72c3dc CI: stop testing armv7, no longer possible
125:  7dce92d49c2 = 125:  9e124264a09 venv: install batch scripts
126:  ecf33389138 = 126:  5f118e45198 winreg: patch cleanup
  -:  ----------- > 127:  e96148690e1 CI: use a newer ubuntu for the cross build

mingwandroid and others added 30 commits October 10, 2025 08:25
Co-authored-by: Алексей <[email protected]>
Co-authored-by: lovetox <[email protected]>
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]>
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: Алексей <[email protected]>
Co-authored-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]>
Co-authored-by: Алексей <[email protected]>
Co-authored-by: Christoph Reiter <[email protected]>
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]>
Co-authored-by: Алексей <[email protected]>
Co-authored-by: Алексей <[email protected]>
Co-authored-by: Алексей <[email protected]>
Co-authored-by: Алексей <[email protected]>
Co-authored-by: Christoph Reiter <[email protected]>
Co-authored-by: Алексей <[email protected]>
Co-authored-by: Алексей <[email protected]>
lazka and others added 27 commits October 10, 2025 08:25
This looks for DLL names in the import table but while with MSVC the DLL
is named python311.dll in our case it is named libpython3.11.dll.
Adjust the strings and lengths accordingly.
It seems like in case the path passed to it is absolute, but contains
forward slashes then LOAD_LIBRARY_SEARCH_DLL_LOAD_DIR does not work
and DLLs in the same directory as the extension are not considered.

This occurs in our fork because in MSYS2-mode the extension loader will
normalize to forward slashes before.

Normalize everything to backslashes again before passing it to LoadLibraryExW.

Fixes #151
`ws2_32` is required when building that module
Generalize the `MINGW` case.
In theory, it should be correct for other system too
and would fix cross-compilation
llvm-mingw only has autoconf 2.69
Remove tests which are passing now, or no longer exist, and
move tests which only fail with msvcrt into a separate file.
gcc 14 changed `incompatible-pointer-types` from warning to error
for now, make it as warning to avoid build failure
so that it passes on mingw
Currently, the platform names are hardcoded in many places,
and are not named consistently. This commit fixes it by
standardizing the names to be returned by `sysconfig.get_platform`.
The naming is based on #167 (comment)

Similarly, `EXT_SUFFIX` is also standardized to be consistent with the platform names.

Signed-off-by: Naveen M K <[email protected]>
`Rpc` should be `rpc`. It error's out in
cross-compilation.
ensurepip no longer works since we implement PEP 668, so do
everything in a venv.
…back

By default venvlauncher only looks for python.exe in the python "home",
which fails in the MSYS2 case where there could be multiple python versions
in the same prefix i.e. python.exe could be 3.12 while the venv was created
with python3.13.exe.

Upstream CPython doesn't have this problem since they never have multiple
Python versions in the same prefix.

On the other hand the Python test suite (test_sysconfig specifically) creates
a venv for the uninstalled Python build dir, where only python.exe exists.

To cover both cases we first try to look for the python3.XY.exe and then
fall back to python.exe.
test cross-compiled arm builds too
to avoid it finding build machine packages
The GHA provided runner now runs a newer Windows version
which no longer allows running armv7 binaries, so stop
testing them there.

Same as with
mingw-w64/mingw-w64@e6535ce604431e885
* REG_LEGAL_CHANGE_FILTER is part of mingw-w64 now
* SIZEOF_HKEY is defined already
* use the same build logic as with other win32 only modules

Needs to be merged into "Build winreg by default when compiling for MINGW"

Fixes #181
@lazka lazka marked this pull request as ready for review October 10, 2025 07:21
@lazka lazka merged commit e961486 into mingw-v3.12.12 Oct 10, 2025
28 checks passed
@lazka lazka deleted the wip/mingw-v3.12.12 branch October 10, 2025 08:13
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.

10 participants