-
Notifications
You must be signed in to change notification settings - Fork 14
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
Update to v3.12.8 #184
Update to v3.12.8 #184
Conversation
Co-authored-by: Алексей <alexey.pawlow@gmail.com> Co-authored-by: lovetox <8661218+lovetox@users.noreply.github.com>
Co-authored-by: Naveen M K <naveen521kk@gmail.com> Co-authored-by: Алексей <alexey.pawlow@gmail.com> Co-authored-by: Christoph Reiter <reiter.christoph@gmail.com>
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: Алексей <alexey.pawlow@gmail.com> Co-authored-by: Christoph Reiter <reiter.christoph@gmail.com> Co-authored-by: Naveen M K <naveen521kk@gmail.com>
Co-authored-by: Алексей <alexey.pawlow@gmail.com>
Co-authored-by: Алексей <alexey.pawlow@gmail.com> Co-authored-by: Christoph Reiter <reiter.christoph@gmail.com>
Largefile is supported on Windows. Co-authored-by: Naveen M K <naveen521kk@gmail.com> Co-authored-by: Алексей <alexey.pawlow@gmail.com> Co-authored-by: Christoph Reiter <reiter.christoph@gmail.com>
Co-authored-by: Naveen M K <naveen521kk@gmail.com>
Also, build `nt` module instead of `posix` when compiling with MINGW. Co-authored-by: Naveen M K <naveen521kk@gmail.com> Co-authored-by: Алексей <alexey.pawlow@gmail.com>
Co-authored-by: Алексей <alexey.pawlow@gmail.com> Co-authored-by: Christoph Reiter <reiter.christoph@gmail.com> Co-authored-by: Naveen M K <naveen521kk@gmail.com>
Co-authored-by: Алексей <alexey.pawlow@gmail.com>
Co-authored-by: Naveen M K <naveen521kk@gmail.com>
Co-authored-by: Алексей <alexey.pawlow@gmail.com>
Co-authored-by: Алексей <alexey.pawlow@gmail.com>
Co-authored-by: Алексей <alexey.pawlow@gmail.com> Co-authored-by: Naveen M K <naveen521kk@gmail.com>
Co-authored-by: Алексей <alexey.pawlow@gmail.com> Co-authored-by: Naveen M K <naveen521kk@gmail.com>
This is the case used in MINGW Co-authored-by: Алексей <alexey.pawlow@gmail.com>
Co-authored-by: Алексей <alexey.pawlow@gmail.com> Co-authored-by: Christoph Reiter <reiter.christoph@gmail.com>
Co-authored-by: Алексей <alexey.pawlow@gmail.com> Co-authored-by: Christoph Reiter <reiter.christoph@gmail.com>
Co-authored-by: Алексей <alexey.pawlow@gmail.com> Co-authored-by: Christoph Reiter <reiter.christoph@gmail.com> Co-authored-by: cat <cat@wolfgirl.org> Co-authored-by: Naveen M K <naveen521kk@gmail.com>
Co-authored-by: Алексей <alexey.pawlow@gmail.com>
Co-authored-by: Алексей <alexey.pawlow@gmail.com>
Co-authored-by: Алексей <alexey.pawlow@gmail.com>
Co-authored-by: Алексей <alexey.pawlow@gmail.com>
Co-authored-by: Алексей <alexey.pawlow@gmail.com>
Co-authored-by: Алексей <alexey.pawlow@gmail.com> Co-authored-by: Christoph Reiter <reiter.christoph@gmail.com>
Co-authored-by: Алексей <alexey.pawlow@gmail.com>
Co-authored-by: Алексей <alexey.pawlow@gmail.com>
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
…lues for `LIBDIR`
`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 <naveen521kk@gmail.com>
`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.
b1ba0d3
to
89a863a
Compare
This should be ready, if someone wants to have another look. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
run: | | ||
set -ex | ||
|
||
if [[ "${{ matrix.msystem }}" == "CLANG64" ]]; then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if [[ "${{ matrix.msystem }}" == "CLANG64" ]]; then | |
if [[ "${{ matrix.msystem }}" == CLANG* ]]; then |
Make things a little easier once Github gets Windows ARM64 runners, or if I try to run this CI on ARM64 (I have a fork of this in msys2-arm for this, but I haven't tried the CI or updated it in a long time). Not important right now though
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks, added in 0c2da1f
rebase summary:
range-diff:
1: 4a8d395 = 1: 6e53e07 sysconfig: make _sysconfigdata.py relocatable
2: 3c81b77 = 2: 004e1ff build: add --with-nt-threads and make it default on mingw
3: 42413c7 = 3: 92d3653 Define
MS_WINDOWS
(and others) when compiling with MINGW4: f1879c5 = 4: 883a85c configure: add
MACHDEP
andplatform
on MINGW5: a054a8a = 5: 7a2547a Add default configuration for MINGW
6: 671bba9 = 6: d170c8d configure: enable largefile support by default for Mingw
7: bf7f62d = 7: 8226487 Add
PC/
toCPPFLAGS
and toSRCDIRS
on Mingw8: dafdc1b = 8: 93d7e58 posixmodule.c: Define necessary headers for compiling on MINGW
9: 15a5dad = 9: a72aea3 Build winreg by default when compiling for MINGW
10: 2d11563 = 10: 3e53dcd pyport.h: Add support for MINGW
11: be8aa60 = 11: 3b34537 configure: add options so that shared build is possible on MINGW
12: 09471b0 = 12: 1425ec7 Add dynamic loading support for MINGW
13: ea6e717 = 13: cceedf3 Ignore main program for frozen scripts on MINGW
14: 05ceac5 = 14: d0873e9 Detect winsock2 and setup _socket module on MINGW
15: f473d72 = 15: 2605e1b Enable some windows specific modules
16: c01bb08 = 16: f5dbcdc sysconfig: MINGW build extensions with GCC
17: cd15677 = 17: aa59974 sysconfig: treat MINGW builds as POSIX builds
18: 220f2dc = 18: 706821c Add support for stdcall without underscore
19: ccdfae7 = 19: 8a5eb2b Customize site for MINGW
20: 72dfb2e = 20: 6fd092a add python config sh
21: 65654bb = 21: a0fd237 mingw: prefer unix sep if MSYSTEM environment variable
22: d71e85e = 22: 753c3a1 msys cygwin semi native build sysconfig
23: 5a05284 = 23: 5794834 sysconfig: mingw sysconfig like posix
24: a5d4910 = 24: 3c6af1e mingw use backslashes in compileall py
25: 44cb5d5 = 25: 230daac mingw pdcurses_ISPAD
26: 68ec430 = 26: 5a446a3 remove_path_max.default
27: 64e47b9 = 27: 0002c10 dont link with gettext
28: de7a2e2 = 28: c715c77 ctypes python dll
29: f1a10b3 = 29: e6a160a gdbm module includes
30: 7f0ba81 = 30: 9a62a0d use gnu_printf in format
31: 9f9d5bb = 31: 69372bf mingw fix ssl dont use enum_certificates
32: 2a2fbb4 = 32: 734aa9f fix using dllhandle and winver mingw
33: 0772986 = 33: f8a56fc Add AMD64 to sys config so msvccompiler get_build_version works
34: c5caa58 = 34: 257203f MINGW link with additional library
35: 9f7dd2f = 35: f9ca1aa install msilib
36: fec761c = 36: d417260 fix signal module build
37: 5ac0208 = 37: 856a3ea build: build winconsoleio and _testconsole
38: fd2e1bc = 38: 5ffc235 expose sem_unlink
39: 44436d0 = 39: 5bfa4e2 Use cygpty while using isatty
40: 740d67e = 40: 97b2e73 build: link win resource files and build pythonw
41: bbae912 = 41: 7f1af45 fix isselectable
42: 22c2abd = 42: f5801d3 configure.ac: fix inet_pton check
43: 32e78e6 = 43: 52e968b pass gen profile ldflags
44: 04d6293 = 44: 3b94f15 pkg config windows must link ext with python lib
45: b7d4115 = 45: 56b67bf importlib bootstrap path sep
46: cf1f123 = 46: 6f1feb3 warnings fixes
47: 5bb916e = 47: 3aa096a fix build testinternalcapi
48: 314f536 = 48: a2f2c91 clang arm64
49: cfd661b = 49: 479bff7 configure.ac: set MINGW stack reserve
50: 3d624dd = 50: 1d23191 Don't use os.pathsep to find EOF not all distributions in win32 have them as \ instead check using sys.platform
51: 5cb8a2d = 51: 1e9ed85 Fix extension suffix for c-extensions on mingw
52: ea82ff0 = 52: 6c14f00 Change the
get_platform()
method in sysconfig53: 2973a8d = 53: dfd6bd9 build: Fix ncursesw include lookup
54: d286353 = 54: 1298245 tests: fix test_bytes
55: f3cd8cb = 55: 9259b0c time: fix strftime not raising for invalid year values
56: ae09c3d = 56: b4444bd ctypes: find_library('c') should return None with ucrt
57: ff315f2 = 57: fad7052 build: Disable checks for dlopen/dlfcn
58: f33728f = 58: 0ab86d6 Fix install location of the import library
59: 0ff5c3a = 59: e88217f build: Integrate venvlauncher build/installation into the Makefile
60: 484da00 = 60: 123a800 configure.ac: set WIN32_WINNT version
61: 7326d72 = 61: 49150d2 configure.ac: don't check for clock functions
62: 60503cf = 62: f7860c2 expanduser: normpath paths coming from env vars
63: f26c3a7 ! 63: a72cd5b CI: test the build and add some mingw specific tests
64: 22ea3b9 = 64: 65c3668 Define PY3_DLLNAME to fix build
65: 20802e7 = 65: f23e5a5 _testconsole.c: Fix casing & path sep
66: e85a149 = 66: 2357033 Return consistent architecture markers for python on mingw/armv7
67: 87a1df4 = 67: 8cc4b86 handle ncursesw pkg-config when cross-compiling
68: f0ff4f0 = 68: 5705398 mingw_smoketests: fix _UCRT condition
69: b48b814 = 69: a3eb5e6 Modify
sys.winver
to match upstream70: 2f96a6e = 70: f10cabe Change user site-packages path to include the environment info
71: 339707b = 71: 281fc9e configure: Include a header in the check for _beginthread
72: 81aa1b0 = 72: ca5c39c configure.ac: Default to --without-c-locale-coercion on Windows
73: 412c21b = 73: f18c6cf Fix failing tests
74: bb7209b = 74: 087bf9f Don't change os.sep with an empty MSYSTEM env var, not just a missing one
75: 318a070 = 75: 3a36af7 def VPATH when compiling
Python/sysmodule.c
76: 871d881 = 76: ab49f83 Make
_Py_CheckPython3
extern77: a2ba9c5 = 77: 68b9c41 link with bcrypt
78: c8afcec = 78: e89d5f0 correctly find native python
79: 0fb0097 = 79: cc6837a Add extra flags for
_bootstrap_python
80: 98f1f17 = 80: fd3ce87 posixmodule: undefine
HAVE_OPENDIR
81: 24a611b = 81: fa77e47 getpath.py: add support for mingw
82: 4111e19 = 82: 3634e1a Don't build _posixsubprocess on Windows.
83: 39de827 = 83: ec4fd85
_ssl
: link withws2_32
84: 39a6ecd < -: ----------- Always normalize path in abspath
-: ----------- > 84: 562a809 Always normalize path in abspath
85: ad30c7c = 85: 8e18b56 Include
winsock.h
when checking for netdb function86: 411b29a = 86: 0d0545b include
_multiprocessing/semaphore.c
on win3287: 561337e = 87: 79701e7 configure: build
mmap
module on win3288: 09aed69 ! 88: 6cc41eb venv creation fixes
89: 3a58820 = 89: aa807fb move the
shutdown
function wherewinsock.h
is included90: 914dea1 = 90: d7174a4 configure.ac: set BUILDEXEEXT and EXEEXT
91: 4208da1 = 91: 56752ce configure.ac: fix building some test modules
92: f84d9d6 = 92: 28feb9b Don't convert
sysconfig.get_config_var('VPATH')
to an absolute path93: 8e5c34e = 93: e08bdfa Always convert
/
to\\
before passing though pathcch functions94: 663a1c1 ! 94: 4015e38 Build venvlauncher.exe from PC/launcher.c
95: f2b584c = 95: 107baa2 getpath.py: fix
dirname
96: aa0f5c2 = 96: 89cb39b getpath: use normpath on all generated paths
97: f16eb98 = 97: bf82e70 pathconfig: normpath sys.path[0]
98: 8348472 = 98: ddec200 smoketests: add some tests for sys/site paths
99: 6070b1f = 99: 1808c63 Search DLLs only on paths added using
add_dll_directory()
.100: 721a85f = 100: 8929351 Build and install libpython3.dll
101: e74ab76 = 101: ef9c4da Port GetPythonImport() to mingw
102: f83a7ef = 102: 62cf358 LoadLibraryExW: make sure to only use backslashes for paths
103: 159450e = 103: 354fb9a mingw_smoketests: add a test to check if sysconfig returns correct values for
LIBDIR
104: 09910ad = 104: 04b22fb Add missing library for multiprocessing module
105: 50fcc03 = 105: b5d8b48 selectmodule: add support for MINGW
106: e1b9aa2 = 106: 2403d13 readline: disable on MINGW
107: fbe52ab = 107: 91c3ddc Add libraries to fix compile of ctypes on MINGW
108: 6af733e = 108: a347f03 Add
-lpython<version>
while linking stdlib109: 00004b9 = 109: f2d18c9 Enable
_uuid
on MINGW110: bc4f761 = 110: 320b69d Enable curses library on MINGW
111: bdbcef4 = 111: a291629 mingw_smoketests: disable distutils related tests
112: 68bc9c9 < -: ----------- mingw_smoketests: skip test_c_ext_build for in-tree builds
113: 8b50957 = 112: 3e03999 configure.ac: use autoconf 2.69
114: 4954c90 = 113: 5e1c900 CI: clean up ignored tests
115: 7338795 ! 114: 8ec255d gcc: make
incompatible-pointer-types
as warning116: 14e3115 = 115: 4da1185 test_makefile: normalize path
117: 90634a8 = 116: e562cb6
sysconfig.get_platform()
: use consistent naming118: 6bedee2 = 117: b997ff0 Add ucrt to version string
119: d21f60d = 118: ce4c03d socketmodule: fix captilization of headers
-: ----------- > 119: dc84ce3 mingw_smoketests: build extension in a venv
-: ----------- > 120: 89a863a venvlauncher: try looking for the versioned .exe first and then fall back