From 3b77504fba28e360396dfa291903074a250ecf63 Mon Sep 17 00:00:00 2001 From: Christoph Reiter Date: Sat, 10 Jul 2021 17:31:46 +0200 Subject: [PATCH] python: Update to 3.9.6 --- .../.gitignore | 0 ...0-make-_sysconfigdata.py-relocatable.patch | 41 - ...e_args-using-subprocess-list2cmdline.patch | 50 -- ...1-make-_sysconfigdata.py-relocatable.patch | 0 .../0002-restore-setup-config.patch | 80 +- .../0003-MINGW-BASE-use-NT-thread-model.patch | 0 ...gcc-internal-defines-to-python-platf.patch | 0 ...igure-MACHDEP-and-platform-for-build.patch | 0 ...0006-MINGW-preset-configure-defaults.patch | 0 ...largefile-support-for-windows-builds.patch | 0 ...0008-MINGW-add-srcdir-PC-to-CPPFLAGS.patch | 0 .../0009-MINGW-init-system-calls.patch | 0 ...INGW-build-in-windows-modules-winreg.patch | 0 ...etermine-if-pwdmodule-should-be-used.patch | 0 ...ler-customize-mingw-cygwin-compilers.patch | 0 ...0013-MINGW-compiler-enable-new-dtags.patch | 0 ...-Mingw-recognition-to-pyport.h-to-al.patch | 0 ...015-MINGW-configure-for-shared-build.patch | 0 .../0016-MINGW-dynamic-loading-support.patch | 0 ...nore-main-program-for-frozen-scripts.patch | 0 ...-MINGW-setup-_multiprocessing-module.patch | 0 .../0019-MINGW-setup-select-module.patch | 0 ...up-_ctypes-module-with-system-libffi.patch | 0 ...ct-winsock2-and-setup-_socket-module.patch | 0 ...0022-MINGW-exclude-unix-only-modules.patch | 0 ...NGW-setup-msvcrt-and-_winapi-modules.patch | 0 ...0024-MINGW-build-extensions-with-GCC.patch | 0 ...2CCompiler-as-default-compiler-for-m.patch | 0 .../0026-MINGW-find-import-library.patch | 0 .../0027-MINGW-setup-_ssl-module.patch | 0 ...ation-of-posix-build-in-sysconfig.py.patch | 0 ...W-support-stdcall-without-underscore.patch | 0 ...ead-rename-to-avoid-failure-on-windo.patch | 0 ...ular-dependency-from-time-module-dur.patch | 0 ...tion-of-posix-build-in-distutils-sys.patch | 0 .../0033-MINGW-customize-site.patch | 0 .../0034-add-python-config-sh.patch | 0 .../0035-cross-darwin-feature.patch | 0 ...036-py3k-mingw-ntthreads-vs-pthreads.patch | 0 .../0037-mingw-system-libffi.patch | 0 ...sys-mingw-prefer-unix-sep-if-MSYSTEM.patch | 0 .../0039-mingw-use-posix-getpath.patch | 0 ...mingw-add-ModuleFileName-dir-to-PATH.patch | 0 ...dd-BUILDIN_WIN32_MODULEs-time-msvcrt.patch | 0 ...s-cygwin-semi-native-build-sysconfig.patch | 0 .../0043-mingw-sysconfig-like-posix.patch | 0 ..._builtin_for_Popen_in_cygwinccompile.patch | 0 ...d-multiarch-paths-if-cross-compiling.patch | 0 ...ngw-use-backslashes-in-compileall-py.patch | 0 ...-msys-convert_path-fix-and-root-hack.patch | 0 .../0048-allow-static-tcltk.patch | 0 .../0049-mingw-pdcurses_ISPAD.patch | 0 .../0050-grammar-fixes.patch | 0 .../0051-builddir-fixes.patch | 0 ...sys-monkeypatch-os-system-via-sh-exe.patch | 0 ...place-slashes-used-in-io-redirection.patch | 0 .../0054-mingw-install-layout-as-posix.patch | 0 .../0055-remove_path_max.default.patch | 0 .../0056-dont-link-with-gettext.patch | 0 .../0057-ctypes-python-dll.patch | 0 .../0058-gdbm-module-includes.patch | 0 .../0059-use-gnu_printf-in-format.patch | 0 ...w-fix-ssl-dont-use-enum_certificates.patch | 0 .../0061-mingw-build-optimized-ext.patch | 0 ...mpiler-dont-strip-modules-if-pydebug.patch | 0 ...fix-using-dllhandle-and-winver-mingw.patch | 0 ...0064-mingw-add-LIBPL-to-library-dirs.patch | 0 ...-config-so-msvccompiler-get_build_ve.patch | 0 ...6-MINGW-link-with-additional-library.patch | 0 .../0067-install-msilib.patch | 0 ...068-dont-include-system-ncurses-path.patch | 0 .../0069-fix-signal-module-build.patch | 0 .../0070-build-winconsoleio.patch | 0 .../0071-expose-sem_unlink.patch | 0 .../0072-cygpty-isatty.patch | 0 .../0073-disable-broken-gdbm-module.patch | 0 ...win-resource-files-and-build-pythonw.patch | 0 .../0075-3.7-mpdec-mingw.patch | 0 .../0076-disable-readline.patch | 0 .../0077-fix-isselectable.patch | 0 ...78-use-_wcsnicmp-instead-wcsncasecmp.patch | 0 .../0079-_xxsubinterpretersmodule.patch | 0 .../0080-sqlite3-module-defines.patch | 0 .../0081-configure-have-inet-pton.patch | 0 .../0082-fix-msvc9-import.patch | 0 .../0083-set-venv-activate-path-unix.patch | 0 .../0084-venv-creation-fixes.patch | 0 .../0085-pass-gen-profile-ldflags.patch | 0 ...tutils-add-windmc-to-cygwinccompiler.patch | 0 ...indows-must-link-ext-with-python-lib.patch | 0 .../0088-importlib-bootstrap-path-sep.patch | 0 .../0089-pathlib-path-sep.patch | 0 .../0090-warnings-fixes.patch | 0 .../0091-fix-build-testinternalcapi.patch | 0 .../0092-extend-MS_WINDOWS-flag.patch | 0 .../0093-clang-arm64.patch | 0 .../0094-MINGW-stack-reserve.patch | 0 ...Add-support-for-Windows-7-Python-3.9.patch | 0 ...097-Don-t-use-os.pathsep-to-find-EOF.patch | 0 ...ion-suffix-for-c-extensions-on-mingw.patch | 0 ...latform-method-in-sysconfig-and-dist.patch | 0 .../0100-MINGW-BASE-use-NT-thread-model.patch | 211 ----- .../0103-squash-Fixup-.rc-handling.patch | 0 .../0104-squash-Set-MS_DLL_ID.patch | 0 .../0107-squash-fix-srcdir-builddir.patch | 0 ...gcc-internal-defines-to-python-platf.patch | 25 - ...igure-MACHDEP-and-platform-for-build.patch | 61 -- ...0140-MINGW-preset-configure-defaults.patch | 63 -- ...largefile-support-for-windows-builds.patch | 24 - ...0170-MINGW-add-srcdir-PC-to-CPPFLAGS.patch | 25 - .../0180-MINGW-init-system-calls.patch | 99 --- ...INGW-build-in-windows-modules-winreg.patch | 56 -- ...etermine-if-pwdmodule-should-be-used.patch | 42 - ...ler-customize-mingw-cygwin-compilers.patch | 36 - ...0260-MINGW-compiler-enable-new-dtags.patch | 19 - ...-Mingw-recognition-to-pyport.h-to-al.patch | 62 -- ...300-MINGW-configure-for-shared-build.patch | 51 -- .../0310-MINGW-dynamic-loading-support.patch | 81 -- ...nore-main-program-for-frozen-scripts.patch | 32 - ...-MINGW-setup-_multiprocessing-module.patch | 16 - .../0360-MINGW-setup-select-module.patch | 40 - ...up-_ctypes-module-with-system-libffi.patch | 26 - ...ct-winsock2-and-setup-_socket-module.patch | 144 ---- ...0390-MINGW-exclude-unix-only-modules.patch | 76 -- ...NGW-setup-msvcrt-and-_winapi-modules.patch | 69 -- ...0410-MINGW-build-extensions-with-GCC.patch | 57 -- ...2CCompiler-as-default-compiler-for-m.patch | 52 -- .../0430-MINGW-find-import-library.patch | 11 - .../0440-MINGW-setup-_ssl-module.patch | 12 - ...ation-of-posix-build-in-sysconfig.py.patch | 61 -- ...W-support-stdcall-without-underscore.patch | 34 - ...ead-rename-to-avoid-failure-on-windo.patch | 12 - ...ular-dependency-from-time-module-dur.patch | 19 - ...tion-of-posix-build-in-distutils-sys.patch | 76 -- .../0490-MINGW-customize-site.patch | 38 - .../0500-add-python-config-sh.patch | 143 ---- .../0510-cross-darwin-feature.patch | 120 --- ...520-py3k-mingw-ntthreads-vs-pthreads.patch | 43 - .../0530-mingw-system-libffi.patch | 14 - ...sys-mingw-prefer-unix-sep-if-MSYSTEM.patch | 377 --------- .../0560-mingw-use-posix-getpath.patch | 401 ---------- ...mingw-add-ModuleFileName-dir-to-PATH.patch | 40 - ...dd-BUILDIN_WIN32_MODULEs-time-msvcrt.patch | 9 - ...s-cygwin-semi-native-build-sysconfig.patch | 104 --- .../0620-mingw-sysconfig-like-posix.patch | 64 -- ...builtin_for_Popen_in_cygwinccompiler.patch | 61 -- ...x86_64-size_t-format-specifier-pid_t.patch | 12 - ...d-multiarch-paths-if-cross-compiling.patch | 15 - ...ngw-use-backslashes-in-compileall-py.patch | 12 - ...-msys-convert_path-fix-and-root-hack.patch | 93 --- .../0690-allow-static-tcltk.patch | 69 -- .../0720-mingw-pdcurses_ISPAD.patch | 17 - mingw-w64-python/0740-grammar-fixes.patch | 25 - mingw-w64-python/0750-builddir-fixes.patch | 49 -- ...sys-monkeypatch-os-system-via-sh-exe.patch | 21 - ...place-slashes-used-in-io-redirection.patch | 59 -- .../0800-mingw-install-layout-as-posix.patch | 29 - .../0810-remove_path_max.default.patch | 11 - .../0820-dont-link-with-gettext.patch | 40 - mingw-w64-python/0830-ctypes-python-dll.patch | 14 - .../0840-gdbm-module-includes.patch | 12 - .../0850-use-gnu_printf-in-format.patch | 45 -- ...w-fix-ssl-dont-use-enum_certificates.patch | 21 - .../0890-mingw-build-optimized-ext.patch | 16 - ...mpiler-dont-strip-modules-if-pydebug.patch | 12 - ...fix-using-dllhandle-and-winver-mingw.patch | 21 - ...0920-mingw-add-LIBPL-to-library-dirs.patch | 12 - ...msvccompiler-get_build_version-works.patch | 27 - ...0-MINGW-link-with-additional-library.patch | 19 - mingw-w64-python/1010-install-msilib.patch | 11 - ...060-dont-include-system-ncurses-path.patch | 22 - .../1620-fix-signal-module-build.patch | 12 - .../1630-build-winconsoleio.patch | 12 - mingw-w64-python/1650-expose-sem_unlink.patch | 12 - mingw-w64-python/1700-cygpty-isatty.patch | 417 ---------- .../1701-disable-broken-gdbm-module.patch | 12 - ...win-resource-files-and-build-pythonw.patch | 91 --- mingw-w64-python/1810-3.7-mpdec-mingw.patch | 12 - mingw-w64-python/1850-disable-readline.patch | 15 - mingw-w64-python/1860-fix-isselectable.patch | 12 - ...70-use-_wcsnicmp-instead-wcsncasecmp.patch | 12 - .../1890-_xxsubinterpretersmodule.patch | 11 - .../2010-configure-have-inet-pton.patch | 18 - mingw-w64-python/2030-fix-msvc9-import.patch | 21 - .../2051-set-venv-activate-path-unix.patch | 12 - .../2052-venv-creation-fixes.patch | 62 -- .../2060-pass-gen-profile-ldflags.patch | 12 - ...tutils-add-windmc-to-cygwinccompiler.patch | 44 -- ...indows-must-link-ext-with-python-lib.patch | 20 - .../3000-importlib-bootstrap-path-sep.patch | 14 - mingw-w64-python/3001-pathlib-path-sep.patch | 11 - .../3011-fix-build-testinternalcapi.patch | 14 - .../3020-extend-MS_WINDOWS-flag.patch | 11 - mingw-w64-python/4000-clang-arm64.patch | 46 -- mingw-w64-python/5000-warnings-fixes.patch | 115 --- mingw-w64-python/PKGBUILD | 747 +++++++++--------- .../README.md | 0 .../update-patches.sh | 0 .../0002-restore-setup-config.patch | 82 -- mingw-w64-python3.9/PKGBUILD | 544 ------------- mingw-w64-python3.9/smoketests.py | 132 ---- 201 files changed, 412 insertions(+), 5972 deletions(-) rename {mingw-w64-python3.9 => mingw-w64-python}/.gitignore (100%) delete mode 100644 mingw-w64-python/0000-make-_sysconfigdata.py-relocatable.patch delete mode 100644 mingw-w64-python/0001-fix-_nt_quote_args-using-subprocess-list2cmdline.patch rename {mingw-w64-python3.9 => mingw-w64-python}/0001-make-_sysconfigdata.py-relocatable.patch (100%) rename {mingw-w64-python3.9 => mingw-w64-python}/0003-MINGW-BASE-use-NT-thread-model.patch (100%) rename {mingw-w64-python3.9 => mingw-w64-python}/0004-MINGW-translate-gcc-internal-defines-to-python-platf.patch (100%) rename {mingw-w64-python3.9 => mingw-w64-python}/0005-MINGW-configure-MACHDEP-and-platform-for-build.patch (100%) rename {mingw-w64-python3.9 => mingw-w64-python}/0006-MINGW-preset-configure-defaults.patch (100%) rename {mingw-w64-python3.9 => mingw-w64-python}/0007-MINGW-configure-largefile-support-for-windows-builds.patch (100%) rename {mingw-w64-python3.9 => mingw-w64-python}/0008-MINGW-add-srcdir-PC-to-CPPFLAGS.patch (100%) rename {mingw-w64-python3.9 => mingw-w64-python}/0009-MINGW-init-system-calls.patch (100%) rename {mingw-w64-python3.9 => mingw-w64-python}/0010-MINGW-build-in-windows-modules-winreg.patch (100%) rename {mingw-w64-python3.9 => mingw-w64-python}/0011-MINGW-determine-if-pwdmodule-should-be-used.patch (100%) rename {mingw-w64-python3.9 => mingw-w64-python}/0012-MINGW-compiler-customize-mingw-cygwin-compilers.patch (100%) rename {mingw-w64-python3.9 => mingw-w64-python}/0013-MINGW-compiler-enable-new-dtags.patch (100%) rename {mingw-w64-python3.9 => mingw-w64-python}/0014-issue6672-v2-Add-Mingw-recognition-to-pyport.h-to-al.patch (100%) rename {mingw-w64-python3.9 => mingw-w64-python}/0015-MINGW-configure-for-shared-build.patch (100%) rename {mingw-w64-python3.9 => mingw-w64-python}/0016-MINGW-dynamic-loading-support.patch (100%) rename {mingw-w64-python3.9 => mingw-w64-python}/0017-MINGW-ignore-main-program-for-frozen-scripts.patch (100%) rename {mingw-w64-python3.9 => mingw-w64-python}/0018-MINGW-setup-_multiprocessing-module.patch (100%) rename {mingw-w64-python3.9 => mingw-w64-python}/0019-MINGW-setup-select-module.patch (100%) rename {mingw-w64-python3.9 => mingw-w64-python}/0020-MINGW-setup-_ctypes-module-with-system-libffi.patch (100%) rename {mingw-w64-python3.9 => mingw-w64-python}/0021-MINGW-defect-winsock2-and-setup-_socket-module.patch (100%) rename {mingw-w64-python3.9 => mingw-w64-python}/0022-MINGW-exclude-unix-only-modules.patch (100%) rename {mingw-w64-python3.9 => mingw-w64-python}/0023-MINGW-setup-msvcrt-and-_winapi-modules.patch (100%) rename {mingw-w64-python3.9 => mingw-w64-python}/0024-MINGW-build-extensions-with-GCC.patch (100%) rename {mingw-w64-python3.9 => mingw-w64-python}/0025-MINGW-use-Mingw32CCompiler-as-default-compiler-for-m.patch (100%) rename {mingw-w64-python3.9 => mingw-w64-python}/0026-MINGW-find-import-library.patch (100%) rename {mingw-w64-python3.9 => mingw-w64-python}/0027-MINGW-setup-_ssl-module.patch (100%) rename {mingw-w64-python3.9 => mingw-w64-python}/0028-MINGW-generalization-of-posix-build-in-sysconfig.py.patch (100%) rename {mingw-w64-python3.9 => mingw-w64-python}/0029-MINGW-support-stdcall-without-underscore.patch (100%) rename {mingw-w64-python3.9 => mingw-w64-python}/0030-use-replace-instead-rename-to-avoid-failure-on-windo.patch (100%) rename {mingw-w64-python3.9 => mingw-w64-python}/0031-MINGW-avoid-circular-dependency-from-time-module-dur.patch (100%) rename {mingw-w64-python3.9 => mingw-w64-python}/0032-MINGW-generalization-of-posix-build-in-distutils-sys.patch (100%) rename {mingw-w64-python3.9 => mingw-w64-python}/0033-MINGW-customize-site.patch (100%) rename {mingw-w64-python3.9 => mingw-w64-python}/0034-add-python-config-sh.patch (100%) rename {mingw-w64-python3.9 => mingw-w64-python}/0035-cross-darwin-feature.patch (100%) rename {mingw-w64-python3.9 => mingw-w64-python}/0036-py3k-mingw-ntthreads-vs-pthreads.patch (100%) rename {mingw-w64-python3.9 => mingw-w64-python}/0037-mingw-system-libffi.patch (100%) rename {mingw-w64-python3.9 => mingw-w64-python}/0038-msys-mingw-prefer-unix-sep-if-MSYSTEM.patch (100%) rename {mingw-w64-python3.9 => mingw-w64-python}/0039-mingw-use-posix-getpath.patch (100%) rename {mingw-w64-python3.9 => mingw-w64-python}/0040-mingw-add-ModuleFileName-dir-to-PATH.patch (100%) rename {mingw-w64-python3.9 => mingw-w64-python}/0041-mingw-add-BUILDIN_WIN32_MODULEs-time-msvcrt.patch (100%) rename {mingw-w64-python3.9 => mingw-w64-python}/0042-msys-cygwin-semi-native-build-sysconfig.patch (100%) rename {mingw-w64-python3.9 => mingw-w64-python}/0043-mingw-sysconfig-like-posix.patch (100%) rename {mingw-w64-python3.9 => mingw-w64-python}/0044-mingw-_winapi_as_builtin_for_Popen_in_cygwinccompile.patch (100%) rename {mingw-w64-python3.9 => mingw-w64-python}/0045-cross-dont-add-multiarch-paths-if-cross-compiling.patch (100%) rename {mingw-w64-python3.9 => mingw-w64-python}/0046-mingw-use-backslashes-in-compileall-py.patch (100%) rename {mingw-w64-python3.9 => mingw-w64-python}/0047-msys-convert_path-fix-and-root-hack.patch (100%) rename {mingw-w64-python3.9 => mingw-w64-python}/0048-allow-static-tcltk.patch (100%) rename {mingw-w64-python3.9 => mingw-w64-python}/0049-mingw-pdcurses_ISPAD.patch (100%) rename {mingw-w64-python3.9 => mingw-w64-python}/0050-grammar-fixes.patch (100%) rename {mingw-w64-python3.9 => mingw-w64-python}/0051-builddir-fixes.patch (100%) rename {mingw-w64-python3.9 => mingw-w64-python}/0052-msys-monkeypatch-os-system-via-sh-exe.patch (100%) rename {mingw-w64-python3.9 => mingw-w64-python}/0053-msys-replace-slashes-used-in-io-redirection.patch (100%) rename {mingw-w64-python3.9 => mingw-w64-python}/0054-mingw-install-layout-as-posix.patch (100%) rename {mingw-w64-python3.9 => mingw-w64-python}/0055-remove_path_max.default.patch (100%) rename {mingw-w64-python3.9 => mingw-w64-python}/0056-dont-link-with-gettext.patch (100%) rename {mingw-w64-python3.9 => mingw-w64-python}/0057-ctypes-python-dll.patch (100%) rename {mingw-w64-python3.9 => mingw-w64-python}/0058-gdbm-module-includes.patch (100%) rename {mingw-w64-python3.9 => mingw-w64-python}/0059-use-gnu_printf-in-format.patch (100%) rename {mingw-w64-python3.9 => mingw-w64-python}/0060-mingw-fix-ssl-dont-use-enum_certificates.patch (100%) rename {mingw-w64-python3.9 => mingw-w64-python}/0061-mingw-build-optimized-ext.patch (100%) rename {mingw-w64-python3.9 => mingw-w64-python}/0062-cygwinccompiler-dont-strip-modules-if-pydebug.patch (100%) rename {mingw-w64-python3.9 => mingw-w64-python}/0063-fix-using-dllhandle-and-winver-mingw.patch (100%) rename {mingw-w64-python3.9 => mingw-w64-python}/0064-mingw-add-LIBPL-to-library-dirs.patch (100%) rename {mingw-w64-python3.9 => mingw-w64-python}/0065-Add-AMD64-to-sys-config-so-msvccompiler-get_build_ve.patch (100%) rename {mingw-w64-python3.9 => mingw-w64-python}/0066-MINGW-link-with-additional-library.patch (100%) rename {mingw-w64-python3.9 => mingw-w64-python}/0067-install-msilib.patch (100%) rename {mingw-w64-python3.9 => mingw-w64-python}/0068-dont-include-system-ncurses-path.patch (100%) rename {mingw-w64-python3.9 => mingw-w64-python}/0069-fix-signal-module-build.patch (100%) rename {mingw-w64-python3.9 => mingw-w64-python}/0070-build-winconsoleio.patch (100%) rename {mingw-w64-python3.9 => mingw-w64-python}/0071-expose-sem_unlink.patch (100%) rename {mingw-w64-python3.9 => mingw-w64-python}/0072-cygpty-isatty.patch (100%) rename {mingw-w64-python3.9 => mingw-w64-python}/0073-disable-broken-gdbm-module.patch (100%) rename {mingw-w64-python3.9 => mingw-w64-python}/0074-link-win-resource-files-and-build-pythonw.patch (100%) rename {mingw-w64-python3.9 => mingw-w64-python}/0075-3.7-mpdec-mingw.patch (100%) rename {mingw-w64-python3.9 => mingw-w64-python}/0076-disable-readline.patch (100%) rename {mingw-w64-python3.9 => mingw-w64-python}/0077-fix-isselectable.patch (100%) rename {mingw-w64-python3.9 => mingw-w64-python}/0078-use-_wcsnicmp-instead-wcsncasecmp.patch (100%) rename {mingw-w64-python3.9 => mingw-w64-python}/0079-_xxsubinterpretersmodule.patch (100%) rename {mingw-w64-python3.9 => mingw-w64-python}/0080-sqlite3-module-defines.patch (100%) rename {mingw-w64-python3.9 => mingw-w64-python}/0081-configure-have-inet-pton.patch (100%) rename {mingw-w64-python3.9 => mingw-w64-python}/0082-fix-msvc9-import.patch (100%) rename {mingw-w64-python3.9 => mingw-w64-python}/0083-set-venv-activate-path-unix.patch (100%) rename {mingw-w64-python3.9 => mingw-w64-python}/0084-venv-creation-fixes.patch (100%) rename {mingw-w64-python3.9 => mingw-w64-python}/0085-pass-gen-profile-ldflags.patch (100%) rename {mingw-w64-python3.9 => mingw-w64-python}/0086-distutils-add-windmc-to-cygwinccompiler.patch (100%) rename {mingw-w64-python3.9 => mingw-w64-python}/0087-pkg-config-windows-must-link-ext-with-python-lib.patch (100%) rename {mingw-w64-python3.9 => mingw-w64-python}/0088-importlib-bootstrap-path-sep.patch (100%) rename {mingw-w64-python3.9 => mingw-w64-python}/0089-pathlib-path-sep.patch (100%) rename {mingw-w64-python3.9 => mingw-w64-python}/0090-warnings-fixes.patch (100%) rename {mingw-w64-python3.9 => mingw-w64-python}/0091-fix-build-testinternalcapi.patch (100%) rename {mingw-w64-python3.9 => mingw-w64-python}/0092-extend-MS_WINDOWS-flag.patch (100%) rename {mingw-w64-python3.9 => mingw-w64-python}/0093-clang-arm64.patch (100%) rename {mingw-w64-python3.9 => mingw-w64-python}/0094-MINGW-stack-reserve.patch (100%) rename {mingw-w64-python3.9 => mingw-w64-python}/0095-Add-support-for-Windows-7-Python-3.9.patch (100%) rename {mingw-w64-python3.9 => mingw-w64-python}/0097-Don-t-use-os.pathsep-to-find-EOF.patch (100%) rename {mingw-w64-python3.9 => mingw-w64-python}/0098-Fix-extension-suffix-for-c-extensions-on-mingw.patch (100%) rename {mingw-w64-python3.9 => mingw-w64-python}/0099-Change-the-get_platform-method-in-sysconfig-and-dist.patch (100%) delete mode 100644 mingw-w64-python/0100-MINGW-BASE-use-NT-thread-model.patch rename {mingw-w64-python3.9 => mingw-w64-python}/0103-squash-Fixup-.rc-handling.patch (100%) rename {mingw-w64-python3.9 => mingw-w64-python}/0104-squash-Set-MS_DLL_ID.patch (100%) rename {mingw-w64-python3.9 => mingw-w64-python}/0107-squash-fix-srcdir-builddir.patch (100%) delete mode 100644 mingw-w64-python/0110-MINGW-translate-gcc-internal-defines-to-python-platf.patch delete mode 100644 mingw-w64-python/0130-MINGW-configure-MACHDEP-and-platform-for-build.patch delete mode 100644 mingw-w64-python/0140-MINGW-preset-configure-defaults.patch delete mode 100644 mingw-w64-python/0150-MINGW-configure-largefile-support-for-windows-builds.patch delete mode 100644 mingw-w64-python/0170-MINGW-add-srcdir-PC-to-CPPFLAGS.patch delete mode 100644 mingw-w64-python/0180-MINGW-init-system-calls.patch delete mode 100644 mingw-w64-python/0200-MINGW-build-in-windows-modules-winreg.patch delete mode 100644 mingw-w64-python/0210-MINGW-determine-if-pwdmodule-should-be-used.patch delete mode 100644 mingw-w64-python/0250-MINGW-compiler-customize-mingw-cygwin-compilers.patch delete mode 100644 mingw-w64-python/0260-MINGW-compiler-enable-new-dtags.patch delete mode 100644 mingw-w64-python/0290-issue6672-v2-Add-Mingw-recognition-to-pyport.h-to-al.patch delete mode 100644 mingw-w64-python/0300-MINGW-configure-for-shared-build.patch delete mode 100644 mingw-w64-python/0310-MINGW-dynamic-loading-support.patch delete mode 100644 mingw-w64-python/0330-MINGW-ignore-main-program-for-frozen-scripts.patch delete mode 100644 mingw-w64-python/0350-MINGW-setup-_multiprocessing-module.patch delete mode 100644 mingw-w64-python/0360-MINGW-setup-select-module.patch delete mode 100644 mingw-w64-python/0370-MINGW-setup-_ctypes-module-with-system-libffi.patch delete mode 100644 mingw-w64-python/0380-MINGW-defect-winsock2-and-setup-_socket-module.patch delete mode 100644 mingw-w64-python/0390-MINGW-exclude-unix-only-modules.patch delete mode 100644 mingw-w64-python/0400-MINGW-setup-msvcrt-and-_winapi-modules.patch delete mode 100644 mingw-w64-python/0410-MINGW-build-extensions-with-GCC.patch delete mode 100644 mingw-w64-python/0420-MINGW-use-Mingw32CCompiler-as-default-compiler-for-m.patch delete mode 100644 mingw-w64-python/0430-MINGW-find-import-library.patch delete mode 100644 mingw-w64-python/0440-MINGW-setup-_ssl-module.patch delete mode 100644 mingw-w64-python/0460-MINGW-generalization-of-posix-build-in-sysconfig.py.patch delete mode 100644 mingw-w64-python/0462-MINGW-support-stdcall-without-underscore.patch delete mode 100644 mingw-w64-python/0464-use-replace-instead-rename-to-avoid-failure-on-windo.patch delete mode 100644 mingw-w64-python/0470-MINGW-avoid-circular-dependency-from-time-module-dur.patch delete mode 100644 mingw-w64-python/0480-MINGW-generalization-of-posix-build-in-distutils-sys.patch delete mode 100644 mingw-w64-python/0490-MINGW-customize-site.patch delete mode 100644 mingw-w64-python/0500-add-python-config-sh.patch delete mode 100644 mingw-w64-python/0510-cross-darwin-feature.patch delete mode 100644 mingw-w64-python/0520-py3k-mingw-ntthreads-vs-pthreads.patch delete mode 100644 mingw-w64-python/0530-mingw-system-libffi.patch delete mode 100644 mingw-w64-python/0555-msys-mingw-prefer-unix-sep-if-MSYSTEM.patch delete mode 100644 mingw-w64-python/0560-mingw-use-posix-getpath.patch delete mode 100644 mingw-w64-python/0565-mingw-add-ModuleFileName-dir-to-PATH.patch delete mode 100644 mingw-w64-python/0570-mingw-add-BUILDIN_WIN32_MODULEs-time-msvcrt.patch delete mode 100644 mingw-w64-python/0610-msys-cygwin-semi-native-build-sysconfig.patch delete mode 100644 mingw-w64-python/0620-mingw-sysconfig-like-posix.patch delete mode 100644 mingw-w64-python/0630-mingw-_winapi_as_builtin_for_Popen_in_cygwinccompiler.patch delete mode 100644 mingw-w64-python/0640-mingw-x86_64-size_t-format-specifier-pid_t.patch delete mode 100644 mingw-w64-python/0650-cross-dont-add-multiarch-paths-if-cross-compiling.patch delete mode 100644 mingw-w64-python/0660-mingw-use-backslashes-in-compileall-py.patch delete mode 100644 mingw-w64-python/0670-msys-convert_path-fix-and-root-hack.patch delete mode 100644 mingw-w64-python/0690-allow-static-tcltk.patch delete mode 100644 mingw-w64-python/0720-mingw-pdcurses_ISPAD.patch delete mode 100644 mingw-w64-python/0740-grammar-fixes.patch delete mode 100644 mingw-w64-python/0750-builddir-fixes.patch delete mode 100644 mingw-w64-python/0760-msys-monkeypatch-os-system-via-sh-exe.patch delete mode 100644 mingw-w64-python/0770-msys-replace-slashes-used-in-io-redirection.patch delete mode 100644 mingw-w64-python/0800-mingw-install-layout-as-posix.patch delete mode 100644 mingw-w64-python/0810-remove_path_max.default.patch delete mode 100644 mingw-w64-python/0820-dont-link-with-gettext.patch delete mode 100644 mingw-w64-python/0830-ctypes-python-dll.patch delete mode 100644 mingw-w64-python/0840-gdbm-module-includes.patch delete mode 100644 mingw-w64-python/0850-use-gnu_printf-in-format.patch delete mode 100644 mingw-w64-python/0870-mingw-fix-ssl-dont-use-enum_certificates.patch delete mode 100644 mingw-w64-python/0890-mingw-build-optimized-ext.patch delete mode 100644 mingw-w64-python/0900-cygwinccompiler-dont-strip-modules-if-pydebug.patch delete mode 100644 mingw-w64-python/0910-fix-using-dllhandle-and-winver-mingw.patch delete mode 100644 mingw-w64-python/0920-mingw-add-LIBPL-to-library-dirs.patch delete mode 100644 mingw-w64-python/0970-Add-AMD64-to-sys-config-so-msvccompiler-get_build_version-works.patch delete mode 100644 mingw-w64-python/0990-MINGW-link-with-additional-library.patch delete mode 100644 mingw-w64-python/1010-install-msilib.patch delete mode 100644 mingw-w64-python/1060-dont-include-system-ncurses-path.patch delete mode 100644 mingw-w64-python/1620-fix-signal-module-build.patch delete mode 100644 mingw-w64-python/1630-build-winconsoleio.patch delete mode 100644 mingw-w64-python/1650-expose-sem_unlink.patch delete mode 100644 mingw-w64-python/1700-cygpty-isatty.patch delete mode 100644 mingw-w64-python/1701-disable-broken-gdbm-module.patch delete mode 100644 mingw-w64-python/1800-link-win-resource-files-and-build-pythonw.patch delete mode 100644 mingw-w64-python/1810-3.7-mpdec-mingw.patch delete mode 100644 mingw-w64-python/1850-disable-readline.patch delete mode 100644 mingw-w64-python/1860-fix-isselectable.patch delete mode 100644 mingw-w64-python/1870-use-_wcsnicmp-instead-wcsncasecmp.patch delete mode 100644 mingw-w64-python/1890-_xxsubinterpretersmodule.patch delete mode 100644 mingw-w64-python/2010-configure-have-inet-pton.patch delete mode 100644 mingw-w64-python/2030-fix-msvc9-import.patch delete mode 100644 mingw-w64-python/2051-set-venv-activate-path-unix.patch delete mode 100644 mingw-w64-python/2052-venv-creation-fixes.patch delete mode 100644 mingw-w64-python/2060-pass-gen-profile-ldflags.patch delete mode 100644 mingw-w64-python/2070-distutils-add-windmc-to-cygwinccompiler.patch delete mode 100644 mingw-w64-python/2080-pkg-config-windows-must-link-ext-with-python-lib.patch delete mode 100644 mingw-w64-python/3000-importlib-bootstrap-path-sep.patch delete mode 100644 mingw-w64-python/3001-pathlib-path-sep.patch delete mode 100644 mingw-w64-python/3011-fix-build-testinternalcapi.patch delete mode 100644 mingw-w64-python/3020-extend-MS_WINDOWS-flag.patch delete mode 100644 mingw-w64-python/4000-clang-arm64.patch delete mode 100644 mingw-w64-python/5000-warnings-fixes.patch rename {mingw-w64-python3.9 => mingw-w64-python}/README.md (100%) rename {mingw-w64-python3.9 => mingw-w64-python}/update-patches.sh (100%) delete mode 100644 mingw-w64-python3.9/0002-restore-setup-config.patch delete mode 100644 mingw-w64-python3.9/PKGBUILD delete mode 100644 mingw-w64-python3.9/smoketests.py diff --git a/mingw-w64-python3.9/.gitignore b/mingw-w64-python/.gitignore similarity index 100% rename from mingw-w64-python3.9/.gitignore rename to mingw-w64-python/.gitignore diff --git a/mingw-w64-python/0000-make-_sysconfigdata.py-relocatable.patch b/mingw-w64-python/0000-make-_sysconfigdata.py-relocatable.patch deleted file mode 100644 index bb238fed55..0000000000 --- a/mingw-w64-python/0000-make-_sysconfigdata.py-relocatable.patch +++ /dev/null @@ -1,41 +0,0 @@ -diff -Naur Python-3.8.0-orig/Lib/sysconfig.py Python-3.8.0/Lib/sysconfig.py ---- Python-3.8.0-orig/Lib/sysconfig.py 2019-10-14 16:34:47.000000000 +0300 -+++ Python-3.8.0/Lib/sysconfig.py 2019-10-22 10:00:17.317067000 +0300 -@@ -2,6 +2,7 @@ - - import os - import sys -+import textwrap - from os.path import pardir, realpath - - __all__ = [ -@@ -405,11 +406,29 @@ - os.makedirs(pybuilddir, exist_ok=True) - destfile = os.path.join(pybuilddir, name + '.py') - -+ replacement = """ -+ keys_to_replace = [ -+ 'BINDIR', 'BINLIBDEST', 'CONFINCLUDEDIR', -+ 'CONFINCLUDEPY', 'DESTDIRS', 'DESTLIB', 'DESTSHARED', -+ 'INCLDIRSTOMAKE', 'INCLUDEDIR', 'INCLUDEPY', -+ 'LIBDEST', 'LIBDIR', 'LIBPC', 'LIBPL', 'MACHDESTLIB', -+ 'MANDIR', 'SCRIPTDIR', 'datarootdir', 'exec_prefix', -+ ] -+ -+ prefix = build_time_vars['BINDIR'][:-4] -+ -+ for key in keys_to_replace: -+ value = build_time_vars[key] -+ build_time_vars[key] = value.replace(prefix, sys.prefix) -+ """ -+ - with open(destfile, 'w', encoding='utf8') as f: -+ f.write('import sys\n') - f.write('# system configuration generated and used by' - ' the sysconfig module\n') - f.write('build_time_vars = ') - pprint.pprint(vars, stream=f) -+ f.write('\n%s' % textwrap.dedent(replacement)) - - # Create file used for sys.path fixup -- see Modules/getpath.c - with open('pybuilddir.txt', 'w', encoding='utf8') as f: diff --git a/mingw-w64-python/0001-fix-_nt_quote_args-using-subprocess-list2cmdline.patch b/mingw-w64-python/0001-fix-_nt_quote_args-using-subprocess-list2cmdline.patch deleted file mode 100644 index 7bd9490c67..0000000000 --- a/mingw-w64-python/0001-fix-_nt_quote_args-using-subprocess-list2cmdline.patch +++ /dev/null @@ -1,50 +0,0 @@ -diff -Naur Python-3.8.0-orig/Lib/distutils/spawn.py Python-3.8.0/Lib/distutils/spawn.py ---- Python-3.8.0-orig/Lib/distutils/spawn.py 2019-10-14 16:34:47.000000000 +0300 -+++ Python-3.8.0/Lib/distutils/spawn.py 2019-10-22 10:00:23.260677500 +0300 -@@ -12,6 +12,7 @@ - from distutils.errors import DistutilsPlatformError, DistutilsExecError - from distutils.debug import DEBUG - from distutils import log -+from subprocess import list2cmdline - - def spawn(cmd, search_path=1, verbose=0, dry_run=0): - """Run another program, specified as a command list 'cmd', in a new process. -@@ -43,17 +44,13 @@ - def _nt_quote_args(args): - """Quote command-line arguments for DOS/Windows conventions. - -- Just wraps every argument which contains blanks in double quotes, and -- returns a new argument list. -+ Defer to subprocess module's list2cmdline as the logic is -+ complex. The previous implementation here failed to handle -+ -DG_LOG_DOMAIN="GEGL-"__FILE__ which was encountered in MSYS2 -+ while building the gobject-introspection part of GEGL 0.3.4. - """ -- # XXX this doesn't seem very robust to me -- but if the Windows guys -- # say it'll work, I guess I'll have to accept it. (What if an arg -- # contains quotes? What other magic characters, other than spaces, -- # have to be escaped? Is there an escaping mechanism other than -- # quoting?) - for i, arg in enumerate(args): -- if ' ' in arg: -- args[i] = '"%s"' % arg -+ args[i] = list2cmdline([args[i]]) - return args - - def _spawn_nt(cmd, search_path=1, verbose=0, dry_run=0): -diff -Naur Python-3.8.0-orig/setup.py Python-3.8.0/setup.py ---- Python-3.8.0-orig/setup.py 2019-10-14 16:34:47.000000000 +0300 -+++ Python-3.8.0/setup.py 2019-10-22 10:00:23.666278200 +0300 -@@ -1421,11 +1421,7 @@ - '_sqlite/statement.c', - '_sqlite/util.c', ] - -- sqlite_defines = [] -- if not MS_WINDOWS: -- sqlite_defines.append(('MODULE_NAME', '"sqlite3"')) -- else: -- sqlite_defines.append(('MODULE_NAME', '\\"sqlite3\\"')) -+ sqlite_defines = [('MODULE_NAME', '"sqlite3"')] - - # Enable support for loadable extensions in the sqlite3 module - # if --enable-loadable-sqlite-extensions configure option is used. diff --git a/mingw-w64-python3.9/0001-make-_sysconfigdata.py-relocatable.patch b/mingw-w64-python/0001-make-_sysconfigdata.py-relocatable.patch similarity index 100% rename from mingw-w64-python3.9/0001-make-_sysconfigdata.py-relocatable.patch rename to mingw-w64-python/0001-make-_sysconfigdata.py-relocatable.patch diff --git a/mingw-w64-python/0002-restore-setup-config.patch b/mingw-w64-python/0002-restore-setup-config.patch index 0cb775058b..c268c922cf 100644 --- a/mingw-w64-python/0002-restore-setup-config.patch +++ b/mingw-w64-python/0002-restore-setup-config.patch @@ -1,28 +1,21 @@ -diff -Naur Python-3.8.0-orig/configure.ac Python-3.8.0/configure.ac ---- Python-3.8.0-orig/configure.ac 2019-10-14 16:34:47.000000000 +0300 -+++ Python-3.8.0/configure.ac 2019-10-22 10:00:26.817483700 +0300 -@@ -5624,7 +5624,7 @@ - - - # generate output files --AC_CONFIG_FILES(Makefile.pre Misc/python.pc Misc/python-embed.pc Misc/python-config.sh) -+AC_CONFIG_FILES(Makefile.pre Modules/Setup.config Misc/python.pc Misc/python-embed.pc Misc/python-config.sh) - AC_CONFIG_FILES([Modules/ld_so_aix], [chmod +x Modules/ld_so_aix]) - AC_OUTPUT - -@@ -5636,7 +5636,7 @@ - - echo "creating Makefile" >&AS_MESSAGE_FD - $SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \ -- -s Modules \ -+ -s Modules Modules/Setup.config \ - Modules/Setup.local $srcdir/Modules/Setup - mv config.c Modules - -diff -Naur Python-3.8.0-orig/Makefile.pre.in Python-3.8.0/Makefile.pre.in ---- Python-3.8.0-orig/Makefile.pre.in 2019-10-14 16:34:47.000000000 +0300 -+++ Python-3.8.0/Makefile.pre.in 2019-10-22 10:00:27.207484400 +0300 -@@ -683,10 +683,12 @@ +From 65c19d285901d1791ae1bc3628550c9c4db948c1 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?=D0=90=D0=BB=D0=B5=D0=BA=D1=81=D0=B5=D0=B9?= + +Date: Thu, 17 Jun 2021 18:51:12 +0530 +Subject: [PATCH 002/N] restore setup config + +--- + Makefile.pre.in | 4 ++++ + Modules/Setup.config.in | 5 +++++ + configure.ac | 4 ++-- + 3 files changed, 11 insertions(+), 2 deletions(-) + create mode 100644 Modules/Setup.config.in + +diff --git a/Makefile.pre.in b/Makefile.pre.in +index 2b68571..f738b3b 100644 +--- a/Makefile.pre.in ++++ b/Makefile.pre.in +@@ -714,10 +714,12 @@ oldsharedmods: $(SHAREDMODS) Makefile Modules/config.c: Makefile.pre \ $(srcdir)/Modules/config.c.in \ $(MAKESETUP) \ @@ -35,7 +28,7 @@ diff -Naur Python-3.8.0-orig/Makefile.pre.in Python-3.8.0/Makefile.pre.in Modules/Setup.local \ $(srcdir)/Modules/Setup @mv config.c Modules -@@ -1574,6 +1576,7 @@ +@@ -1669,6 +1671,7 @@ libainstall: @DEF_MAKE_RULE@ python-config $(INSTALL_DATA) Makefile $(DESTDIR)$(LIBPL)/Makefile $(INSTALL_DATA) $(srcdir)/Modules/Setup $(DESTDIR)$(LIBPL)/Setup $(INSTALL_DATA) Modules/Setup.local $(DESTDIR)$(LIBPL)/Setup.local @@ -43,7 +36,7 @@ diff -Naur Python-3.8.0-orig/Makefile.pre.in Python-3.8.0/Makefile.pre.in $(INSTALL_DATA) Misc/python.pc $(DESTDIR)$(LIBPC)/python-$(VERSION).pc $(INSTALL_DATA) Misc/python-embed.pc $(DESTDIR)$(LIBPC)/python-$(VERSION)-embed.pc $(INSTALL_SCRIPT) $(srcdir)/Modules/makesetup $(DESTDIR)$(LIBPL)/makesetup -@@ -1789,6 +1792,7 @@ +@@ -1895,6 +1898,7 @@ distclean: clobber if test "$$file" != "$(srcdir)/Lib/test/data/README"; then rm "$$file"; fi; \ done -rm -f core Makefile Makefile.pre config.status Modules/Setup.local \ @@ -51,12 +44,39 @@ diff -Naur Python-3.8.0-orig/Makefile.pre.in Python-3.8.0/Makefile.pre.in Modules/ld_so_aix Modules/python.exp Misc/python.pc \ Misc/python-embed.pc Misc/python-config.sh -rm -f python*-gdb.py -diff -Naur Python-3.8.0-orig/Modules/Setup.config.in Python-3.8.0/Modules/Setup.config.in ---- Python-3.8.0-orig/Modules/Setup.config.in 1970-01-01 03:00:00.000000000 +0300 -+++ Python-3.8.0/Modules/Setup.config.in 2019-10-22 10:00:27.613085100 +0300 +diff --git a/Modules/Setup.config.in b/Modules/Setup.config.in +new file mode 100644 +index 0000000..5c1299d +--- /dev/null ++++ b/Modules/Setup.config.in @@ -0,0 +1,5 @@ +# This file is transmogrified into Setup.config by config.status. + +# The purpose of this file is to conditionally enable certain modules +# based on configure-time options. + +diff --git a/configure.ac b/configure.ac +index 8fe5fa5..6ae56e1 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -5844,7 +5844,7 @@ AC_DEFINE_UNQUOTED(PY_BUILTIN_HASHLIB_HASHES, "$default_hashlib_hashes") + ]) + + # generate output files +-AC_CONFIG_FILES(Makefile.pre Misc/python.pc Misc/python-embed.pc Misc/python-config.sh) ++AC_CONFIG_FILES(Makefile.pre Modules/Setup.config Misc/python.pc Misc/python-embed.pc Misc/python-config.sh) + AC_CONFIG_FILES([Modules/ld_so_aix], [chmod +x Modules/ld_so_aix]) + AC_OUTPUT + +@@ -5856,7 +5856,7 @@ fi + + echo "creating Makefile" >&AS_MESSAGE_FD + $SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \ +- -s Modules \ ++ -s Modules Modules/Setup.config \ + Modules/Setup.local $srcdir/Modules/Setup + mv config.c Modules + +-- +2.32.0 + diff --git a/mingw-w64-python3.9/0003-MINGW-BASE-use-NT-thread-model.patch b/mingw-w64-python/0003-MINGW-BASE-use-NT-thread-model.patch similarity index 100% rename from mingw-w64-python3.9/0003-MINGW-BASE-use-NT-thread-model.patch rename to mingw-w64-python/0003-MINGW-BASE-use-NT-thread-model.patch diff --git a/mingw-w64-python3.9/0004-MINGW-translate-gcc-internal-defines-to-python-platf.patch b/mingw-w64-python/0004-MINGW-translate-gcc-internal-defines-to-python-platf.patch similarity index 100% rename from mingw-w64-python3.9/0004-MINGW-translate-gcc-internal-defines-to-python-platf.patch rename to mingw-w64-python/0004-MINGW-translate-gcc-internal-defines-to-python-platf.patch diff --git a/mingw-w64-python3.9/0005-MINGW-configure-MACHDEP-and-platform-for-build.patch b/mingw-w64-python/0005-MINGW-configure-MACHDEP-and-platform-for-build.patch similarity index 100% rename from mingw-w64-python3.9/0005-MINGW-configure-MACHDEP-and-platform-for-build.patch rename to mingw-w64-python/0005-MINGW-configure-MACHDEP-and-platform-for-build.patch diff --git a/mingw-w64-python3.9/0006-MINGW-preset-configure-defaults.patch b/mingw-w64-python/0006-MINGW-preset-configure-defaults.patch similarity index 100% rename from mingw-w64-python3.9/0006-MINGW-preset-configure-defaults.patch rename to mingw-w64-python/0006-MINGW-preset-configure-defaults.patch diff --git a/mingw-w64-python3.9/0007-MINGW-configure-largefile-support-for-windows-builds.patch b/mingw-w64-python/0007-MINGW-configure-largefile-support-for-windows-builds.patch similarity index 100% rename from mingw-w64-python3.9/0007-MINGW-configure-largefile-support-for-windows-builds.patch rename to mingw-w64-python/0007-MINGW-configure-largefile-support-for-windows-builds.patch diff --git a/mingw-w64-python3.9/0008-MINGW-add-srcdir-PC-to-CPPFLAGS.patch b/mingw-w64-python/0008-MINGW-add-srcdir-PC-to-CPPFLAGS.patch similarity index 100% rename from mingw-w64-python3.9/0008-MINGW-add-srcdir-PC-to-CPPFLAGS.patch rename to mingw-w64-python/0008-MINGW-add-srcdir-PC-to-CPPFLAGS.patch diff --git a/mingw-w64-python3.9/0009-MINGW-init-system-calls.patch b/mingw-w64-python/0009-MINGW-init-system-calls.patch similarity index 100% rename from mingw-w64-python3.9/0009-MINGW-init-system-calls.patch rename to mingw-w64-python/0009-MINGW-init-system-calls.patch diff --git a/mingw-w64-python3.9/0010-MINGW-build-in-windows-modules-winreg.patch b/mingw-w64-python/0010-MINGW-build-in-windows-modules-winreg.patch similarity index 100% rename from mingw-w64-python3.9/0010-MINGW-build-in-windows-modules-winreg.patch rename to mingw-w64-python/0010-MINGW-build-in-windows-modules-winreg.patch diff --git a/mingw-w64-python3.9/0011-MINGW-determine-if-pwdmodule-should-be-used.patch b/mingw-w64-python/0011-MINGW-determine-if-pwdmodule-should-be-used.patch similarity index 100% rename from mingw-w64-python3.9/0011-MINGW-determine-if-pwdmodule-should-be-used.patch rename to mingw-w64-python/0011-MINGW-determine-if-pwdmodule-should-be-used.patch diff --git a/mingw-w64-python3.9/0012-MINGW-compiler-customize-mingw-cygwin-compilers.patch b/mingw-w64-python/0012-MINGW-compiler-customize-mingw-cygwin-compilers.patch similarity index 100% rename from mingw-w64-python3.9/0012-MINGW-compiler-customize-mingw-cygwin-compilers.patch rename to mingw-w64-python/0012-MINGW-compiler-customize-mingw-cygwin-compilers.patch diff --git a/mingw-w64-python3.9/0013-MINGW-compiler-enable-new-dtags.patch b/mingw-w64-python/0013-MINGW-compiler-enable-new-dtags.patch similarity index 100% rename from mingw-w64-python3.9/0013-MINGW-compiler-enable-new-dtags.patch rename to mingw-w64-python/0013-MINGW-compiler-enable-new-dtags.patch diff --git a/mingw-w64-python3.9/0014-issue6672-v2-Add-Mingw-recognition-to-pyport.h-to-al.patch b/mingw-w64-python/0014-issue6672-v2-Add-Mingw-recognition-to-pyport.h-to-al.patch similarity index 100% rename from mingw-w64-python3.9/0014-issue6672-v2-Add-Mingw-recognition-to-pyport.h-to-al.patch rename to mingw-w64-python/0014-issue6672-v2-Add-Mingw-recognition-to-pyport.h-to-al.patch diff --git a/mingw-w64-python3.9/0015-MINGW-configure-for-shared-build.patch b/mingw-w64-python/0015-MINGW-configure-for-shared-build.patch similarity index 100% rename from mingw-w64-python3.9/0015-MINGW-configure-for-shared-build.patch rename to mingw-w64-python/0015-MINGW-configure-for-shared-build.patch diff --git a/mingw-w64-python3.9/0016-MINGW-dynamic-loading-support.patch b/mingw-w64-python/0016-MINGW-dynamic-loading-support.patch similarity index 100% rename from mingw-w64-python3.9/0016-MINGW-dynamic-loading-support.patch rename to mingw-w64-python/0016-MINGW-dynamic-loading-support.patch diff --git a/mingw-w64-python3.9/0017-MINGW-ignore-main-program-for-frozen-scripts.patch b/mingw-w64-python/0017-MINGW-ignore-main-program-for-frozen-scripts.patch similarity index 100% rename from mingw-w64-python3.9/0017-MINGW-ignore-main-program-for-frozen-scripts.patch rename to mingw-w64-python/0017-MINGW-ignore-main-program-for-frozen-scripts.patch diff --git a/mingw-w64-python3.9/0018-MINGW-setup-_multiprocessing-module.patch b/mingw-w64-python/0018-MINGW-setup-_multiprocessing-module.patch similarity index 100% rename from mingw-w64-python3.9/0018-MINGW-setup-_multiprocessing-module.patch rename to mingw-w64-python/0018-MINGW-setup-_multiprocessing-module.patch diff --git a/mingw-w64-python3.9/0019-MINGW-setup-select-module.patch b/mingw-w64-python/0019-MINGW-setup-select-module.patch similarity index 100% rename from mingw-w64-python3.9/0019-MINGW-setup-select-module.patch rename to mingw-w64-python/0019-MINGW-setup-select-module.patch diff --git a/mingw-w64-python3.9/0020-MINGW-setup-_ctypes-module-with-system-libffi.patch b/mingw-w64-python/0020-MINGW-setup-_ctypes-module-with-system-libffi.patch similarity index 100% rename from mingw-w64-python3.9/0020-MINGW-setup-_ctypes-module-with-system-libffi.patch rename to mingw-w64-python/0020-MINGW-setup-_ctypes-module-with-system-libffi.patch diff --git a/mingw-w64-python3.9/0021-MINGW-defect-winsock2-and-setup-_socket-module.patch b/mingw-w64-python/0021-MINGW-defect-winsock2-and-setup-_socket-module.patch similarity index 100% rename from mingw-w64-python3.9/0021-MINGW-defect-winsock2-and-setup-_socket-module.patch rename to mingw-w64-python/0021-MINGW-defect-winsock2-and-setup-_socket-module.patch diff --git a/mingw-w64-python3.9/0022-MINGW-exclude-unix-only-modules.patch b/mingw-w64-python/0022-MINGW-exclude-unix-only-modules.patch similarity index 100% rename from mingw-w64-python3.9/0022-MINGW-exclude-unix-only-modules.patch rename to mingw-w64-python/0022-MINGW-exclude-unix-only-modules.patch diff --git a/mingw-w64-python3.9/0023-MINGW-setup-msvcrt-and-_winapi-modules.patch b/mingw-w64-python/0023-MINGW-setup-msvcrt-and-_winapi-modules.patch similarity index 100% rename from mingw-w64-python3.9/0023-MINGW-setup-msvcrt-and-_winapi-modules.patch rename to mingw-w64-python/0023-MINGW-setup-msvcrt-and-_winapi-modules.patch diff --git a/mingw-w64-python3.9/0024-MINGW-build-extensions-with-GCC.patch b/mingw-w64-python/0024-MINGW-build-extensions-with-GCC.patch similarity index 100% rename from mingw-w64-python3.9/0024-MINGW-build-extensions-with-GCC.patch rename to mingw-w64-python/0024-MINGW-build-extensions-with-GCC.patch diff --git a/mingw-w64-python3.9/0025-MINGW-use-Mingw32CCompiler-as-default-compiler-for-m.patch b/mingw-w64-python/0025-MINGW-use-Mingw32CCompiler-as-default-compiler-for-m.patch similarity index 100% rename from mingw-w64-python3.9/0025-MINGW-use-Mingw32CCompiler-as-default-compiler-for-m.patch rename to mingw-w64-python/0025-MINGW-use-Mingw32CCompiler-as-default-compiler-for-m.patch diff --git a/mingw-w64-python3.9/0026-MINGW-find-import-library.patch b/mingw-w64-python/0026-MINGW-find-import-library.patch similarity index 100% rename from mingw-w64-python3.9/0026-MINGW-find-import-library.patch rename to mingw-w64-python/0026-MINGW-find-import-library.patch diff --git a/mingw-w64-python3.9/0027-MINGW-setup-_ssl-module.patch b/mingw-w64-python/0027-MINGW-setup-_ssl-module.patch similarity index 100% rename from mingw-w64-python3.9/0027-MINGW-setup-_ssl-module.patch rename to mingw-w64-python/0027-MINGW-setup-_ssl-module.patch diff --git a/mingw-w64-python3.9/0028-MINGW-generalization-of-posix-build-in-sysconfig.py.patch b/mingw-w64-python/0028-MINGW-generalization-of-posix-build-in-sysconfig.py.patch similarity index 100% rename from mingw-w64-python3.9/0028-MINGW-generalization-of-posix-build-in-sysconfig.py.patch rename to mingw-w64-python/0028-MINGW-generalization-of-posix-build-in-sysconfig.py.patch diff --git a/mingw-w64-python3.9/0029-MINGW-support-stdcall-without-underscore.patch b/mingw-w64-python/0029-MINGW-support-stdcall-without-underscore.patch similarity index 100% rename from mingw-w64-python3.9/0029-MINGW-support-stdcall-without-underscore.patch rename to mingw-w64-python/0029-MINGW-support-stdcall-without-underscore.patch diff --git a/mingw-w64-python3.9/0030-use-replace-instead-rename-to-avoid-failure-on-windo.patch b/mingw-w64-python/0030-use-replace-instead-rename-to-avoid-failure-on-windo.patch similarity index 100% rename from mingw-w64-python3.9/0030-use-replace-instead-rename-to-avoid-failure-on-windo.patch rename to mingw-w64-python/0030-use-replace-instead-rename-to-avoid-failure-on-windo.patch diff --git a/mingw-w64-python3.9/0031-MINGW-avoid-circular-dependency-from-time-module-dur.patch b/mingw-w64-python/0031-MINGW-avoid-circular-dependency-from-time-module-dur.patch similarity index 100% rename from mingw-w64-python3.9/0031-MINGW-avoid-circular-dependency-from-time-module-dur.patch rename to mingw-w64-python/0031-MINGW-avoid-circular-dependency-from-time-module-dur.patch diff --git a/mingw-w64-python3.9/0032-MINGW-generalization-of-posix-build-in-distutils-sys.patch b/mingw-w64-python/0032-MINGW-generalization-of-posix-build-in-distutils-sys.patch similarity index 100% rename from mingw-w64-python3.9/0032-MINGW-generalization-of-posix-build-in-distutils-sys.patch rename to mingw-w64-python/0032-MINGW-generalization-of-posix-build-in-distutils-sys.patch diff --git a/mingw-w64-python3.9/0033-MINGW-customize-site.patch b/mingw-w64-python/0033-MINGW-customize-site.patch similarity index 100% rename from mingw-w64-python3.9/0033-MINGW-customize-site.patch rename to mingw-w64-python/0033-MINGW-customize-site.patch diff --git a/mingw-w64-python3.9/0034-add-python-config-sh.patch b/mingw-w64-python/0034-add-python-config-sh.patch similarity index 100% rename from mingw-w64-python3.9/0034-add-python-config-sh.patch rename to mingw-w64-python/0034-add-python-config-sh.patch diff --git a/mingw-w64-python3.9/0035-cross-darwin-feature.patch b/mingw-w64-python/0035-cross-darwin-feature.patch similarity index 100% rename from mingw-w64-python3.9/0035-cross-darwin-feature.patch rename to mingw-w64-python/0035-cross-darwin-feature.patch diff --git a/mingw-w64-python3.9/0036-py3k-mingw-ntthreads-vs-pthreads.patch b/mingw-w64-python/0036-py3k-mingw-ntthreads-vs-pthreads.patch similarity index 100% rename from mingw-w64-python3.9/0036-py3k-mingw-ntthreads-vs-pthreads.patch rename to mingw-w64-python/0036-py3k-mingw-ntthreads-vs-pthreads.patch diff --git a/mingw-w64-python3.9/0037-mingw-system-libffi.patch b/mingw-w64-python/0037-mingw-system-libffi.patch similarity index 100% rename from mingw-w64-python3.9/0037-mingw-system-libffi.patch rename to mingw-w64-python/0037-mingw-system-libffi.patch diff --git a/mingw-w64-python3.9/0038-msys-mingw-prefer-unix-sep-if-MSYSTEM.patch b/mingw-w64-python/0038-msys-mingw-prefer-unix-sep-if-MSYSTEM.patch similarity index 100% rename from mingw-w64-python3.9/0038-msys-mingw-prefer-unix-sep-if-MSYSTEM.patch rename to mingw-w64-python/0038-msys-mingw-prefer-unix-sep-if-MSYSTEM.patch diff --git a/mingw-w64-python3.9/0039-mingw-use-posix-getpath.patch b/mingw-w64-python/0039-mingw-use-posix-getpath.patch similarity index 100% rename from mingw-w64-python3.9/0039-mingw-use-posix-getpath.patch rename to mingw-w64-python/0039-mingw-use-posix-getpath.patch diff --git a/mingw-w64-python3.9/0040-mingw-add-ModuleFileName-dir-to-PATH.patch b/mingw-w64-python/0040-mingw-add-ModuleFileName-dir-to-PATH.patch similarity index 100% rename from mingw-w64-python3.9/0040-mingw-add-ModuleFileName-dir-to-PATH.patch rename to mingw-w64-python/0040-mingw-add-ModuleFileName-dir-to-PATH.patch diff --git a/mingw-w64-python3.9/0041-mingw-add-BUILDIN_WIN32_MODULEs-time-msvcrt.patch b/mingw-w64-python/0041-mingw-add-BUILDIN_WIN32_MODULEs-time-msvcrt.patch similarity index 100% rename from mingw-w64-python3.9/0041-mingw-add-BUILDIN_WIN32_MODULEs-time-msvcrt.patch rename to mingw-w64-python/0041-mingw-add-BUILDIN_WIN32_MODULEs-time-msvcrt.patch diff --git a/mingw-w64-python3.9/0042-msys-cygwin-semi-native-build-sysconfig.patch b/mingw-w64-python/0042-msys-cygwin-semi-native-build-sysconfig.patch similarity index 100% rename from mingw-w64-python3.9/0042-msys-cygwin-semi-native-build-sysconfig.patch rename to mingw-w64-python/0042-msys-cygwin-semi-native-build-sysconfig.patch diff --git a/mingw-w64-python3.9/0043-mingw-sysconfig-like-posix.patch b/mingw-w64-python/0043-mingw-sysconfig-like-posix.patch similarity index 100% rename from mingw-w64-python3.9/0043-mingw-sysconfig-like-posix.patch rename to mingw-w64-python/0043-mingw-sysconfig-like-posix.patch diff --git a/mingw-w64-python3.9/0044-mingw-_winapi_as_builtin_for_Popen_in_cygwinccompile.patch b/mingw-w64-python/0044-mingw-_winapi_as_builtin_for_Popen_in_cygwinccompile.patch similarity index 100% rename from mingw-w64-python3.9/0044-mingw-_winapi_as_builtin_for_Popen_in_cygwinccompile.patch rename to mingw-w64-python/0044-mingw-_winapi_as_builtin_for_Popen_in_cygwinccompile.patch diff --git a/mingw-w64-python3.9/0045-cross-dont-add-multiarch-paths-if-cross-compiling.patch b/mingw-w64-python/0045-cross-dont-add-multiarch-paths-if-cross-compiling.patch similarity index 100% rename from mingw-w64-python3.9/0045-cross-dont-add-multiarch-paths-if-cross-compiling.patch rename to mingw-w64-python/0045-cross-dont-add-multiarch-paths-if-cross-compiling.patch diff --git a/mingw-w64-python3.9/0046-mingw-use-backslashes-in-compileall-py.patch b/mingw-w64-python/0046-mingw-use-backslashes-in-compileall-py.patch similarity index 100% rename from mingw-w64-python3.9/0046-mingw-use-backslashes-in-compileall-py.patch rename to mingw-w64-python/0046-mingw-use-backslashes-in-compileall-py.patch diff --git a/mingw-w64-python3.9/0047-msys-convert_path-fix-and-root-hack.patch b/mingw-w64-python/0047-msys-convert_path-fix-and-root-hack.patch similarity index 100% rename from mingw-w64-python3.9/0047-msys-convert_path-fix-and-root-hack.patch rename to mingw-w64-python/0047-msys-convert_path-fix-and-root-hack.patch diff --git a/mingw-w64-python3.9/0048-allow-static-tcltk.patch b/mingw-w64-python/0048-allow-static-tcltk.patch similarity index 100% rename from mingw-w64-python3.9/0048-allow-static-tcltk.patch rename to mingw-w64-python/0048-allow-static-tcltk.patch diff --git a/mingw-w64-python3.9/0049-mingw-pdcurses_ISPAD.patch b/mingw-w64-python/0049-mingw-pdcurses_ISPAD.patch similarity index 100% rename from mingw-w64-python3.9/0049-mingw-pdcurses_ISPAD.patch rename to mingw-w64-python/0049-mingw-pdcurses_ISPAD.patch diff --git a/mingw-w64-python3.9/0050-grammar-fixes.patch b/mingw-w64-python/0050-grammar-fixes.patch similarity index 100% rename from mingw-w64-python3.9/0050-grammar-fixes.patch rename to mingw-w64-python/0050-grammar-fixes.patch diff --git a/mingw-w64-python3.9/0051-builddir-fixes.patch b/mingw-w64-python/0051-builddir-fixes.patch similarity index 100% rename from mingw-w64-python3.9/0051-builddir-fixes.patch rename to mingw-w64-python/0051-builddir-fixes.patch diff --git a/mingw-w64-python3.9/0052-msys-monkeypatch-os-system-via-sh-exe.patch b/mingw-w64-python/0052-msys-monkeypatch-os-system-via-sh-exe.patch similarity index 100% rename from mingw-w64-python3.9/0052-msys-monkeypatch-os-system-via-sh-exe.patch rename to mingw-w64-python/0052-msys-monkeypatch-os-system-via-sh-exe.patch diff --git a/mingw-w64-python3.9/0053-msys-replace-slashes-used-in-io-redirection.patch b/mingw-w64-python/0053-msys-replace-slashes-used-in-io-redirection.patch similarity index 100% rename from mingw-w64-python3.9/0053-msys-replace-slashes-used-in-io-redirection.patch rename to mingw-w64-python/0053-msys-replace-slashes-used-in-io-redirection.patch diff --git a/mingw-w64-python3.9/0054-mingw-install-layout-as-posix.patch b/mingw-w64-python/0054-mingw-install-layout-as-posix.patch similarity index 100% rename from mingw-w64-python3.9/0054-mingw-install-layout-as-posix.patch rename to mingw-w64-python/0054-mingw-install-layout-as-posix.patch diff --git a/mingw-w64-python3.9/0055-remove_path_max.default.patch b/mingw-w64-python/0055-remove_path_max.default.patch similarity index 100% rename from mingw-w64-python3.9/0055-remove_path_max.default.patch rename to mingw-w64-python/0055-remove_path_max.default.patch diff --git a/mingw-w64-python3.9/0056-dont-link-with-gettext.patch b/mingw-w64-python/0056-dont-link-with-gettext.patch similarity index 100% rename from mingw-w64-python3.9/0056-dont-link-with-gettext.patch rename to mingw-w64-python/0056-dont-link-with-gettext.patch diff --git a/mingw-w64-python3.9/0057-ctypes-python-dll.patch b/mingw-w64-python/0057-ctypes-python-dll.patch similarity index 100% rename from mingw-w64-python3.9/0057-ctypes-python-dll.patch rename to mingw-w64-python/0057-ctypes-python-dll.patch diff --git a/mingw-w64-python3.9/0058-gdbm-module-includes.patch b/mingw-w64-python/0058-gdbm-module-includes.patch similarity index 100% rename from mingw-w64-python3.9/0058-gdbm-module-includes.patch rename to mingw-w64-python/0058-gdbm-module-includes.patch diff --git a/mingw-w64-python3.9/0059-use-gnu_printf-in-format.patch b/mingw-w64-python/0059-use-gnu_printf-in-format.patch similarity index 100% rename from mingw-w64-python3.9/0059-use-gnu_printf-in-format.patch rename to mingw-w64-python/0059-use-gnu_printf-in-format.patch diff --git a/mingw-w64-python3.9/0060-mingw-fix-ssl-dont-use-enum_certificates.patch b/mingw-w64-python/0060-mingw-fix-ssl-dont-use-enum_certificates.patch similarity index 100% rename from mingw-w64-python3.9/0060-mingw-fix-ssl-dont-use-enum_certificates.patch rename to mingw-w64-python/0060-mingw-fix-ssl-dont-use-enum_certificates.patch diff --git a/mingw-w64-python3.9/0061-mingw-build-optimized-ext.patch b/mingw-w64-python/0061-mingw-build-optimized-ext.patch similarity index 100% rename from mingw-w64-python3.9/0061-mingw-build-optimized-ext.patch rename to mingw-w64-python/0061-mingw-build-optimized-ext.patch diff --git a/mingw-w64-python3.9/0062-cygwinccompiler-dont-strip-modules-if-pydebug.patch b/mingw-w64-python/0062-cygwinccompiler-dont-strip-modules-if-pydebug.patch similarity index 100% rename from mingw-w64-python3.9/0062-cygwinccompiler-dont-strip-modules-if-pydebug.patch rename to mingw-w64-python/0062-cygwinccompiler-dont-strip-modules-if-pydebug.patch diff --git a/mingw-w64-python3.9/0063-fix-using-dllhandle-and-winver-mingw.patch b/mingw-w64-python/0063-fix-using-dllhandle-and-winver-mingw.patch similarity index 100% rename from mingw-w64-python3.9/0063-fix-using-dllhandle-and-winver-mingw.patch rename to mingw-w64-python/0063-fix-using-dllhandle-and-winver-mingw.patch diff --git a/mingw-w64-python3.9/0064-mingw-add-LIBPL-to-library-dirs.patch b/mingw-w64-python/0064-mingw-add-LIBPL-to-library-dirs.patch similarity index 100% rename from mingw-w64-python3.9/0064-mingw-add-LIBPL-to-library-dirs.patch rename to mingw-w64-python/0064-mingw-add-LIBPL-to-library-dirs.patch diff --git a/mingw-w64-python3.9/0065-Add-AMD64-to-sys-config-so-msvccompiler-get_build_ve.patch b/mingw-w64-python/0065-Add-AMD64-to-sys-config-so-msvccompiler-get_build_ve.patch similarity index 100% rename from mingw-w64-python3.9/0065-Add-AMD64-to-sys-config-so-msvccompiler-get_build_ve.patch rename to mingw-w64-python/0065-Add-AMD64-to-sys-config-so-msvccompiler-get_build_ve.patch diff --git a/mingw-w64-python3.9/0066-MINGW-link-with-additional-library.patch b/mingw-w64-python/0066-MINGW-link-with-additional-library.patch similarity index 100% rename from mingw-w64-python3.9/0066-MINGW-link-with-additional-library.patch rename to mingw-w64-python/0066-MINGW-link-with-additional-library.patch diff --git a/mingw-w64-python3.9/0067-install-msilib.patch b/mingw-w64-python/0067-install-msilib.patch similarity index 100% rename from mingw-w64-python3.9/0067-install-msilib.patch rename to mingw-w64-python/0067-install-msilib.patch diff --git a/mingw-w64-python3.9/0068-dont-include-system-ncurses-path.patch b/mingw-w64-python/0068-dont-include-system-ncurses-path.patch similarity index 100% rename from mingw-w64-python3.9/0068-dont-include-system-ncurses-path.patch rename to mingw-w64-python/0068-dont-include-system-ncurses-path.patch diff --git a/mingw-w64-python3.9/0069-fix-signal-module-build.patch b/mingw-w64-python/0069-fix-signal-module-build.patch similarity index 100% rename from mingw-w64-python3.9/0069-fix-signal-module-build.patch rename to mingw-w64-python/0069-fix-signal-module-build.patch diff --git a/mingw-w64-python3.9/0070-build-winconsoleio.patch b/mingw-w64-python/0070-build-winconsoleio.patch similarity index 100% rename from mingw-w64-python3.9/0070-build-winconsoleio.patch rename to mingw-w64-python/0070-build-winconsoleio.patch diff --git a/mingw-w64-python3.9/0071-expose-sem_unlink.patch b/mingw-w64-python/0071-expose-sem_unlink.patch similarity index 100% rename from mingw-w64-python3.9/0071-expose-sem_unlink.patch rename to mingw-w64-python/0071-expose-sem_unlink.patch diff --git a/mingw-w64-python3.9/0072-cygpty-isatty.patch b/mingw-w64-python/0072-cygpty-isatty.patch similarity index 100% rename from mingw-w64-python3.9/0072-cygpty-isatty.patch rename to mingw-w64-python/0072-cygpty-isatty.patch diff --git a/mingw-w64-python3.9/0073-disable-broken-gdbm-module.patch b/mingw-w64-python/0073-disable-broken-gdbm-module.patch similarity index 100% rename from mingw-w64-python3.9/0073-disable-broken-gdbm-module.patch rename to mingw-w64-python/0073-disable-broken-gdbm-module.patch diff --git a/mingw-w64-python3.9/0074-link-win-resource-files-and-build-pythonw.patch b/mingw-w64-python/0074-link-win-resource-files-and-build-pythonw.patch similarity index 100% rename from mingw-w64-python3.9/0074-link-win-resource-files-and-build-pythonw.patch rename to mingw-w64-python/0074-link-win-resource-files-and-build-pythonw.patch diff --git a/mingw-w64-python3.9/0075-3.7-mpdec-mingw.patch b/mingw-w64-python/0075-3.7-mpdec-mingw.patch similarity index 100% rename from mingw-w64-python3.9/0075-3.7-mpdec-mingw.patch rename to mingw-w64-python/0075-3.7-mpdec-mingw.patch diff --git a/mingw-w64-python3.9/0076-disable-readline.patch b/mingw-w64-python/0076-disable-readline.patch similarity index 100% rename from mingw-w64-python3.9/0076-disable-readline.patch rename to mingw-w64-python/0076-disable-readline.patch diff --git a/mingw-w64-python3.9/0077-fix-isselectable.patch b/mingw-w64-python/0077-fix-isselectable.patch similarity index 100% rename from mingw-w64-python3.9/0077-fix-isselectable.patch rename to mingw-w64-python/0077-fix-isselectable.patch diff --git a/mingw-w64-python3.9/0078-use-_wcsnicmp-instead-wcsncasecmp.patch b/mingw-w64-python/0078-use-_wcsnicmp-instead-wcsncasecmp.patch similarity index 100% rename from mingw-w64-python3.9/0078-use-_wcsnicmp-instead-wcsncasecmp.patch rename to mingw-w64-python/0078-use-_wcsnicmp-instead-wcsncasecmp.patch diff --git a/mingw-w64-python3.9/0079-_xxsubinterpretersmodule.patch b/mingw-w64-python/0079-_xxsubinterpretersmodule.patch similarity index 100% rename from mingw-w64-python3.9/0079-_xxsubinterpretersmodule.patch rename to mingw-w64-python/0079-_xxsubinterpretersmodule.patch diff --git a/mingw-w64-python3.9/0080-sqlite3-module-defines.patch b/mingw-w64-python/0080-sqlite3-module-defines.patch similarity index 100% rename from mingw-w64-python3.9/0080-sqlite3-module-defines.patch rename to mingw-w64-python/0080-sqlite3-module-defines.patch diff --git a/mingw-w64-python3.9/0081-configure-have-inet-pton.patch b/mingw-w64-python/0081-configure-have-inet-pton.patch similarity index 100% rename from mingw-w64-python3.9/0081-configure-have-inet-pton.patch rename to mingw-w64-python/0081-configure-have-inet-pton.patch diff --git a/mingw-w64-python3.9/0082-fix-msvc9-import.patch b/mingw-w64-python/0082-fix-msvc9-import.patch similarity index 100% rename from mingw-w64-python3.9/0082-fix-msvc9-import.patch rename to mingw-w64-python/0082-fix-msvc9-import.patch diff --git a/mingw-w64-python3.9/0083-set-venv-activate-path-unix.patch b/mingw-w64-python/0083-set-venv-activate-path-unix.patch similarity index 100% rename from mingw-w64-python3.9/0083-set-venv-activate-path-unix.patch rename to mingw-w64-python/0083-set-venv-activate-path-unix.patch diff --git a/mingw-w64-python3.9/0084-venv-creation-fixes.patch b/mingw-w64-python/0084-venv-creation-fixes.patch similarity index 100% rename from mingw-w64-python3.9/0084-venv-creation-fixes.patch rename to mingw-w64-python/0084-venv-creation-fixes.patch diff --git a/mingw-w64-python3.9/0085-pass-gen-profile-ldflags.patch b/mingw-w64-python/0085-pass-gen-profile-ldflags.patch similarity index 100% rename from mingw-w64-python3.9/0085-pass-gen-profile-ldflags.patch rename to mingw-w64-python/0085-pass-gen-profile-ldflags.patch diff --git a/mingw-w64-python3.9/0086-distutils-add-windmc-to-cygwinccompiler.patch b/mingw-w64-python/0086-distutils-add-windmc-to-cygwinccompiler.patch similarity index 100% rename from mingw-w64-python3.9/0086-distutils-add-windmc-to-cygwinccompiler.patch rename to mingw-w64-python/0086-distutils-add-windmc-to-cygwinccompiler.patch diff --git a/mingw-w64-python3.9/0087-pkg-config-windows-must-link-ext-with-python-lib.patch b/mingw-w64-python/0087-pkg-config-windows-must-link-ext-with-python-lib.patch similarity index 100% rename from mingw-w64-python3.9/0087-pkg-config-windows-must-link-ext-with-python-lib.patch rename to mingw-w64-python/0087-pkg-config-windows-must-link-ext-with-python-lib.patch diff --git a/mingw-w64-python3.9/0088-importlib-bootstrap-path-sep.patch b/mingw-w64-python/0088-importlib-bootstrap-path-sep.patch similarity index 100% rename from mingw-w64-python3.9/0088-importlib-bootstrap-path-sep.patch rename to mingw-w64-python/0088-importlib-bootstrap-path-sep.patch diff --git a/mingw-w64-python3.9/0089-pathlib-path-sep.patch b/mingw-w64-python/0089-pathlib-path-sep.patch similarity index 100% rename from mingw-w64-python3.9/0089-pathlib-path-sep.patch rename to mingw-w64-python/0089-pathlib-path-sep.patch diff --git a/mingw-w64-python3.9/0090-warnings-fixes.patch b/mingw-w64-python/0090-warnings-fixes.patch similarity index 100% rename from mingw-w64-python3.9/0090-warnings-fixes.patch rename to mingw-w64-python/0090-warnings-fixes.patch diff --git a/mingw-w64-python3.9/0091-fix-build-testinternalcapi.patch b/mingw-w64-python/0091-fix-build-testinternalcapi.patch similarity index 100% rename from mingw-w64-python3.9/0091-fix-build-testinternalcapi.patch rename to mingw-w64-python/0091-fix-build-testinternalcapi.patch diff --git a/mingw-w64-python3.9/0092-extend-MS_WINDOWS-flag.patch b/mingw-w64-python/0092-extend-MS_WINDOWS-flag.patch similarity index 100% rename from mingw-w64-python3.9/0092-extend-MS_WINDOWS-flag.patch rename to mingw-w64-python/0092-extend-MS_WINDOWS-flag.patch diff --git a/mingw-w64-python3.9/0093-clang-arm64.patch b/mingw-w64-python/0093-clang-arm64.patch similarity index 100% rename from mingw-w64-python3.9/0093-clang-arm64.patch rename to mingw-w64-python/0093-clang-arm64.patch diff --git a/mingw-w64-python3.9/0094-MINGW-stack-reserve.patch b/mingw-w64-python/0094-MINGW-stack-reserve.patch similarity index 100% rename from mingw-w64-python3.9/0094-MINGW-stack-reserve.patch rename to mingw-w64-python/0094-MINGW-stack-reserve.patch diff --git a/mingw-w64-python3.9/0095-Add-support-for-Windows-7-Python-3.9.patch b/mingw-w64-python/0095-Add-support-for-Windows-7-Python-3.9.patch similarity index 100% rename from mingw-w64-python3.9/0095-Add-support-for-Windows-7-Python-3.9.patch rename to mingw-w64-python/0095-Add-support-for-Windows-7-Python-3.9.patch diff --git a/mingw-w64-python3.9/0097-Don-t-use-os.pathsep-to-find-EOF.patch b/mingw-w64-python/0097-Don-t-use-os.pathsep-to-find-EOF.patch similarity index 100% rename from mingw-w64-python3.9/0097-Don-t-use-os.pathsep-to-find-EOF.patch rename to mingw-w64-python/0097-Don-t-use-os.pathsep-to-find-EOF.patch diff --git a/mingw-w64-python3.9/0098-Fix-extension-suffix-for-c-extensions-on-mingw.patch b/mingw-w64-python/0098-Fix-extension-suffix-for-c-extensions-on-mingw.patch similarity index 100% rename from mingw-w64-python3.9/0098-Fix-extension-suffix-for-c-extensions-on-mingw.patch rename to mingw-w64-python/0098-Fix-extension-suffix-for-c-extensions-on-mingw.patch diff --git a/mingw-w64-python3.9/0099-Change-the-get_platform-method-in-sysconfig-and-dist.patch b/mingw-w64-python/0099-Change-the-get_platform-method-in-sysconfig-and-dist.patch similarity index 100% rename from mingw-w64-python3.9/0099-Change-the-get_platform-method-in-sysconfig-and-dist.patch rename to mingw-w64-python/0099-Change-the-get_platform-method-in-sysconfig-and-dist.patch diff --git a/mingw-w64-python/0100-MINGW-BASE-use-NT-thread-model.patch b/mingw-w64-python/0100-MINGW-BASE-use-NT-thread-model.patch deleted file mode 100644 index bdc68917fb..0000000000 --- a/mingw-w64-python/0100-MINGW-BASE-use-NT-thread-model.patch +++ /dev/null @@ -1,211 +0,0 @@ -diff -Naur Python-3.8.0-orig/configure.ac Python-3.8.0/configure.ac ---- Python-3.8.0-orig/configure.ac 2019-10-22 10:00:29.329088100 +0300 -+++ Python-3.8.0/configure.ac 2019-10-22 10:00:31.778292400 +0300 -@@ -1960,6 +1960,46 @@ - BASECFLAGS="$BASECFLAGS $ac_arch_flags" - fi - -+dnl NOTE: -+dnl - GCC 4.4+ for mingw* require and use posix threads(pthreads-w32) -+dnl - Host may contain installed pthreads-w32. -+dnl - On windows platform only NT-thread model is supported. -+dnl To avoid miss detection scipt first will check for NT-thread model -+dnl and if is not found will try to detect build options for pthread -+dnl model. Autodetection could be overiden if variable with_nt_threads -+dnl is set in "Site Configuration" (see autoconf manual). -+dnl If NT-thread model is enabled script skips some checks that -+dnl impact build process. When a new functionality is added, developers -+dnl are responsible to update configure script to avoid thread models -+dnl to be mixed. -+ -+AC_MSG_CHECKING([for NT threads]) -+AC_ARG_WITH(nt-threads, -+ AS_HELP_STRING([--with-nt-threads], [build with windows threads]), -+[ -+ case $withval in -+ no) with_nt_threads=no;; -+ yes) with_nt_threads=yes;; -+ *) with_nt_threads=yes;; -+ esac], [ -+ with_nt_threads=no]) -+if test $with_nt_threads = yes ; then -+AC_LINK_IFELSE([ -+ AC_LANG_PROGRAM([[]],[[_beginthread(0, 0, 0);]]) -+ ], -+ [with_nt_threads=yes], -+ [with_nt_threads=no]) -+fi -+AC_MSG_RESULT([$with_nt_threads]) -+ -+if test $with_nt_threads = yes ; then -+ dnl temporary default flag to avoid additional pthread checks -+ dnl and initilize other ac..thread flags to no -+ ac_cv_pthread_is_default=no -+ ac_cv_kthread=no -+ ac_cv_pthread=no -+ dnl ac_cv_kpthread is set to no if default is yes (see below) -+else - # On some compilers, pthreads are available without further options - # (e.g. MacOS X). On some of these systems, the compiler will not - # complain if unaccepted options are passed (e.g. gcc on Mac OS X). -@@ -2078,6 +2118,8 @@ - AC_MSG_RESULT($ac_cv_pthread) - fi - -+fi -+ - # If we have set a CC compiler flag for thread support then - # check if it works for CXX, too. - ac_cv_cxx_thread=no -@@ -2098,6 +2140,10 @@ - then - CXX="$CXX -pthread" - ac_cv_cxx_thread=yes -+elif test $with_nt_threads = yes -+then -+ dnl set to always to skip extra pthread check below -+ ac_cv_cxx_thread=always - fi - - if test $ac_cv_cxx_thread = yes -@@ -2130,8 +2176,8 @@ - AC_HEADER_STDC - AC_CHECK_HEADERS(asm/types.h crypt.h conio.h direct.h dlfcn.h errno.h \ - fcntl.h grp.h \ --ieeefp.h io.h langinfo.h libintl.h process.h pthread.h \ --sched.h shadow.h signal.h stropts.h termios.h \ -+ieeefp.h io.h langinfo.h libintl.h process.h \ -+shadow.h signal.h stropts.h termios.h \ - utime.h \ - poll.h sys/devpoll.h sys/epoll.h sys/poll.h \ - sys/audioio.h sys/xattr.h sys/bsdtty.h sys/event.h sys/file.h sys/ioctl.h \ -@@ -2145,6 +2191,14 @@ - AC_HEADER_DIRENT - AC_HEADER_MAJOR - -+# If using nt threads, don't look for pthread.h or thread.h -+if test "x$with_nt_threads" = xno ; then -+AC_HEADER_STDC -+AC_CHECK_HEADERS(pthread.h sched.h thread.h) -+AC_HEADER_DIRENT -+AC_HEADER_MAJOR -+fi -+ - # bluetooth/bluetooth.h has been known to not compile with -std=c99. - # http://permalink.gmane.org/gmane.linux.bluez.kernel/22294 - SAVE_CFLAGS=$CFLAGS -@@ -2342,6 +2396,10 @@ - - AC_MSG_CHECKING(for pthread_t) - have_pthread_t=no -+if test $with_nt_threads = yes ; then -+ dnl skip check for pthread_t if NT-thread model is enabled -+ have_pthread_t=skip -+else - AC_COMPILE_IFELSE([ - AC_LANG_PROGRAM([[#include ]], [[pthread_t x; x = *(pthread_t*)0;]]) - ],[have_pthread_t=yes],[]) -@@ -2372,6 +2430,7 @@ - else - AC_MSG_RESULT(no) - fi -+fi - CC="$ac_save_cc" - - AC_SUBST(OTHER_LIBTOOL_OPT) -@@ -2814,10 +2873,15 @@ - [AC_MSG_RESULT(no)] - ) - -+if test $with_nt_threads = yes ; then -+ dnl do not search for sem_init if NT-thread model is enabled -+ : -+else - # 'Real Time' functions on Solaris - # posix4 on Solaris 2.6 - # pthread (first!) on Linux - AC_SEARCH_LIBS(sem_init, pthread rt posix4) -+fi - - # check if we need libintl for locale functions - AC_CHECK_LIB(intl, textdomain, -@@ -3087,6 +3151,11 @@ - CXX="$CXX -pthread" - fi - posix_threads=yes -+elif test $with_nt_threads = yes -+then -+ posix_threads=no -+ AC_DEFINE(NT_THREADS, 1, -+ [Define to 1 if you want to use native NT threads]) - else - if test ! -z "$withval" -a -d "$withval" - then LDFLAGS="$LDFLAGS -L$withval" -@@ -3538,6 +3607,15 @@ - fi - - # checks for library functions -+if test $with_nt_threads = yes ; then -+ dnl GCC(mingw) 4.4+ require and use posix threads(pthreads-w32) -+ dnl and host may contain installed pthreads-w32. -+ dnl Skip checks for some functions declared in pthreads-w32 if -+ dnl NT-thread model is enabled. -+ ac_cv_func_pthread_kill=skip -+ ac_cv_func_sem_open=skip -+ ac_cv_func_sched_setscheduler=skip -+fi - AC_CHECK_FUNCS(alarm accept4 setitimer getitimer bind_textdomain_codeset chown \ - clock confstr copy_file_range ctermid dup3 execv explicit_bzero explicit_memset \ - faccessat fchmod fchmodat fchown fchownat \ -@@ -4462,6 +4540,10 @@ - # the kernel module that provides POSIX semaphores - # isn't loaded by default, so an attempt to call - # sem_open results in a 'Signal 12' error. -+if test $with_nt_threads = yes ; then -+ dnl skip posix semaphores test if NT-thread model is enabled -+ ac_cv_posix_semaphores_enabled=no -+fi - AC_MSG_CHECKING(whether POSIX semaphores are enabled) - AC_CACHE_VAL(ac_cv_posix_semaphores_enabled, - AC_RUN_IFELSE([AC_LANG_SOURCE([[ -@@ -4495,6 +4577,14 @@ - - # Multiprocessing check for broken sem_getvalue - AC_MSG_CHECKING(for broken sem_getvalue) -+if test $with_nt_threads = yes ; then -+ dnl Skip test if NT-thread model is enabled. -+ dnl NOTE the test case below fail for pthreads-w32 as: -+ dnl - SEM_FAILED is not defined; -+ dnl - sem_open is a stub; -+ dnl - sem_getvalue work(!). -+ ac_cv_broken_sem_getvalue=skip -+fi - AC_CACHE_VAL(ac_cv_broken_sem_getvalue, - AC_RUN_IFELSE([AC_LANG_SOURCE([[ - #include -diff -Naur Python-3.8.0-orig/Modules/_multiprocessing/multiprocessing.h Python-3.8.0/Modules/_multiprocessing/multiprocessing.h ---- Python-3.8.0-orig/Modules/_multiprocessing/multiprocessing.h 2019-10-14 16:34:47.000000000 +0300 -+++ Python-3.8.0/Modules/_multiprocessing/multiprocessing.h 2019-10-22 10:00:32.168293100 +0300 -@@ -21,6 +21,9 @@ - # endif - # define SEM_HANDLE HANDLE - # define SEM_VALUE_MAX LONG_MAX -+# if defined(HAVE_SEM_OPEN) && defined(_POSIX_THREADS) -+# include -+# endif - #else - # include /* O_CREAT and O_EXCL */ - # if defined(HAVE_SEM_OPEN) && !defined(POSIX_SEMAPHORES_NOT_ENABLED) -diff -Naur Python-3.8.0-orig/pyconfig.h.in Python-3.8.0/pyconfig.h.in ---- Python-3.8.0-orig/pyconfig.h.in 2019-10-14 16:34:47.000000000 +0300 -+++ Python-3.8.0/pyconfig.h.in 2019-10-22 10:00:32.558293800 +0300 -@@ -1352,6 +1352,9 @@ - /* Define if mvwdelch in curses.h is an expression. */ - #undef MVWDELCH_IS_EXPRESSION - -+/* Define to 1 if you want to use native NT threads */ -+#undef NT_THREADS -+ - /* Define to the address where bug reports for this package should be sent. */ - #undef PACKAGE_BUGREPORT - diff --git a/mingw-w64-python3.9/0103-squash-Fixup-.rc-handling.patch b/mingw-w64-python/0103-squash-Fixup-.rc-handling.patch similarity index 100% rename from mingw-w64-python3.9/0103-squash-Fixup-.rc-handling.patch rename to mingw-w64-python/0103-squash-Fixup-.rc-handling.patch diff --git a/mingw-w64-python3.9/0104-squash-Set-MS_DLL_ID.patch b/mingw-w64-python/0104-squash-Set-MS_DLL_ID.patch similarity index 100% rename from mingw-w64-python3.9/0104-squash-Set-MS_DLL_ID.patch rename to mingw-w64-python/0104-squash-Set-MS_DLL_ID.patch diff --git a/mingw-w64-python3.9/0107-squash-fix-srcdir-builddir.patch b/mingw-w64-python/0107-squash-fix-srcdir-builddir.patch similarity index 100% rename from mingw-w64-python3.9/0107-squash-fix-srcdir-builddir.patch rename to mingw-w64-python/0107-squash-fix-srcdir-builddir.patch diff --git a/mingw-w64-python/0110-MINGW-translate-gcc-internal-defines-to-python-platf.patch b/mingw-w64-python/0110-MINGW-translate-gcc-internal-defines-to-python-platf.patch deleted file mode 100644 index 65ab5aa747..0000000000 --- a/mingw-w64-python/0110-MINGW-translate-gcc-internal-defines-to-python-platf.patch +++ /dev/null @@ -1,25 +0,0 @@ -diff -Naur Python-3.8.0-orig/Include/pyport.h Python-3.8.0/Include/pyport.h ---- Python-3.8.0-orig/Include/pyport.h 2019-10-14 16:34:47.000000000 +0300 -+++ Python-3.8.0/Include/pyport.h 2019-10-22 10:00:36.224300300 +0300 -@@ -26,6 +26,21 @@ - #endif - - -+#ifdef __MINGW32__ -+/* Translate GCC[mingw*] platform specific defines to those -+ * used in python code. -+ */ -+#if !defined(MS_WIN64) && defined(_WIN64) -+# define MS_WIN64 -+#endif -+#if !defined(MS_WIN32) && defined(_WIN32) -+# define MS_WIN32 -+#endif -+#if !defined(MS_WINDOWS) && defined(MS_WIN32) -+# define MS_WINDOWS -+#endif -+#endif /* __MINGW32__*/ -+ - /************************************************************************** - Symbols and macros to supply platform-independent interfaces to basic - C language & library operations whose spellings vary across platforms. diff --git a/mingw-w64-python/0130-MINGW-configure-MACHDEP-and-platform-for-build.patch b/mingw-w64-python/0130-MINGW-configure-MACHDEP-and-platform-for-build.patch deleted file mode 100644 index 45acd7442d..0000000000 --- a/mingw-w64-python/0130-MINGW-configure-MACHDEP-and-platform-for-build.patch +++ /dev/null @@ -1,61 +0,0 @@ -diff -Naur Python-3.8.0-orig/configure.ac Python-3.8.0/configure.ac ---- Python-3.8.0-orig/configure.ac 2019-10-22 10:00:34.321096900 +0300 -+++ Python-3.8.0/configure.ac 2019-10-22 10:00:39.843506600 +0300 -@@ -362,6 +362,17 @@ - # Set name for machine-dependent library files - AC_ARG_VAR([MACHDEP], [name for machine-dependent library files]) - AC_MSG_CHECKING(MACHDEP) -+case $host in -+ *-*-mingw*) -+ # On those hosts MACHDEP is 'win', as platform specific files -+ # go in plat-$(MACHDEP), but runtime platform is 'win32' -+ test -z "$MACHDEP" && MACHDEP=win -+ -+ dnl Configuration will be based only on "host triplet" as build -+ dnl must not depend from posix compatible environement. -+ ac_sys_system=ignore -+ ;; -+esac - if test -z "$MACHDEP" - then - # avoid using uname for cross builds -@@ -431,12 +442,23 @@ - *-*-vxworks*) - _host_cpu=$host_cpu - ;; -+ *-*-mingw*) -+ _host_cpu= -+ ;; - *) - # for now, limit cross builds to known configurations - MACHDEP="unknown" - AC_MSG_ERROR([cross build not supported for $host]) - esac - _PYTHON_HOST_PLATFORM="$MACHDEP${_host_cpu:+-$_host_cpu}" -+ -+ case "$host_os" in -+ mingw*) -+ # As sys.platform() return 'win32' to build python and extantions -+ # we will use 'mingw' (in setup.py and etc.) -+ _PYTHON_HOST_PLATFORM=mingw -+ ;; -+ esac - fi - - # Some systems cannot stand _XOPEN_SOURCE being defined at all; they -diff -Naur Python-3.8.0-orig/Python/getplatform.c Python-3.8.0/Python/getplatform.c ---- Python-3.8.0-orig/Python/getplatform.c 2019-10-14 16:34:47.000000000 +0300 -+++ Python-3.8.0/Python/getplatform.c 2019-10-22 10:00:40.249107300 +0300 -@@ -1,6 +1,12 @@ - - #include "Python.h" - -+#ifdef __MINGW32__ -+# undef PLATFORM -+/* see PC/pyconfig.h */ -+# define PLATFORM "win32" -+#endif -+ - #ifndef PLATFORM - #define PLATFORM "unknown" - #endif diff --git a/mingw-w64-python/0140-MINGW-preset-configure-defaults.patch b/mingw-w64-python/0140-MINGW-preset-configure-defaults.patch deleted file mode 100644 index cc9f8db4e2..0000000000 --- a/mingw-w64-python/0140-MINGW-preset-configure-defaults.patch +++ /dev/null @@ -1,63 +0,0 @@ -diff -Naur Python-3.8.0-orig/configure.ac Python-3.8.0/configure.ac ---- Python-3.8.0-orig/configure.ac 2019-10-22 10:00:41.996310400 +0300 -+++ Python-3.8.0/configure.ac 2019-10-22 10:00:43.025912200 +0300 -@@ -893,6 +893,28 @@ - fi - AC_SUBST(MULTIARCH_CPPFLAGS) - -+# initialize default configuration -+py_config= -+case $host in -+ *-*-mingw*) py_config=mingw ;; -+esac -+if test -n "$py_config" ; then -+ AC_MSG_NOTICE([loading configure defaults from .../Misc/config_$py_config"]) -+ . "$srcdir/Misc/config_$py_config" -+fi -+ -+# initialize defaults for cross-builds -+if test "$cross_compiling" = yes; then -+ py_config=$host_os -+ case $py_config in -+ mingw32*) py_config=mingw32 ;; -+ esac -+ if test -f "$srcdir/Misc/cross_$py_config" ; then -+ AC_MSG_NOTICE([loading cross defaults from .../Misc/cross_$py_config"]) -+ . "$srcdir/Misc/cross_$py_config" -+ fi -+fi -+ - AC_MSG_CHECKING([for -Wl,--no-as-needed]) - save_LDFLAGS="$LDFLAGS" - LDFLAGS="$LDFLAGS -Wl,--no-as-needed" -diff -Naur Python-3.8.0-orig/Misc/config_mingw Python-3.8.0/Misc/config_mingw ---- Python-3.8.0-orig/Misc/config_mingw 1970-01-01 03:00:00.000000000 +0300 -+++ Python-3.8.0/Misc/config_mingw 2019-10-22 10:00:43.415912900 +0300 -@@ -0,0 +1,12 @@ -+# configure defaults for mingw* hosts -+ -+# mingw functions to ignore -+ac_cv_func_ftruncate=ignore # implement it as _chsize -+ -+# mingw-w64 functions to ignore -+ac_cv_func_truncate=ignore -+ac_cv_func_alarm=ignore -+ -+# files to ignore -+ac_cv_file__dev_ptmx=ignore #NOTE: under MSYS environment device exist -+ac_cv_file__dev_ptc=no -diff -Naur Python-3.8.0-orig/Misc/cross_mingw32 Python-3.8.0/Misc/cross_mingw32 ---- Python-3.8.0-orig/Misc/cross_mingw32 1970-01-01 03:00:00.000000000 +0300 -+++ Python-3.8.0/Misc/cross_mingw32 2019-10-22 10:00:43.837113600 +0300 -@@ -0,0 +1,11 @@ -+# configure defaults for mingw32 host if cross-build -+ -+ac_cv_little_endian_double=yes -+ac_cv_big_endian_double=no -+ac_cv_mixed_endian_double=no -+ -+ac_cv_tanh_preserves_zero_sign=yes -+ -+ac_cv_wchar_t_signed=no -+ -+ac_cv_have_size_t_format=no diff --git a/mingw-w64-python/0150-MINGW-configure-largefile-support-for-windows-builds.patch b/mingw-w64-python/0150-MINGW-configure-largefile-support-for-windows-builds.patch deleted file mode 100644 index 4874784a8f..0000000000 --- a/mingw-w64-python/0150-MINGW-configure-largefile-support-for-windows-builds.patch +++ /dev/null @@ -1,24 +0,0 @@ -diff -Naur Python-3.8.0-orig/configure.ac Python-3.8.0/configure.ac ---- Python-3.8.0-orig/configure.ac 2019-10-22 10:00:45.568716700 +0300 -+++ Python-3.8.0/configure.ac 2019-10-22 10:00:47.456320000 +0300 -@@ -2407,8 +2407,20 @@ - ]) - - AC_MSG_CHECKING(whether to enable large file support) -+have_largefile_support=no - if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \ - "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then -+ have_largefile_support=yes -+else -+ case $host in -+ *-*-mingw*) -+ dnl Activate on windows platforms (32&64-bit) where off_t(4) < fpos_t(8) -+ have_largefile_support=yes -+ ;; -+ esac -+fi -+ -+if test $have_largefile_support = yes ; then - AC_DEFINE(HAVE_LARGEFILE_SUPPORT, 1, - [Defined to enable large file support when an off_t is bigger than a long - and long long is at least as big as an off_t. You may need diff --git a/mingw-w64-python/0170-MINGW-add-srcdir-PC-to-CPPFLAGS.patch b/mingw-w64-python/0170-MINGW-add-srcdir-PC-to-CPPFLAGS.patch deleted file mode 100644 index 2c25012c6e..0000000000 --- a/mingw-w64-python/0170-MINGW-add-srcdir-PC-to-CPPFLAGS.patch +++ /dev/null @@ -1,25 +0,0 @@ -diff -Naur Python-3.8.0-orig/configure.ac Python-3.8.0/configure.ac ---- Python-3.8.0-orig/configure.ac 2019-10-22 10:00:49.172323000 +0300 -+++ Python-3.8.0/configure.ac 2019-10-22 10:00:50.295525000 +0300 -@@ -5450,8 +5450,21 @@ - THREADHEADERS="$THREADHEADERS \$(srcdir)/$h" - done - -+case $host in -+ *-*-mingw*) -+ dnl Required for windows builds as Objects/exceptions.c require -+ dnl "errmap.h" from $srcdir/PC. -+ dnl Note we cannot use BASECPPFLAGS as autogenerated pyconfig.h -+ dnl has to be before customized located in ../PC. -+ CPPFLAGS="-I\$(srcdir)/PC $CPPFLAGS" -+ ;; -+esac -+ - AC_SUBST(SRCDIRS) - SRCDIRS="Parser Objects Python Modules Modules/_io Programs" -+case $host in -+ *-*-mingw*) SRCDIRS="$SRCDIRS PC";; -+esac - AC_MSG_CHECKING(for build directories) - for dir in $SRCDIRS; do - if test ! -d $dir; then diff --git a/mingw-w64-python/0180-MINGW-init-system-calls.patch b/mingw-w64-python/0180-MINGW-init-system-calls.patch deleted file mode 100644 index c9ffe61d01..0000000000 --- a/mingw-w64-python/0180-MINGW-init-system-calls.patch +++ /dev/null @@ -1,99 +0,0 @@ -diff -Naur Python-3.8.0-orig/configure.ac Python-3.8.0/configure.ac ---- Python-3.8.0-orig/configure.ac 2019-10-22 10:00:52.028128100 +0300 -+++ Python-3.8.0/configure.ac 2019-10-22 10:00:53.198130100 +0300 -@@ -574,6 +574,14 @@ - AC_DEFINE(_INCLUDE__STDC_A1_SOURCE, 1, Define to include mbstate_t for mbrtowc) - fi - -+AC_MSG_CHECKING([for init system calls]) -+AC_SUBST(INITSYS) -+case $host in -+ *-*-mingw*) INITSYS=nt;; -+ *) INITSYS=posix;; -+esac -+AC_MSG_RESULT([$INITSYS]) -+ - # Record the configure-time value of MACOSX_DEPLOYMENT_TARGET, - # it may influence the way we can build extensions, so distutils - # needs to check it ---- Python-3.8.1/Modules/posixmodule.c.orig 2019-12-18 18:21:23.000000000 +0100 -+++ Python-3.8.1/Modules/posixmodule.c 2019-12-23 10:35:51.095967700 +0100 -@@ -193,6 +193,27 @@ - #define HAVE_CWAIT 1 - #define HAVE_FSYNC 1 - #define fsync _commit -+#elif defined(__MINGW32__) /* GCC for windows hosts */ -+/* getlogin is detected by configure on mingw-w64 */ -+#undef HAVE_GETLOGIN -+/*#define HAVE_GETCWD 1 - detected by configure*/ -+#define HAVE_GETPPID 1 -+#define HAVE_GETLOGIN 1 -+#define HAVE_SPAWNV 1 -+#define HAVE_WSPAWNV 1 -+#define HAVE_WEXECV 1 -+/*#define HAVE_EXECV 1 - detected by configure*/ -+#define HAVE_PIPE 1 -+#define HAVE_POPEN 1 -+#define HAVE_SYSTEM 1 -+#define HAVE_CWAIT 1 -+#define HAVE_FSYNC 1 -+#define fsync _commit -+#include -+#include -+#ifndef _MAX_ENV -+#define _MAX_ENV 32767 -+#endif - #else - /* Unix functions that the configure script doesn't check for */ - #ifndef __VXWORKS__ -@@ -292,7 +313,7 @@ - #endif - #endif - --#ifdef _MSC_VER -+#ifdef MS_WINDOWS - #ifdef HAVE_DIRECT_H - #include - #endif -@@ -314,7 +335,7 @@ - #include /* for ShellExecute() */ - #include /* for UNLEN */ - #define HAVE_SYMLINK --#endif /* _MSC_VER */ -+#endif /* MS_WINDOWS */ - - #ifndef MAXPATHLEN - #if defined(PATH_MAX) && PATH_MAX > 1024 -@@ -1372,9 +1393,9 @@ - ** man environ(7). - */ - #include --#elif !defined(_MSC_VER) && (!defined(__WATCOMC__) || defined(__QNX__) || defined(__VXWORKS__)) -+#elif !defined(MS_WINDOWS) && (!defined(__WATCOMC__) || defined(__QNX__) || defined(__VXWORKS__)) - extern char **environ; --#endif /* !_MSC_VER */ -+#endif /* !MS_WINDOWS */ - - static PyObject * - convertenviron(void) -diff -Naur Python-3.8.0-orig/Modules/Setup Python-3.8.0/Modules/Setup ---- Python-3.8.0-orig/Modules/Setup 2019-10-14 16:34:47.000000000 +0300 -+++ Python-3.8.0/Modules/Setup 2019-10-22 10:00:54.430532300 +0300 -@@ -101,7 +101,6 @@ - # This only contains the minimal set of modules required to run the - # setup.py script in the root of the Python source tree. - --posix -DPy_BUILD_CORE_BUILTIN -I$(srcdir)/Include/internal posixmodule.c # posix (UNIX) system calls - errno errnomodule.c # posix (UNIX) errno values - pwd pwdmodule.c # this is needed to find out the user's home dir - # if $HOME is not set -diff -Naur Python-3.8.0-orig/Modules/Setup.config.in Python-3.8.0/Modules/Setup.config.in ---- Python-3.8.0-orig/Modules/Setup.config.in 2019-10-22 10:00:30.171489600 +0300 -+++ Python-3.8.0/Modules/Setup.config.in 2019-10-22 10:00:54.009331600 +0300 -@@ -3,3 +3,6 @@ - # The purpose of this file is to conditionally enable certain modules - # based on configure-time options. - -+# init system calls(posix/nt/...) for INITFUNC (used by makesetup) -+@INITSYS@ -DPy_BUILD_CORE_BUILTIN -I$(srcdir)/Include/internal posixmodule.c -+ diff --git a/mingw-w64-python/0200-MINGW-build-in-windows-modules-winreg.patch b/mingw-w64-python/0200-MINGW-build-in-windows-modules-winreg.patch deleted file mode 100644 index 9ee4b813cf..0000000000 --- a/mingw-w64-python/0200-MINGW-build-in-windows-modules-winreg.patch +++ /dev/null @@ -1,56 +0,0 @@ -diff -Naur Python-3.8.0-orig/configure.ac Python-3.8.0/configure.ac ---- Python-3.8.0-orig/configure.ac 2019-10-22 10:00:56.583336100 +0300 -+++ Python-3.8.0/configure.ac 2019-10-22 10:00:58.938940200 +0300 -@@ -3181,6 +3181,13 @@ - fi]) - AC_MSG_RESULT($with_dbmliborder) - -+# Determine if windows modules should be used. -+AC_SUBST(USE_WIN32_MODULE) -+USE_WIN32_MODULE='#' -+case $host in -+ *-*-mingw*) USE_WIN32_MODULE=;; -+esac -+ - # Templates for things AC_DEFINEd more than once. - # For a single AC_DEFINE, no template is needed. - AH_TEMPLATE(_REENTRANT, -diff -Naur Python-3.8.0-orig/Modules/Setup.config.in Python-3.8.0/Modules/Setup.config.in ---- Python-3.8.0-orig/Modules/Setup.config.in 2019-10-22 10:00:57.800138200 +0300 -+++ Python-3.8.0/Modules/Setup.config.in 2019-10-22 10:00:59.328940900 +0300 -@@ -6,3 +6,6 @@ - # init system calls(posix/nt/...) for INITFUNC (used by makesetup) - @INITSYS@ -DPy_BUILD_CORE_BUILTIN -I$(srcdir)/Include/internal posixmodule.c - -+# build-in modules for windows platform: -+@USE_WIN32_MODULE@winreg ../PC/winreg.c -+ -diff -Naur Python-3.8.0-orig/PC/winreg.c Python-3.8.0/PC/winreg.c ---- Python-3.8.0-orig/PC/winreg.c 2019-10-14 16:34:47.000000000 +0300 -+++ Python-3.8.0/PC/winreg.c 2019-10-22 10:00:59.734541600 +0300 -@@ -17,6 +17,25 @@ - #include "structmember.h" - #include "windows.h" - -+#ifndef SIZEOF_HKEY -+/* used only here */ -+#if defined(MS_WIN64) -+# define SIZEOF_HKEY 8 -+#elif defined(MS_WIN32) -+# define SIZEOF_HKEY 4 -+#else -+# error "SIZEOF_HKEY is not defined" -+#endif -+#endif -+ -+#ifndef REG_LEGAL_CHANGE_FILTER -+#define REG_LEGAL_CHANGE_FILTER (\ -+ REG_NOTIFY_CHANGE_NAME |\ -+ REG_NOTIFY_CHANGE_ATTRIBUTES |\ -+ REG_NOTIFY_CHANGE_LAST_SET |\ -+ REG_NOTIFY_CHANGE_SECURITY ) -+#endif -+ - static BOOL PyHKEY_AsHKEY(PyObject *ob, HKEY *pRes, BOOL bNoneOK); - static BOOL clinic_HKEY_converter(PyObject *ob, void *p); - static PyObject *PyHKEY_FromHKEY(HKEY h); diff --git a/mingw-w64-python/0210-MINGW-determine-if-pwdmodule-should-be-used.patch b/mingw-w64-python/0210-MINGW-determine-if-pwdmodule-should-be-used.patch deleted file mode 100644 index fc37f869fd..0000000000 --- a/mingw-w64-python/0210-MINGW-determine-if-pwdmodule-should-be-used.patch +++ /dev/null @@ -1,42 +0,0 @@ -diff -Naur Python-3.8.0-orig/configure.ac Python-3.8.0/configure.ac ---- Python-3.8.0-orig/configure.ac 2019-10-22 10:01:01.887345400 +0300 -+++ Python-3.8.0/configure.ac 2019-10-22 10:01:03.821748800 +0300 -@@ -3188,6 +3188,13 @@ - *-*-mingw*) USE_WIN32_MODULE=;; - esac - -+# Determine if pwdmodule should be used. -+AC_SUBST(USE_PWD_MODULE) -+USE_PWD_MODULE= -+case $host in -+ *-*-mingw*) USE_PWD_MODULE='#';; -+esac -+ - # Templates for things AC_DEFINEd more than once. - # For a single AC_DEFINE, no template is needed. - AH_TEMPLATE(_REENTRANT, -diff -Naur Python-3.8.0-orig/Modules/Setup Python-3.8.0/Modules/Setup ---- Python-3.8.0-orig/Modules/Setup 2019-10-22 10:00:57.394537500 +0300 -+++ Python-3.8.0/Modules/Setup 2019-10-22 10:01:04.227349500 +0300 -@@ -102,8 +102,6 @@ - # setup.py script in the root of the Python source tree. - - errno errnomodule.c # posix (UNIX) errno values --pwd pwdmodule.c # this is needed to find out the user's home dir -- # if $HOME is not set - _sre _sre.c # Fredrik Lundh's new regular expressions - _codecs _codecsmodule.c # access to the builtin codecs and codec registry - _weakref _weakref.c # weak references -diff -Naur Python-3.8.0-orig/Modules/Setup.config.in Python-3.8.0/Modules/Setup.config.in ---- Python-3.8.0-orig/Modules/Setup.config.in 2019-10-22 10:01:02.292946100 +0300 -+++ Python-3.8.0/Modules/Setup.config.in 2019-10-22 10:01:05.038550900 +0300 -@@ -6,6 +6,9 @@ - # init system calls(posix/nt/...) for INITFUNC (used by makesetup) - @INITSYS@ -DPy_BUILD_CORE_BUILTIN -I$(srcdir)/Include/internal posixmodule.c - -+# This is needed to find out the user's home dir if $HOME is not set -+@USE_PWD_MODULE@pwd pwdmodule.c -+ - # build-in modules for windows platform: - @USE_WIN32_MODULE@winreg ../PC/winreg.c - diff --git a/mingw-w64-python/0250-MINGW-compiler-customize-mingw-cygwin-compilers.patch b/mingw-w64-python/0250-MINGW-compiler-customize-mingw-cygwin-compilers.patch deleted file mode 100644 index eb8d0205b4..0000000000 --- a/mingw-w64-python/0250-MINGW-compiler-customize-mingw-cygwin-compilers.patch +++ /dev/null @@ -1,36 +0,0 @@ -diff -Naur Python-3.8.0-orig/Lib/distutils/sysconfig.py Python-3.8.0/Lib/distutils/sysconfig.py ---- Python-3.8.0-orig/Lib/distutils/sysconfig.py 2019-10-14 16:34:47.000000000 +0300 -+++ Python-3.8.0/Lib/distutils/sysconfig.py 2019-10-22 10:01:09.125758100 +0300 -@@ -170,7 +170,23 @@ - Mainly needed on Unix, so we can plug in the information that - varies across Unices and is stored in Python's Makefile. - """ -- if compiler.compiler_type == "unix": -+ global _config_vars -+ if compiler.compiler_type in ["cygwin", "mingw32"]: -+ # Note that cygwin use posix build and 'unix' compiler. -+ # If build is not based on posix then we must predefine -+ # some environment variables corresponding to posix -+ # build rules and defaults. -+ if not 'GCC' in sys.version: -+ _config_vars['CC'] = "gcc" -+ _config_vars['CXX'] = "g++" -+ _config_vars['OPT'] = "-fwrapv -O3 -Wall -Wstrict-prototypes" -+ _config_vars['CFLAGS'] = "" -+ _config_vars['CCSHARED'] = "" -+ _config_vars['LDSHARED'] = "gcc -shared -Wl,--enable-auto-image-base" -+ _config_vars['AR'] = "ar" -+ _config_vars['ARFLAGS'] = "rc" -+ -+ if compiler.compiler_type in ["unix", "cygwin", "mingw32"]: - if sys.platform == "darwin": - # Perform first-time customization of compiler-related - # config vars on OS X now that we know we need a compiler. -@@ -180,7 +196,6 @@ - # that Python itself was built on. Also the user OS - # version and build tools may not support the same set - # of CPU architectures for universal builds. -- global _config_vars - # Use get_config_var() to ensure _config_vars is initialized. - if not get_config_var('CUSTOMIZED_OSX_COMPILER'): - import _osx_support diff --git a/mingw-w64-python/0260-MINGW-compiler-enable-new-dtags.patch b/mingw-w64-python/0260-MINGW-compiler-enable-new-dtags.patch deleted file mode 100644 index 88cb08f06e..0000000000 --- a/mingw-w64-python/0260-MINGW-compiler-enable-new-dtags.patch +++ /dev/null @@ -1,19 +0,0 @@ -diff -Naur Python-3.8.0-orig/Lib/distutils/unixccompiler.py Python-3.8.0/Lib/distutils/unixccompiler.py ---- Python-3.8.0-orig/Lib/distutils/unixccompiler.py 2019-10-14 16:34:47.000000000 +0300 -+++ Python-3.8.0/Lib/distutils/unixccompiler.py 2019-10-22 10:01:11.964963100 +0300 -@@ -248,9 +248,13 @@ - # -Wl whenever gcc was used in the past it is probably - # safest to keep doing so. - if sysconfig.get_config_var("GNULD") == "yes": -- # GNU ld needs an extra option to get a RUNPATH -+ # GNU ELF ld needs an extra option to get a RUNPATH - # instead of just an RPATH. -- return "-Wl,--enable-new-dtags,-R" + dir -+ if sys.platform in ["win32", "cygwin"] or \ -+ "mingw" in compiler: -+ return [] -+ else: -+ return "-Wl,--enable-new-dtags,-R" + dir - else: - return "-Wl,-R" + dir - else: diff --git a/mingw-w64-python/0290-issue6672-v2-Add-Mingw-recognition-to-pyport.h-to-al.patch b/mingw-w64-python/0290-issue6672-v2-Add-Mingw-recognition-to-pyport.h-to-al.patch deleted file mode 100644 index 65d1e3ad39..0000000000 --- a/mingw-w64-python/0290-issue6672-v2-Add-Mingw-recognition-to-pyport.h-to-al.patch +++ /dev/null @@ -1,62 +0,0 @@ -diff -Naur Python-3.8.0-orig/Include/pyport.h Python-3.8.0/Include/pyport.h ---- Python-3.8.0-orig/Include/pyport.h 2019-10-22 10:00:37.955903300 +0300 -+++ Python-3.8.0/Include/pyport.h 2019-10-22 10:01:14.850968200 +0300 -@@ -651,12 +651,12 @@ - */ - - /* -- All windows ports, except cygwin, are handled in PC/pyconfig.h. -+ Only MSVC windows ports is handled in PC/pyconfig.h. - -- Cygwin is the only other autoconf platform requiring special -+ Cygwin and Mingw is the only other autoconf platform requiring special - linkage handling and it uses __declspec(). - */ --#if defined(__CYGWIN__) -+#if defined(__CYGWIN__) || defined(__MINGW32__) - # define HAVE_DECLSPEC_DLL - #endif - -@@ -667,21 +667,23 @@ - # define PyAPI_FUNC(RTYPE) __declspec(dllexport) RTYPE - # define PyAPI_DATA(RTYPE) extern __declspec(dllexport) RTYPE - /* module init functions inside the core need no external linkage */ -- /* except for Cygwin to handle embedding */ --# if defined(__CYGWIN__) -+ /* except for Cygwin/Mingw to handle embedding */ -+# if defined(__CYGWIN__) || defined(__MINGW32__) - # define PyMODINIT_FUNC __declspec(dllexport) PyObject* --# else /* __CYGWIN__ */ -+# else /* __CYGWIN__ || __MINGW32__*/ - # define PyMODINIT_FUNC PyObject* --# endif /* __CYGWIN__ */ -+# endif /* __CYGWIN__ || __MINGW32__*/ - # else /* Py_BUILD_CORE */ - /* Building an extension module, or an embedded situation */ - /* public Python functions and data are imported */ - /* Under Cygwin, auto-import functions to prevent compilation */ - /* failures similar to those described at the bottom of 4.1: */ - /* http://docs.python.org/extending/windows.html#a-cookbook-approach */ --# if !defined(__CYGWIN__) -+# if defined(__CYGWIN__) || defined(__MINGW32__) -+# define PyAPI_FUNC(RTYPE) RTYPE -+# else - # define PyAPI_FUNC(RTYPE) __declspec(dllimport) RTYPE --# endif /* !__CYGWIN__ */ -+# endif /* __CYGWIN__ || __MINGW32__*/ - # define PyAPI_DATA(RTYPE) extern __declspec(dllimport) RTYPE - /* module init functions outside the core must be exported */ - # if defined(__cplusplus) -diff -Naur Python-3.8.0-orig/setup.py Python-3.8.0/setup.py ---- Python-3.8.0-orig/setup.py 2019-10-22 10:00:25.787881900 +0300 -+++ Python-3.8.0/setup.py 2019-10-22 10:01:15.256568900 +0300 -@@ -316,6 +316,9 @@ - raise ValueError("No source directory; cannot proceed.") - self.srcdir = os.path.abspath(self.srcdir) - -+ if MS_WINDOWS: -+ self.compiler.define_macro("Py_BUILD_CORE_MODULE") -+ - # Detect which modules should be compiled - self.detect_modules() - diff --git a/mingw-w64-python/0300-MINGW-configure-for-shared-build.patch b/mingw-w64-python/0300-MINGW-configure-for-shared-build.patch deleted file mode 100644 index 1b81791f85..0000000000 --- a/mingw-w64-python/0300-MINGW-configure-for-shared-build.patch +++ /dev/null @@ -1,51 +0,0 @@ -diff -Naur Python-3.8.0-orig/configure.ac Python-3.8.0/configure.ac ---- Python-3.8.0-orig/configure.ac 2019-10-22 10:01:07.206954700 +0300 -+++ Python-3.8.0/configure.ac 2019-10-22 10:01:18.470174500 +0300 -@@ -1204,6 +1204,13 @@ - ;; - - esac -+ case $host in -+ *-*-mingw*) -+ LDLIBRARY='libpython$(LDVERSION).dll.a' -+ DLLLIBRARY='libpython$(LDVERSION).dll' -+ BLDLIBRARY='-L. -lpython$(LDVERSION)' -+ ;; -+ esac - else # shared is disabled - PY_ENABLE_SHARED=0 - case $ac_sys_system in -@@ -1212,6 +1219,10 @@ - LDLIBRARY='libpython$(LDVERSION).dll.a' - ;; - esac -+ case $host in -+ *-*-mingw*) -+ LDLIBRARY='libpython$(LDVERSION).a';; -+ esac - fi - - if test "$cross_compiling" = yes; then -@@ -2760,6 +2771,12 @@ - LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";; - *) LDSHARED="ld";; - esac -+ case $host in -+ *-*-mingw*) -+ LDSHARED='$(CC) -shared -Wl,--enable-auto-image-base' -+ LDCXXSHARED='$(CXX) -shared -Wl,--enable-auto-image-base' -+ ;; -+ esac - fi - AC_MSG_RESULT($LDSHARED) - LDCXXSHARED=${LDCXXSHARED-$LDSHARED} -@@ -5478,7 +5495,8 @@ - dnl "errmap.h" from $srcdir/PC. - dnl Note we cannot use BASECPPFLAGS as autogenerated pyconfig.h - dnl has to be before customized located in ../PC. -- CPPFLAGS="-I\$(srcdir)/PC $CPPFLAGS" -+ dnl (-I. at end is workaround for setup.py logic) -+ CPPFLAGS="-I\$(srcdir)/PC $CPPFLAGS -I." - ;; - esac - diff --git a/mingw-w64-python/0310-MINGW-dynamic-loading-support.patch b/mingw-w64-python/0310-MINGW-dynamic-loading-support.patch deleted file mode 100644 index 791c700515..0000000000 --- a/mingw-w64-python/0310-MINGW-dynamic-loading-support.patch +++ /dev/null @@ -1,81 +0,0 @@ -diff -Naur Python-3.8.0-orig/configure.ac Python-3.8.0/configure.ac ---- Python-3.8.0-orig/configure.ac 2019-10-22 10:01:20.201777600 +0300 -+++ Python-3.8.0/configure.ac 2019-10-22 10:01:21.340579600 +0300 -@@ -2635,6 +2635,9 @@ - CYGWIN*) SHLIB_SUFFIX=.dll;; - *) SHLIB_SUFFIX=.so;; - esac -+ case $host_os in -+ mingw*) SHLIB_SUFFIX=.dll;; -+ esac - fi - AC_MSG_RESULT($SHLIB_SUFFIX) - -@@ -3677,6 +3680,12 @@ - fi - ;; - esac -+ case $host in -+ *-*-mingw*) -+ DYNLOADFILE="dynload_win.o" -+ extra_machdep_objs="$extra_machdep_objs PC/dl_nt.o" -+ ;; -+ esac - fi - AC_MSG_RESULT($DYNLOADFILE) - if test "$DYNLOADFILE" != "dynload_stub.o" -@@ -4837,6 +4846,12 @@ - *) - EXT_SUFFIX=${SHLIB_SUFFIX};; - esac -+case $host_os in -+ mingw*) -+ dnl Synchronized with _PyImport_DynLoadFiletab (dynload_win.c) -+ dnl Do not use more then one dot on this platform ! -+ EXT_SUFFIX=-$SOABI$SHLIB_SUFFIX;; -+esac - - AC_MSG_CHECKING(LDVERSION) - LDVERSION='$(VERSION)$(ABIFLAGS)' -diff -Naur Python-3.8.0-orig/Makefile.pre.in Python-3.8.0/Makefile.pre.in ---- Python-3.8.0-orig/Makefile.pre.in 2019-10-22 10:00:29.734688900 +0300 -+++ Python-3.8.0/Makefile.pre.in 2019-10-22 10:01:21.746180300 +0300 -@@ -784,6 +784,12 @@ - -DSHLIB_EXT='"$(EXT_SUFFIX)"' \ - -o $@ $(srcdir)/Python/dynload_hpux.c - -+Python/dynload_win.o: $(srcdir)/Python/dynload_win.c Makefile -+ $(CC) -c $(PY_CORE_CFLAGS) \ -+ -DSHLIB_SUFFIX='"$(SHLIB_SUFFIX)"' \ -+ -DEXT_SUFFIX='"$(EXT_SUFFIX)"' \ -+ -o $@ $(srcdir)/Python/dynload_win.c -+ - Python/sysmodule.o: $(srcdir)/Python/sysmodule.c Makefile $(srcdir)/Include/pydtrace.h - $(CC) -c $(PY_CORE_CFLAGS) \ - -DABIFLAGS='"$(ABIFLAGS)"' \ -diff -Naur Python-3.8.0-orig/Python/dynload_win.c Python-3.8.0/Python/dynload_win.c ---- Python-3.8.0-orig/Python/dynload_win.c 2019-10-14 16:34:47.000000000 +0300 -+++ Python-3.8.0/Python/dynload_win.c 2019-10-22 10:01:22.151781000 +0300 -@@ -33,6 +33,12 @@ - #define PYD_UNTAGGED_SUFFIX PYD_DEBUG_SUFFIX ".pyd" - - const char *_PyImport_DynLoadFiletab[] = { -+#ifdef EXT_SUFFIX -+ EXT_SUFFIX, /* include SOABI flags where is encoded debug */ -+#endif -+#ifdef SHLIB_SUFFIX -+ "-abi" PYTHON_ABI_STRING SHLIB_SUFFIX, -+#endif - PYD_TAGGED_SUFFIX, - PYD_UNTAGGED_SUFFIX, - NULL -@@ -203,8 +209,7 @@ - ensure DLLs adjacent to the PYD are preferred. */ - Py_BEGIN_ALLOW_THREADS - hDLL = LoadLibraryExW(wpathname, NULL, -- LOAD_LIBRARY_SEARCH_DEFAULT_DIRS | -- LOAD_LIBRARY_SEARCH_DLL_LOAD_DIR); -+ LOAD_WITH_ALTERED_SEARCH_PATH); - Py_END_ALLOW_THREADS - #if HAVE_SXS - _Py_DeactivateActCtx(cookie); diff --git a/mingw-w64-python/0330-MINGW-ignore-main-program-for-frozen-scripts.patch b/mingw-w64-python/0330-MINGW-ignore-main-program-for-frozen-scripts.patch deleted file mode 100644 index b58c402d34..0000000000 --- a/mingw-w64-python/0330-MINGW-ignore-main-program-for-frozen-scripts.patch +++ /dev/null @@ -1,32 +0,0 @@ -diff -Naur Python-3.8.0-orig/configure.ac Python-3.8.0/configure.ac ---- Python-3.8.0-orig/configure.ac 2019-10-22 10:01:23.898984100 +0300 -+++ Python-3.8.0/configure.ac 2019-10-22 10:01:25.833387400 +0300 -@@ -5515,6 +5515,16 @@ - ;; - esac - -+dnl Python interpreter main program for frozen scripts -+AC_SUBST(PYTHON_OBJS_FROZENMAIN) -+PYTHON_OBJS_FROZENMAIN="Python/frozenmain.o" -+case $host in -+ *-*-mingw*) -+ dnl 'PC/frozen_dllmain.c' - not yet -+ PYTHON_OBJS_FROZENMAIN= -+ ;; -+esac -+ - AC_SUBST(SRCDIRS) - SRCDIRS="Parser Objects Python Modules Modules/_io Programs" - case $host in -diff -Naur Python-3.8.0-orig/Makefile.pre.in Python-3.8.0/Makefile.pre.in ---- Python-3.8.0-orig/Makefile.pre.in 2019-10-22 10:01:24.304584800 +0300 -+++ Python-3.8.0/Makefile.pre.in 2019-10-22 10:01:26.238988200 +0300 -@@ -327,7 +327,7 @@ - Python/context.o \ - Python/dynamic_annotations.o \ - Python/errors.o \ -- Python/frozenmain.o \ -+ @PYTHON_OBJS_FROZENMAIN@ \ - Python/future.o \ - Python/getargs.o \ - Python/getcompiler.o \ diff --git a/mingw-w64-python/0350-MINGW-setup-_multiprocessing-module.patch b/mingw-w64-python/0350-MINGW-setup-_multiprocessing-module.patch deleted file mode 100644 index 3df91065dc..0000000000 --- a/mingw-w64-python/0350-MINGW-setup-_multiprocessing-module.patch +++ /dev/null @@ -1,16 +0,0 @@ -diff -Naur Python-3.8.0-orig/setup.py Python-3.8.0/setup.py ---- Python-3.8.0-orig/setup.py 2019-10-22 10:01:17.378172600 +0300 -+++ Python-3.8.0/setup.py 2019-10-22 10:01:29.904994600 +0300 -@@ -1667,7 +1667,12 @@ - libraries=libs, - include_dirs=["Modules/_multiprocessing"])) - -+ multiprocessing_libs = [] -+ if MS_WINDOWS: -+ multiprocessing_libs += ['ws2_32'] - self.add(Extension('_multiprocessing', multiprocessing_srcs, -+ define_macros={}, -+ libraries=multiprocessing_libs, - include_dirs=["Modules/_multiprocessing"])) - - def detect_uuid(self): diff --git a/mingw-w64-python/0360-MINGW-setup-select-module.patch b/mingw-w64-python/0360-MINGW-setup-select-module.patch deleted file mode 100644 index e8b9763925..0000000000 --- a/mingw-w64-python/0360-MINGW-setup-select-module.patch +++ /dev/null @@ -1,40 +0,0 @@ -diff -Naur Python-3.8.0-orig/Modules/selectmodule.c Python-3.8.0/Modules/selectmodule.c ---- Python-3.8.0-orig/Modules/selectmodule.c 2019-10-14 16:34:47.000000000 +0300 -+++ Python-3.8.0/Modules/selectmodule.c 2019-10-22 10:01:32.759799600 +0300 -@@ -134,9 +134,9 @@ - v = PyObject_AsFileDescriptor( o ); - if (v == -1) goto finally; - --#if defined(_MSC_VER) -+#if defined(MS_WIN32) - max = 0; /* not used for Win32 */ --#else /* !_MSC_VER */ -+#else /* !MS_WIN32 */ - if (!_PyIsSelectable_fd(v)) { - PyErr_SetString(PyExc_ValueError, - "filedescriptor out of range in select()"); -@@ -144,7 +144,7 @@ - } - if (v > max) - max = v; --#endif /* _MSC_VER */ -+#endif /* MS_WIN32 */ - FD_SET(v, set); - - /* add object and its file descriptor to the list */ -diff -Naur Python-3.8.0-orig/setup.py Python-3.8.0/setup.py ---- Python-3.8.0-orig/setup.py 2019-10-22 10:01:31.636597600 +0300 -+++ Python-3.8.0/setup.py 2019-10-22 10:01:33.181000400 +0300 -@@ -817,7 +817,11 @@ - self.missing.append('spwd') - - # select(2); not on ancient System V -- self.add(Extension('select', ['selectmodule.c'])) -+ select_libs = [] -+ if MS_WINDOWS: -+ select_libs += ['ws2_32'] -+ self.add(Extension('select', ['selectmodule.c'], -+ libraries=select_libs)) - - # Fred Drake's interface to the Python parser - self.add(Extension('parser', ['parsermodule.c'])) diff --git a/mingw-w64-python/0370-MINGW-setup-_ctypes-module-with-system-libffi.patch b/mingw-w64-python/0370-MINGW-setup-_ctypes-module-with-system-libffi.patch deleted file mode 100644 index e7366f0176..0000000000 --- a/mingw-w64-python/0370-MINGW-setup-_ctypes-module-with-system-libffi.patch +++ /dev/null @@ -1,26 +0,0 @@ -diff -Naur Python-3.8.0-orig/setup.py Python-3.8.0/setup.py ---- Python-3.8.0-orig/setup.py 2019-10-22 10:01:35.318204100 +0300 -+++ Python-3.8.0/setup.py 2019-10-22 10:01:36.394606000 +0300 -@@ -2043,9 +2043,12 @@ - self.add(ext) - if TEST_EXTENSIONS: - # function my_sqrt() needs libm for sqrt() -+ ffi_test_libs = ['m'] -+ if MS_WINDOWS: -+ ffi_test_libs += ['oleaut32'] - self.add(Extension('_ctypes_test', - sources=['_ctypes/_ctypes_test.c'], -- libraries=['m'])) -+ libraries=ffi_test_libs)) - - ffi_inc_dirs = self.inc_dirs.copy() - if MACOS: -@@ -2073,6 +2076,8 @@ - if ffi_inc and ffi_lib: - ext.include_dirs.extend(ffi_inc) - ext.libraries.append(ffi_lib) -+ if MS_WINDOWS: -+ ext.libraries.extend(['ole32', 'oleaut32', 'uuid']) - self.use_system_libffi = True - - if sysconfig.get_config_var('HAVE_LIBDL'): diff --git a/mingw-w64-python/0380-MINGW-defect-winsock2-and-setup-_socket-module.patch b/mingw-w64-python/0380-MINGW-defect-winsock2-and-setup-_socket-module.patch deleted file mode 100644 index 1dab81e86b..0000000000 --- a/mingw-w64-python/0380-MINGW-defect-winsock2-and-setup-_socket-module.patch +++ /dev/null @@ -1,144 +0,0 @@ -diff -Naur Python-3.8.0-orig/configure.ac Python-3.8.0/configure.ac ---- Python-3.8.0-orig/configure.ac 2019-10-22 10:01:27.970591200 +0300 -+++ Python-3.8.0/configure.ac 2019-10-22 10:01:39.327411100 +0300 -@@ -4291,21 +4291,36 @@ - ],[]) - AC_MSG_RESULT($was_it_defined) - -+AC_CHECK_HEADERS([ws2tcpip.h]) - AC_MSG_CHECKING(for addrinfo) - AC_CACHE_VAL(ac_cv_struct_addrinfo, --AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include ]], [[struct addrinfo a]])], -+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ -+#ifdef HAVE_WS2TCPIP_H -+# include -+#else -+# include -+#endif]], -+ [[struct addrinfo a]])], - [ac_cv_struct_addrinfo=yes], - [ac_cv_struct_addrinfo=no])) - AC_MSG_RESULT($ac_cv_struct_addrinfo) - if test $ac_cv_struct_addrinfo = yes; then -- AC_DEFINE(HAVE_ADDRINFO, 1, [struct addrinfo (netdb.h)]) -+ AC_DEFINE(HAVE_ADDRINFO, 1, [struct addrinfo]) - fi - - AC_MSG_CHECKING(for sockaddr_storage) - AC_CACHE_VAL(ac_cv_struct_sockaddr_storage, - AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ --# include --# include ]], [[struct sockaddr_storage s]])], -+#ifdef HAVE_WS2TCPIP_H -+#include -+#endif -+#ifdef HAVE_SYS_TYPES_H -+#include -+#endif -+#ifdef HAVE_SYS_SOCKET_H -+#include -+#endif]], -+ [[struct sockaddr_storage s]])], - [ac_cv_struct_sockaddr_storage=yes], - [ac_cv_struct_sockaddr_storage=no])) - AC_MSG_RESULT($ac_cv_struct_sockaddr_storage) -@@ -5411,7 +5426,10 @@ - - AC_CHECK_TYPE(socklen_t,, - AC_DEFINE(socklen_t,int, -- [Define to `int' if does not define.]),[ -+ [Define to `int' if or does not define.]),[ -+#ifdef HAVE_WS2TCPIP_H -+#include -+#endif - #ifdef HAVE_SYS_TYPES_H - #include - #endif -diff -Naur Python-3.8.0-orig/Misc/config_mingw Python-3.8.0/Misc/config_mingw ---- Python-3.8.0-orig/Misc/config_mingw 2019-10-22 10:00:45.989917400 +0300 -+++ Python-3.8.0/Misc/config_mingw 2019-10-22 10:01:39.733011900 +0300 -@@ -10,3 +10,6 @@ - # files to ignore - ac_cv_file__dev_ptmx=ignore #NOTE: under MSYS environment device exist - ac_cv_file__dev_ptc=no -+ -+# force detection of winsock2 functionality - require wxp or newer -+ac_cv_func_getpeername=yes -diff -Naur Python-3.8.0-orig/Modules/socketmodule.c Python-3.8.0/Modules/socketmodule.c ---- Python-3.8.0-orig/Modules/socketmodule.c 2019-10-14 16:34:47.000000000 +0300 -+++ Python-3.8.0/Modules/socketmodule.c 2019-10-22 10:01:40.123012500 +0300 -@@ -310,7 +310,7 @@ - # endif - - /* Macros based on the IPPROTO enum, see: https://bugs.python.org/issue29515 */ --#ifdef MS_WINDOWS -+#ifdef _MSC_VER - #define IPPROTO_ICMP IPPROTO_ICMP - #define IPPROTO_IGMP IPPROTO_IGMP - #define IPPROTO_GGP IPPROTO_GGP -@@ -341,7 +341,7 @@ - #define IPPROTO_PGM IPPROTO_PGM // WinSock2 only - #define IPPROTO_L2TP IPPROTO_L2TP // WinSock2 only - #define IPPROTO_SCTP IPPROTO_SCTP // WinSock2 only --#endif /* MS_WINDOWS */ -+#endif /* _MSC_VER */ - - /* Provides the IsWindows7SP1OrGreater() function */ - #include -@@ -434,6 +434,10 @@ - /* Do not include addrinfo.h for MSVC7 or greater. 'addrinfo' and - * EAI_* constants are defined in (the already included) ws2tcpip.h. - */ -+#elif defined(__MINGW32__) -+ /* Do not include addrinfo.h as minimum supported version is -+ * _WIN32_WINNT >= WindowsXP(0x0501) -+ */ - #else - # include "addrinfo.h" - #endif -diff -Naur Python-3.8.0-orig/pyconfig.h.in Python-3.8.0/pyconfig.h.in ---- Python-3.8.0-orig/pyconfig.h.in 2019-10-22 10:00:35.132298300 +0300 -+++ Python-3.8.0/pyconfig.h.in 2019-10-22 10:01:40.513013200 +0300 -@@ -54,7 +54,7 @@ - /* Define to 1 if you have the `acosh' function. */ - #undef HAVE_ACOSH - --/* struct addrinfo (netdb.h) */ -+/* struct addrinfo */ - #undef HAVE_ADDRINFO - - /* Define to 1 if you have the `alarm' function. */ -@@ -1335,6 +1335,9 @@ - /* Define if libssl has X509_VERIFY_PARAM_set1_host and related function */ - #undef HAVE_X509_VERIFY_PARAM_SET1_HOST - -+/* Define to 1 if you have the header file. */ -+#undef HAVE_WS2TCPIP_H -+ - /* Define if the zlib library has inflateCopy */ - #undef HAVE_ZLIB_COPY - -@@ -1644,7 +1647,7 @@ - /* Define to `unsigned int' if does not define. */ - #undef size_t - --/* Define to `int' if does not define. */ -+/* Define to `int' if or does not define. */ - #undef socklen_t - - /* Define to `int' if doesn't define. */ -diff -Naur Python-3.8.0-orig/setup.py Python-3.8.0/setup.py ---- Python-3.8.0-orig/setup.py 2019-10-22 10:01:38.141809100 +0300 -+++ Python-3.8.0/setup.py 2019-10-22 10:01:40.934214000 +0300 -@@ -1050,7 +1050,11 @@ - def detect_socket(self): - # socket(2) - if not VXWORKS: -+ socket_libs = [] -+ if MS_WINDOWS: -+ socket_libs += ['ws2_32', 'iphlpapi'] - self.add(Extension('_socket', ['socketmodule.c'], -+ libraries = socket_libs, - depends=['socketmodule.h'])) - elif self.compiler.find_library_file(self.lib_dirs, 'net'): - libs = ['net'] diff --git a/mingw-w64-python/0390-MINGW-exclude-unix-only-modules.patch b/mingw-w64-python/0390-MINGW-exclude-unix-only-modules.patch deleted file mode 100644 index 624f08cf24..0000000000 --- a/mingw-w64-python/0390-MINGW-exclude-unix-only-modules.patch +++ /dev/null @@ -1,76 +0,0 @@ -diff -Naur Python-3.8.0-orig/setup.py Python-3.8.0/setup.py ---- Python-3.8.0-orig/setup.py 2019-10-22 10:01:44.336020000 +0300 -+++ Python-3.8.0/setup.py 2019-10-22 10:01:45.428021900 +0300 -@@ -800,13 +800,21 @@ - if (self.config_h_vars.get('FLOCK_NEEDS_LIBBSD', False)): - # May be necessary on AIX for flock function - libs = ['bsd'] -- self.add(Extension('fcntl', ['fcntlmodule.c'], -- libraries=libs)) -+ if not MS_WINDOWS: -+ self.add(Extension('fcntl', ['fcntlmodule.c'], -+ libraries=libs)) -+ else: -+ self.missing.append('fcntl') - # pwd(3) -- self.add(Extension('pwd', ['pwdmodule.c'])) -+ if not MS_WINDOWS: -+ self.add(Extension('pwd', ['pwdmodule.c'])) -+ else: -+ self.missing.append('pwd') - # grp(3) -- if not VXWORKS: -+ if not VXWORKS and not MS_WINDOWS: - self.add(Extension('grp', ['grpmodule.c'])) -+ else: -+ self.missing.append('grp') - # spwd, shadow passwords - if (self.config_h_vars.get('HAVE_GETSPNAM', False) or - self.config_h_vars.get('HAVE_GETSPENT', False)): -@@ -831,7 +839,10 @@ - - # Lance Ellinghaus's syslog module - # syslog daemon interface -- self.add(Extension('syslog', ['syslogmodule.c'])) -+ if not MS_WINDOWS: -+ self.add(Extension('syslog', ['syslogmodule.c'])) -+ else: -+ self.missing.append('syslog') - - # Python interface to subinterpreter C-API. - self.add(Extension('_xxsubinterpreters', ['_xxsubinterpretersmodule.c'])) -@@ -857,7 +868,10 @@ - self.add(Extension('_csv', ['_csv.c'])) - - # POSIX subprocess module helper. -- self.add(Extension('_posixsubprocess', ['_posixsubprocess.c'])) -+ if not MS_WINDOWS: -+ self.add(Extension('_posixsubprocess', ['_posixsubprocess.c'])) -+ else: -+ self.missing.append('_posixsubprocess') - - def detect_test_extensions(self): - # Python C API test module -@@ -1039,13 +1053,16 @@ - # the encryption. - return - -- if self.compiler.find_library_file(self.lib_dirs, 'crypt'): -- libs = ['crypt'] -- else: -- libs = [] -+ if not MS_WINDOWS: -+ if self.compiler.find_library_file(self.lib_dirs, 'crypt'): -+ libs = ['crypt'] -+ else: -+ libs = [] - -- self.add(Extension('_crypt', ['_cryptmodule.c'], -- libraries=libs)) -+ self.add(Extension('_crypt', ['_cryptmodule.c'], -+ libraries=libs)) -+ else: -+ self.missing.append('_crypt') - - def detect_socket(self): - # socket(2) diff --git a/mingw-w64-python/0400-MINGW-setup-msvcrt-and-_winapi-modules.patch b/mingw-w64-python/0400-MINGW-setup-msvcrt-and-_winapi-modules.patch deleted file mode 100644 index e3bdf4fc3e..0000000000 --- a/mingw-w64-python/0400-MINGW-setup-msvcrt-and-_winapi-modules.patch +++ /dev/null @@ -1,69 +0,0 @@ -diff -Naur Python-3.8.0-orig/Modules/_winapi.c Python-3.8.0/Modules/_winapi.c ---- Python-3.8.0-orig/Modules/_winapi.c 2019-10-14 16:34:47.000000000 +0300 -+++ Python-3.8.0/Modules/_winapi.c 2019-10-22 10:01:48.485627300 +0300 -@@ -39,7 +39,9 @@ - - #define WINDOWS_LEAN_AND_MEAN - #include "windows.h" -+#if defined(Py_DEBUG) - #include -+#endif - #include "winreparse.h" - - #if defined(MS_WIN32) && !defined(MS_WIN64) -diff -Naur Python-3.8.0-orig/PC/msvcrtmodule.c Python-3.8.0/PC/msvcrtmodule.c ---- Python-3.8.0-orig/PC/msvcrtmodule.c 2019-10-14 16:34:47.000000000 +0300 -+++ Python-3.8.0/PC/msvcrtmodule.c 2019-10-22 10:01:48.891228000 +0300 -@@ -21,7 +21,9 @@ - #include - #include - #include -+#ifdef _DEBUG - #include -+#endif - #include - - #ifdef _MSC_VER -diff -Naur Python-3.8.0-orig/Python/dynamic_annotations.c Python-3.8.0/Python/dynamic_annotations.c ---- Python-3.8.0-orig/Python/dynamic_annotations.c 2019-10-14 16:34:47.000000000 +0300 -+++ Python-3.8.0/Python/dynamic_annotations.c 2019-10-22 10:01:49.296828700 +0300 -@@ -27,7 +27,7 @@ - * Author: Kostya Serebryany - */ - --#ifdef _MSC_VER -+#ifdef MS_WINDOWS - # include - #endif - -diff -Naur Python-3.8.0-orig/setup.py Python-3.8.0/setup.py ---- Python-3.8.0-orig/setup.py 2019-10-22 10:01:47.378025300 +0300 -+++ Python-3.8.0/setup.py 2019-10-22 10:01:49.702429400 +0300 -@@ -1540,6 +1540,27 @@ - '-framework', 'SystemConfiguration', - '-framework', 'CoreFoundation'])) - -+ # Modules with some Windows dependencies: -+ if MS_WINDOWS: -+ srcdir = sysconfig.get_config_var('srcdir') -+ pc_srcdir = os.path.abspath(os.path.join(srcdir, 'PC')) -+ -+ self.add(Extension('msvcrt', [os.path.join(pc_srcdir, p) -+ for p in ['msvcrtmodule.c']])) -+ -+ self.add(Extension('_winapi', ['_winapi.c'])) -+ -+ self.add(Extension('_msi', [os.path.join(pc_srcdir, p) -+ for p in ['_msi.c']], -+ libraries=['msi','cabinet','rpcrt4'])) # To link with lib(msi|cabinet|rpcrt4).a -+ -+ self.add(Extension('winsound', [os.path.join(pc_srcdir, p) -+ for p in ['winsound.c']], -+ libraries=['winmm'])) -+ -+ self.add(Extension('_overlapped', ['overlapped.c'], -+ libraries=['ws2_32'])) -+ - def detect_compress_exts(self): - # Andrew Kuchling's zlib module. Note that some versions of zlib - # 1.1.3 have security problems. See CERT Advisory CA-2002-07: diff --git a/mingw-w64-python/0410-MINGW-build-extensions-with-GCC.patch b/mingw-w64-python/0410-MINGW-build-extensions-with-GCC.patch deleted file mode 100644 index 436f2c442d..0000000000 --- a/mingw-w64-python/0410-MINGW-build-extensions-with-GCC.patch +++ /dev/null @@ -1,57 +0,0 @@ -diff -Naur Python-3.8.0-orig/Lib/distutils/command/build_ext.py Python-3.8.0/Lib/distutils/command/build_ext.py ---- Python-3.8.0-orig/Lib/distutils/command/build_ext.py 2019-10-14 16:34:47.000000000 +0300 -+++ Python-3.8.0/Lib/distutils/command/build_ext.py 2019-10-22 10:01:53.789636600 +0300 -@@ -186,7 +186,7 @@ - # for extensions under windows use different directories - # for Release and Debug builds. - # also Python's library directory must be appended to library_dirs -- if os.name == 'nt': -+ if os.name == 'nt' and not self.plat_name.startswith(('mingw')): - # the 'libs' directory is for binary installs - we assume that - # must be the *native* platform. But we don't really support - # cross-compiling via a binary install anyway, so we let it go. -@@ -703,6 +703,20 @@ - # pyconfig.h that MSVC groks. The other Windows compilers all seem - # to need it mentioned explicitly, though, so that's what we do. - # Append '_d' to the python import library on debug builds. -+ -+ # Use self.plat_name as it works even in case of -+ # cross-compilation (at least for mingw build). -+ if self.plat_name.startswith('mingw'): -+ from distutils import sysconfig -+ extra = [] -+ for lib in ( -+ sysconfig.get_config_var('BLDLIBRARY').split() -+ + sysconfig.get_config_var('SHLIBS').split() -+ ): -+ if lib.startswith('-l'): -+ extra.append(lib[2:]) -+ return ext.libraries + extra -+ - if sys.platform == "win32": - from distutils._msvccompiler import MSVCCompiler - if not isinstance(self.compiler, MSVCCompiler): -diff -Naur Python-3.8.0-orig/Lib/distutils/util.py Python-3.8.0/Lib/distutils/util.py ---- Python-3.8.0-orig/Lib/distutils/util.py 2019-10-14 16:34:47.000000000 +0300 -+++ Python-3.8.0/Lib/distutils/util.py 2019-10-22 10:01:54.210837300 +0300 -@@ -36,6 +36,8 @@ - - """ - if os.name == 'nt': -+ if 'GCC' in sys.version: -+ return 'mingw' - if 'amd64' in sys.version.lower(): - return 'win-amd64' - if '(arm)' in sys.version.lower(): -diff -Naur Python-3.8.0-orig/Lib/sysconfig.py Python-3.8.0/Lib/sysconfig.py ---- Python-3.8.0-orig/Lib/sysconfig.py 2019-10-22 10:00:21.731874800 +0300 -+++ Python-3.8.0/Lib/sysconfig.py 2019-10-22 10:01:54.600838000 +0300 -@@ -643,6 +643,8 @@ - - """ - if os.name == 'nt': -+ if 'GCC' in sys.version: -+ return 'mingw' - if 'amd64' in sys.version.lower(): - return 'win-amd64' - if '(arm)' in sys.version.lower(): diff --git a/mingw-w64-python/0420-MINGW-use-Mingw32CCompiler-as-default-compiler-for-m.patch b/mingw-w64-python/0420-MINGW-use-Mingw32CCompiler-as-default-compiler-for-m.patch deleted file mode 100644 index e75f0871a3..0000000000 --- a/mingw-w64-python/0420-MINGW-use-Mingw32CCompiler-as-default-compiler-for-m.patch +++ /dev/null @@ -1,52 +0,0 @@ -diff -Naur Python-3.8.0-orig/Lib/distutils/ccompiler.py Python-3.8.0/Lib/distutils/ccompiler.py ---- Python-3.8.0-orig/Lib/distutils/ccompiler.py 2019-10-14 16:34:47.000000000 +0300 -+++ Python-3.8.0/Lib/distutils/ccompiler.py 2019-10-22 10:01:58.266844500 +0300 -@@ -9,7 +9,7 @@ - from distutils.file_util import move_file - from distutils.dir_util import mkpath - from distutils.dep_util import newer_pairwise, newer_group --from distutils.util import split_quoted, execute -+from distutils.util import split_quoted, execute, get_platform - from distutils import log - - class CCompiler: -@@ -948,6 +948,8 @@ - osname = os.name - if platform is None: - platform = sys.platform -+ if get_platform().startswith('mingw'): -+ return 'mingw32' - for pattern, compiler in _default_compilers: - if re.match(pattern, platform) is not None or \ - re.match(pattern, osname) is not None: -diff -Naur Python-3.8.0-orig/Lib/distutils/cygwinccompiler.py Python-3.8.0/Lib/distutils/cygwinccompiler.py ---- Python-3.8.0-orig/Lib/distutils/cygwinccompiler.py 2019-10-14 16:34:47.000000000 +0300 -+++ Python-3.8.0/Lib/distutils/cygwinccompiler.py 2019-10-22 10:01:58.656845200 +0300 -@@ -255,11 +255,16 @@ - output_dir = '' - obj_names = [] - for src_name in source_filenames: -- # use normcase to make sure '.rc' is really '.rc' and not '.RC' -- base, ext = os.path.splitext(os.path.normcase(src_name)) -+ base, ext = os.path.splitext(src_name) -+ # use 'normcase' only for resource suffixes -+ ext_normcase = os.path.normcase(ext) -+ if ext_normcase in ['.rc','.res']: -+ ext = ext_normcase - if ext not in (self.src_extensions + ['.rc','.res']): - raise UnknownFileError("unknown file type '%s' (from '%s')" % \ - (ext, src_name)) -+ base = os.path.splitdrive(base)[1] # Chop off the drive -+ base = base[os.path.isabs(base):] # If abs, chop off leading / - if strip_dir: - base = os.path.basename (base) - if ext in ('.res', '.rc'): -@@ -315,7 +320,7 @@ - - # Include the appropriate MSVC runtime library if Python was built - # with MSVC 7.0 or later. -- self.dll_libraries = get_msvcr() -+ self.dll_libraries = get_msvcr() or [] - - # Because these compilers aren't configured in Python's pyconfig.h file by - # default, we should at least warn the user if he is using an unmodified diff --git a/mingw-w64-python/0430-MINGW-find-import-library.patch b/mingw-w64-python/0430-MINGW-find-import-library.patch deleted file mode 100644 index f9cdb180b4..0000000000 --- a/mingw-w64-python/0430-MINGW-find-import-library.patch +++ /dev/null @@ -1,11 +0,0 @@ -diff -Naur Python-3.8.0-orig/Lib/distutils/cygwinccompiler.py Python-3.8.0/Lib/distutils/cygwinccompiler.py ---- Python-3.8.0-orig/Lib/distutils/cygwinccompiler.py 2019-10-22 10:02:00.856449000 +0300 -+++ Python-3.8.0/Lib/distutils/cygwinccompiler.py 2019-10-22 10:02:01.979651000 +0300 -@@ -93,6 +93,7 @@ - obj_extension = ".o" - static_lib_extension = ".a" - shared_lib_extension = ".dll" -+ dylib_lib_extension = ".dll.a" - static_lib_format = "lib%s%s" - shared_lib_format = "%s%s" - exe_extension = ".exe" diff --git a/mingw-w64-python/0440-MINGW-setup-_ssl-module.patch b/mingw-w64-python/0440-MINGW-setup-_ssl-module.patch deleted file mode 100644 index 8d3fd06b10..0000000000 --- a/mingw-w64-python/0440-MINGW-setup-_ssl-module.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -Naur Python-3.8.0-orig/setup.py Python-3.8.0/setup.py ---- Python-3.8.0-orig/setup.py 2019-10-22 10:01:52.635234600 +0300 -+++ Python-3.8.0/setup.py 2019-10-22 10:02:04.772055900 +0300 -@@ -2257,6 +2257,8 @@ - openssl_includes = split_var('OPENSSL_INCLUDES', '-I') - openssl_libdirs = split_var('OPENSSL_LDFLAGS', '-L') - openssl_libs = split_var('OPENSSL_LIBS', '-l') -+ if MS_WINDOWS: -+ openssl_libs += tuple(['ws2_32']) - if not openssl_libs: - # libssl and libcrypto not found - self.missing.extend(['_ssl', '_hashlib']) diff --git a/mingw-w64-python/0460-MINGW-generalization-of-posix-build-in-sysconfig.py.patch b/mingw-w64-python/0460-MINGW-generalization-of-posix-build-in-sysconfig.py.patch deleted file mode 100644 index ed8eced239..0000000000 --- a/mingw-w64-python/0460-MINGW-generalization-of-posix-build-in-sysconfig.py.patch +++ /dev/null @@ -1,61 +0,0 @@ -diff -Naur Python-3.8.0-orig/Lib/sysconfig.py Python-3.8.0/Lib/sysconfig.py ---- Python-3.8.0-orig/Lib/sysconfig.py 2019-10-22 10:01:57.159242500 +0300 -+++ Python-3.8.0/Lib/sysconfig.py 2019-10-22 10:02:07.580060800 +0300 -@@ -97,6 +97,9 @@ - _CONFIG_VARS = None - _USER_BASE = None - -+# GCC[mingw*] use posix build system -+_POSIX_BUILD = os.name == 'posix' or \ -+ (os.name == "nt" and 'GCC' in sys.version) - - def _safe_realpath(path): - try: -@@ -180,7 +183,7 @@ - - - def _get_default_scheme(): -- if os.name == 'posix': -+ if _POSIX_BUILD: - # the default scheme for posix is posix_prefix - return 'posix_prefix' - return os.name -@@ -196,7 +199,7 @@ - def joinuser(*args): - return os.path.expanduser(os.path.join(*args)) - -- if os.name == "nt": -+ if os.name == "nt" and not _POSIX_BUILD: - base = os.environ.get("APPDATA") or "~" - return joinuser(base, "Python") - -@@ -493,7 +496,7 @@ - def get_config_h_filename(): - """Return the path of pyconfig.h.""" - if _PYTHON_BUILD: -- if os.name == "nt": -+ if os.name == "nt" and not _POSIX_BUILD: - inc_dir = os.path.join(_sys_home or _PROJECT_BASE, "PC") - else: - inc_dir = _sys_home or _PROJECT_BASE -@@ -564,9 +567,9 @@ - # sys.abiflags may not be defined on all platforms. - _CONFIG_VARS['abiflags'] = '' - -- if os.name == 'nt': -+ if os.name == 'nt' and not _POSIX_BUILD: - _init_non_posix(_CONFIG_VARS) -- if os.name == 'posix': -+ if _POSIX_BUILD: - _init_posix(_CONFIG_VARS) - # For backward compatibility, see issue19555 - SO = _CONFIG_VARS.get('EXT_SUFFIX') -@@ -579,7 +582,7 @@ - - # Always convert srcdir to an absolute path - srcdir = _CONFIG_VARS.get('srcdir', _PROJECT_BASE) -- if os.name == 'posix': -+ if _POSIX_BUILD: - if _PYTHON_BUILD: - # If srcdir is a relative path (typically '.' or '..') - # then it should be interpreted relative to the directory diff --git a/mingw-w64-python/0462-MINGW-support-stdcall-without-underscore.patch b/mingw-w64-python/0462-MINGW-support-stdcall-without-underscore.patch deleted file mode 100644 index bcd83aaf58..0000000000 --- a/mingw-w64-python/0462-MINGW-support-stdcall-without-underscore.patch +++ /dev/null @@ -1,34 +0,0 @@ -diff -Naur Python-3.8.0-orig/Modules/_ctypes/_ctypes.c Python-3.8.0/Modules/_ctypes/_ctypes.c ---- Python-3.8.0-orig/Modules/_ctypes/_ctypes.c 2019-10-14 16:34:47.000000000 +0300 -+++ Python-3.8.0/Modules/_ctypes/_ctypes.c 2019-10-22 10:02:10.434865800 +0300 -@@ -3342,11 +3342,30 @@ - mangled_name = alloca(strlen(name) + 1 + 1 + 1 + 3); /* \0 _ @ %d */ - if (!mangled_name) - return NULL; -+ /* Issue: for stdcall decorated export functions MSVC compiler adds -+ * underscore, but GCC compiler create them without. This is -+ * visible by example for _ctypes_test.pyd module. -+ * As well functions from system libraries are without underscore. -+ * Solutions: -+ * - If a python module is build with gcc option --add-stdcall-alias -+ * the module will contain XXX as alias for function XXX@ as result -+ * first search in this method will succeed. -+ * - Distutil may use compiler to create def-file, to modify it as -+ * add underscore alias and with new def file to create module. -+ * - Or may be just to search for function without underscore. -+ */ - for (i = 0; i < 32; ++i) { - sprintf(mangled_name, "_%s@%d", name, i*4); - Py_BEGIN_ALLOW_THREADS - address = (PPROC)GetProcAddress(handle, mangled_name); - Py_END_ALLOW_THREADS -+ if (address) -+ return address; -+ /* search for function without underscore as weel */ -+ sprintf(mangled_name, "%s@%d", name, i*4); -+ Py_BEGIN_ALLOW_THREADS -+ address = (PPROC)GetProcAddress(handle, mangled_name); -+ Py_END_ALLOW_THREADS - if (address) - return address; - } diff --git a/mingw-w64-python/0464-use-replace-instead-rename-to-avoid-failure-on-windo.patch b/mingw-w64-python/0464-use-replace-instead-rename-to-avoid-failure-on-windo.patch deleted file mode 100644 index 36e1e375ef..0000000000 --- a/mingw-w64-python/0464-use-replace-instead-rename-to-avoid-failure-on-windo.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -Naur Python-3.8.0-orig/setup.py Python-3.8.0/setup.py ---- Python-3.8.0-orig/setup.py 2019-10-22 10:02:06.503658900 +0300 -+++ Python-3.8.0/setup.py 2019-10-22 10:02:13.258470800 +0300 -@@ -2434,7 +2434,7 @@ - else: - newfilename = filename + minoronly - log.info('renaming %s to %s', filename, newfilename) -- os.rename(filename, newfilename) -+ os.replace(filename, newfilename) - newoutfiles.append(newfilename) - if filename in updated_files: - newupdated_files.append(newfilename) diff --git a/mingw-w64-python/0470-MINGW-avoid-circular-dependency-from-time-module-dur.patch b/mingw-w64-python/0470-MINGW-avoid-circular-dependency-from-time-module-dur.patch deleted file mode 100644 index 89a9968b7f..0000000000 --- a/mingw-w64-python/0470-MINGW-avoid-circular-dependency-from-time-module-dur.patch +++ /dev/null @@ -1,19 +0,0 @@ -diff -Naur Python-3.8.0-orig/Lib/distutils/cygwinccompiler.py Python-3.8.0/Lib/distutils/cygwinccompiler.py ---- Python-3.8.0-orig/Lib/distutils/cygwinccompiler.py 2019-10-22 10:02:03.680054000 +0300 -+++ Python-3.8.0/Lib/distutils/cygwinccompiler.py 2019-10-22 10:02:16.066475700 +0300 -@@ -48,7 +48,6 @@ - import os - import sys - import copy --from subprocess import Popen, PIPE, check_output - import re - - from distutils.ccompiler import gen_preprocess_options, gen_lib_options -@@ -385,6 +384,7 @@ - executable = cmd.split()[0] - if find_executable(executable) is None: - return None -+ from subprocess import Popen, PIPE - out = Popen(cmd, shell=True, stdout=PIPE).stdout - try: - out_string = out.read() diff --git a/mingw-w64-python/0480-MINGW-generalization-of-posix-build-in-distutils-sys.patch b/mingw-w64-python/0480-MINGW-generalization-of-posix-build-in-distutils-sys.patch deleted file mode 100644 index d4753273a0..0000000000 --- a/mingw-w64-python/0480-MINGW-generalization-of-posix-build-in-distutils-sys.patch +++ /dev/null @@ -1,76 +0,0 @@ -diff -Naur Python-3.8.0-orig/Lib/distutils/sysconfig.py Python-3.8.0/Lib/distutils/sysconfig.py ---- Python-3.8.0-orig/Lib/distutils/sysconfig.py 2019-10-22 10:01:10.872961200 +0300 -+++ Python-3.8.0/Lib/distutils/sysconfig.py 2019-10-22 10:02:18.890080700 +0300 -@@ -65,6 +65,17 @@ - python_build = _python_build() - - -+def _posix_build(): -+ # GCC[mingw*] use posix build system -+ # Check for cross builds explicitly -+ host_platform = os.environ.get("_PYTHON_HOST_PLATFORM") -+ if host_platform: -+ if host_platform.startswith('mingw'): -+ return True -+ return os.name == 'posix' or \ -+ (os.name == "nt" and 'GCC' in sys.version) -+posix_build = _posix_build() -+ - # Calculate the build qualifier flags if they are defined. Adding the flags - # to the include and lib directories only makes sense for an installation, not - # an in-source build. -@@ -98,7 +109,7 @@ - """ - if prefix is None: - prefix = plat_specific and BASE_EXEC_PREFIX or BASE_PREFIX -- if os.name == "posix": -+ if posix_build: - if python_build: - # Assume the executable is in the build directory. The - # pyconfig.h file should be in the same directory. Since -@@ -145,7 +156,7 @@ - else: - prefix = plat_specific and EXEC_PREFIX or PREFIX - -- if os.name == "posix": -+ if posix_build: - libpython = os.path.join(prefix, - "lib", "python" + get_python_version()) - if standard_lib: -@@ -255,7 +266,7 @@ - def get_config_h_filename(): - """Return full pathname of installed pyconfig.h file.""" - if python_build: -- if os.name == "nt": -+ if os.name == "nt" and not posix_build: - inc_dir = os.path.join(_sys_home or project_base, "PC") - else: - inc_dir = _sys_home or project_base -@@ -461,6 +472,9 @@ - - - def _init_nt(): -+ if posix_build: -+ _init_posix() -+ return - """Initialize the module as appropriate for NT""" - g = {} - # set basic install directories -@@ -510,7 +524,7 @@ - - # Always convert srcdir to an absolute path - srcdir = _config_vars.get('srcdir', project_base) -- if os.name == 'posix': -+ if posix_build: - if python_build: - # If srcdir is a relative path (typically '.' or '..') - # then it should be interpreted relative to the directory -@@ -529,7 +543,7 @@ - # Normally it is relative to the build directory. However, during - # testing, for example, we might be running a non-installed python - # from a different directory. -- if python_build and os.name == "posix": -+ if python_build and posix_build: - base = project_base - if (not os.path.isabs(_config_vars['srcdir']) and - base != os.getcwd()): diff --git a/mingw-w64-python/0490-MINGW-customize-site.patch b/mingw-w64-python/0490-MINGW-customize-site.patch deleted file mode 100644 index 52752ec221..0000000000 --- a/mingw-w64-python/0490-MINGW-customize-site.patch +++ /dev/null @@ -1,38 +0,0 @@ -diff -Naur Python-3.8.0-orig/Lib/site.py Python-3.8.0/Lib/site.py ---- Python-3.8.0-orig/Lib/site.py 2019-10-14 16:34:47.000000000 +0300 -+++ Python-3.8.0/Lib/site.py 2019-10-22 10:02:21.776085800 +0300 -@@ -251,7 +251,8 @@ - def joinuser(*args): - return os.path.expanduser(os.path.join(*args)) - -- if os.name == "nt": -+ from sysconfig import _POSIX_BUILD -+ if os.name == "nt" and not _POSIX_BUILD: - base = os.environ.get("APPDATA") or "~" - return joinuser(base, "Python") - -@@ -266,7 +267,8 @@ - def _get_path(userbase): - version = sys.version_info - -- if os.name == 'nt': -+ from sysconfig import _POSIX_BUILD -+ if sys.platform == 'win32' and not _POSIX_BUILD: - return f'{userbase}\\Python{version[0]}{version[1]}\\site-packages' - - if sys.platform == 'darwin' and sys._framework: -@@ -329,12 +331,13 @@ - if prefixes is None: - prefixes = PREFIXES - -+ from sysconfig import _POSIX_BUILD - for prefix in prefixes: - if not prefix or prefix in seen: - continue - seen.add(prefix) - -- if os.sep == '/': -+ if _POSIX_BUILD: - sitepackages.append(os.path.join(prefix, "lib", - "python%d.%d" % sys.version_info[:2], - "site-packages")) diff --git a/mingw-w64-python/0500-add-python-config-sh.patch b/mingw-w64-python/0500-add-python-config-sh.patch deleted file mode 100644 index be9fa77862..0000000000 --- a/mingw-w64-python/0500-add-python-config-sh.patch +++ /dev/null @@ -1,143 +0,0 @@ -diff -Naur Python-3.8.0-orig/Misc/python-config.sh.in Python-3.8.0/Misc/python-config.sh.in ---- Python-3.8.0-orig/Misc/python-config.sh.in 2019-10-14 16:34:47.000000000 +0300 -+++ Python-3.8.0/Misc/python-config.sh.in 2019-10-22 10:02:24.584090700 +0300 -@@ -1,32 +1,44 @@ - #!/bin/sh - --# Keep this script in sync with python-config.in -- - exit_with_usage () - { - echo "Usage: $0 --prefix|--exec-prefix|--includes|--libs|--cflags|--ldflags|--extension-suffix|--help|--abiflags|--configdir|--embed" -- exit $1 -+ exit 1 - } - -+# Really, python-config.py (and thus .sh) should be called directly, but -+# sometimes software (e.g. GDB) calls python-config.sh as if it were the -+# Python executable, passing python-config.py as the first argument. -+# Work around that oddness by ignoring any .py passed as first arg. -+case "$1" in -+ *.py) -+ shift -+ ;; -+esac -+ - if [ "$1" = "" ] ; then -- exit_with_usage 1 -+ exit_with_usage - fi - - # Returns the actual prefix where this script was installed to. - installed_prefix () - { -- RESULT=$(dirname $(cd $(dirname "$1") && pwd -P)) -- if which readlink >/dev/null 2>&1 ; then -- if readlink -f "$RESULT" >/dev/null 2>&1; then -- RESULT=$(readlink -f "$RESULT") -- fi -+ local RESULT=$(dirname $(cd $(dirname "$1") && pwd -P)) -+ if [ $(which readlink) ] ; then -+ RESULT=$(readlink -f "$RESULT") -+ fi -+ # Since we don't know where the output from this script will end up -+ # we keep all paths in Windows-land since MSYS2 can handle that -+ # while native tools can't handle paths in MSYS2-land. -+ if [ "$OSTYPE" = "msys" ]; then -+ RESULT=$(cd "$RESULT" && pwd -W) - fi - echo $RESULT - } - - prefix_real=$(installed_prefix "$0") - --# Use sed to fix paths from their built-to locations to their installed-to -+# Use sed to fix paths from their built-to locations to their installed to - # locations. Keep prefix & exec_prefix using their original values in case - # they are referenced in other configure variables, to prevent double - # substitution, issue #22140. -@@ -41,13 +53,17 @@ - LIBC="@LIBC@" - SYSLIBS="$LIBM $LIBC" - ABIFLAGS="@ABIFLAGS@" -+# Protect against lack of substitution. -+if [ "$ABIFLAGS" = "@""ABIFLAGS""@" ] ; then -+ ABIFLAGS= -+fi - LIBS="@LIBPYTHON@ @LIBS@ $SYSLIBS" - LIBS_EMBED="-lpython${VERSION}${ABIFLAGS} @LIBS@ $SYSLIBS" - BASECFLAGS="@BASECFLAGS@" --LDLIBRARY="@LDLIBRARY@" - OPT="@OPT@" - PY_ENABLE_SHARED="@PY_ENABLE_SHARED@" - LDVERSION="@LDVERSION@" -+LDLIBRARY="@LDLIBRARY@" - LIBDEST=${prefix_real}/lib/python${VERSION} - LIBPL=$(echo "@LIBPL@" | sed "s#$prefix#$prefix_real#") - SO="@EXT_SUFFIX@" -@@ -61,7 +77,7 @@ - do - case $ARG in - --help) -- exit_with_usage 0 -+ exit_with_usage - ;; - --embed) - PY_EMBED=1 -@@ -69,7 +85,7 @@ - --prefix|--exec-prefix|--includes|--libs|--cflags|--ldflags|--extension-suffix|--abiflags|--configdir) - ;; - *) -- exit_with_usage 1 -+ exit_with_usage - ;; - esac - done -@@ -80,37 +96,37 @@ - - for ARG in "$@" - do -- case "$ARG" in -+ case $ARG in - --prefix) -- echo "$prefix_real" -+ echo -ne "$prefix_real" - ;; - --exec-prefix) -- echo "$exec_prefix_real" -+ echo -ne "$exec_prefix_real " - ;; - --includes) -- echo "$INCDIR $PLATINCDIR" -+ echo -ne "$INCDIR $PLATINCDIR" - ;; - --cflags) -- echo "$INCDIR $PLATINCDIR $BASECFLAGS $CFLAGS $OPT" -+ echo -ne "$INCDIR $PLATINCDIR $BASECFLAGS $CFLAGS $OPT" - ;; - --libs) -- echo "$LIBS" -+ echo -ne "$LIBS" - ;; - --ldflags) - LIBPLUSED= - if [ "$PY_ENABLE_SHARED" = "0" ] ; then - LIBPLUSED="-L$LIBPL" - fi -- echo "$LIBPLUSED -L$libdir $LIBS" -+ echo -ne "$LIBPLUSED -L$libdir $LIBS " - ;; - --extension-suffix) -- echo "$SO" -+ echo -ne "$SO " - ;; - --abiflags) -- echo "$ABIFLAGS" -+ echo -ne "$ABIFLAGS " - ;; - --configdir) -- echo "$LIBPL" -+ echo -ne "$LIBPL " - ;; - esac - done diff --git a/mingw-w64-python/0510-cross-darwin-feature.patch b/mingw-w64-python/0510-cross-darwin-feature.patch deleted file mode 100644 index 30ae92c9ba..0000000000 --- a/mingw-w64-python/0510-cross-darwin-feature.patch +++ /dev/null @@ -1,120 +0,0 @@ -diff -Naur Python-3.8.0-orig/configure.ac Python-3.8.0/configure.ac ---- Python-3.8.0-orig/configure.ac 2019-10-22 10:01:42.698017100 +0300 -+++ Python-3.8.0/configure.ac 2019-10-22 10:02:27.392095600 +0300 -@@ -377,6 +377,7 @@ - then - # avoid using uname for cross builds - if test "$cross_compiling" = yes; then -+ ac_sys_release= - # ac_sys_system and ac_sys_release are used for setting - # a lot of different things including 'define_xopen_source' - # in the case statement below. -@@ -390,6 +391,27 @@ - *-*-cygwin*) - ac_sys_system=Cygwin - ;; -+ *-*-darwin*) -+ ac_sys_system=Darwin -+ ac_sys_release=$(echo $host | sed -n 's/.*-[^0-9]\+\([0-9]\+\)/\1/p') -+ if test -z "$ac_sys_release"; then -+ # A reasonable default. -+ ac_sys_release=11 -+ fi -+ # Use the last released version number for old versions. -+ if test "$ac_sys_release" = "9" ; then -+ ac_sys_release=9.8 -+ elif test "$ac_sys_release" = "10" ; then -+ ac_sys_release=10.8 -+ elif test "$ac_sys_release" = "11" ; then -+ ac_sys_release=11.4.0 -+ elif test "$ac_sys_release" = "12" ; then -+ ac_sys_release=12.0.0 -+ else -+ # ..and .0.0 for unknown versions. -+ ac_sys_release=${ac_sys_release}.0.0 -+ fi -+ ;; - *-*-vxworks*) - ac_sys_system=VxWorks - ;; -@@ -398,7 +420,6 @@ - MACHDEP="unknown" - AC_MSG_ERROR([cross build not supported for $host]) - esac -- ac_sys_release= - else - ac_sys_system=`uname -s` - if test "$ac_sys_system" = "AIX" \ -@@ -445,6 +466,9 @@ - *-*-mingw*) - _host_cpu= - ;; -+ *-*-darwin*) -+ _host_cpu= -+ ;; - *) - # for now, limit cross builds to known configurations - MACHDEP="unknown" -@@ -1619,6 +1643,26 @@ - AC_SUBST(CFLAGS_NODIST) - AC_SUBST(LDFLAGS_NODIST) - -+if test "x$cross_compiling" = xyes; then -+ function cross_arch -+ { -+ case $host in -+ x86_64*darwin*) -+ echo i386 -+ ;; -+ x86_64*) -+ echo x86_64 -+ ;; -+ *) -+ echo i386 -+ ;; -+ esac -+ } -+ ARCH_PROG=cross_arch -+else -+ ARCH_PROG=/usr/bin/arch -+fi -+ - # The -arch flags for universal builds on OSX - UNIVERSAL_ARCH_FLAGS= - AC_SUBST(UNIVERSAL_ARCH_FLAGS) -@@ -1970,7 +2014,7 @@ - ;; - esac - else -- if test `/usr/bin/arch` = "i386" -+ if test "$($ARCH_PROG)" = "i386" - then - # 10.4 was the first release to support Intel archs - cur_target="10.4" -@@ -2526,7 +2570,7 @@ - if test "${enable_universalsdk}"; then - : - else -- LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`" -+ LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only $($ARCH_PROG)" - fi - LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)' - LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';; -@@ -2551,7 +2595,7 @@ - ]])],[ac_osx_32bit=yes],[ac_osx_32bit=no],[ac_osx_32bit=yes]) - - if test "${ac_osx_32bit}" = "yes"; then -- case `/usr/bin/arch` in -+ case $($ARCH_PROG) in - i386) - MACOSX_DEFAULT_ARCH="i386" - ;; -@@ -2563,7 +2607,7 @@ - ;; - esac - else -- case `/usr/bin/arch` in -+ case $($ARCH_PROG) in - i386) - MACOSX_DEFAULT_ARCH="x86_64" - ;; diff --git a/mingw-w64-python/0520-py3k-mingw-ntthreads-vs-pthreads.patch b/mingw-w64-python/0520-py3k-mingw-ntthreads-vs-pthreads.patch deleted file mode 100644 index 24c444f86e..0000000000 --- a/mingw-w64-python/0520-py3k-mingw-ntthreads-vs-pthreads.patch +++ /dev/null @@ -1,43 +0,0 @@ -diff -Naur Python-3.8.0-orig/Include/internal/pycore_condvar.h Python-3.8.0/Include/internal/pycore_condvar.h ---- Python-3.8.0-orig/Include/internal/pycore_condvar.h 2019-10-14 16:34:47.000000000 +0300 -+++ Python-3.8.0/Include/internal/pycore_condvar.h 2019-10-22 10:02:30.231300600 +0300 -@@ -5,6 +5,12 @@ - # error "this header requires Py_BUILD_CORE define" - #endif - -+#ifdef __MINGW32__ -+# if !defined(HAVE_PTHREAD_H) || defined(NT_THREADS) -+# undef _POSIX_THREADS -+# endif -+#endif -+ - #ifndef _POSIX_THREADS - /* This means pthreads are not implemented in libc headers, hence the macro - not present in unistd.h. But they still can be implemented as an external -@@ -37,6 +43,10 @@ - /* include windows if it hasn't been done before */ - #define WIN32_LEAN_AND_MEAN - #include -+/* winpthreads are involved via windows header, so need undef _POSIX_THREADS after header include */ -+#if defined(_POSIX_THREADS) -+#undef _POSIX_THREADS -+#endif - - /* options */ - /* non-emulated condition variables are provided for those that want -diff -Naur Python-3.8.0-orig/Include/pythread.h Python-3.8.0/Include/pythread.h ---- Python-3.8.0-orig/Include/pythread.h 2019-10-14 16:34:47.000000000 +0300 -+++ Python-3.8.0/Include/pythread.h 2019-10-22 10:02:30.652501400 +0300 -@@ -9,6 +9,12 @@ - extern "C" { - #endif - -+#ifdef __MINGW32__ -+# if !defined(HAVE_PTHREAD_H) || defined(NT_THREADS) -+# undef _POSIX_THREADS -+# endif -+#endif -+ - /* Return status codes for Python lock acquisition. Chosen for maximum - * backwards compatibility, ie failure -> 0, success -> 1. */ - typedef enum PyLockStatus { diff --git a/mingw-w64-python/0530-mingw-system-libffi.patch b/mingw-w64-python/0530-mingw-system-libffi.patch deleted file mode 100644 index be9ca93b68..0000000000 --- a/mingw-w64-python/0530-mingw-system-libffi.patch +++ /dev/null @@ -1,14 +0,0 @@ -diff -Naur Python-3.8.0-orig/setup.py Python-3.8.0/setup.py ---- Python-3.8.0-orig/setup.py 2019-10-22 10:02:14.974473800 +0300 -+++ Python-3.8.0/setup.py 2019-10-22 10:02:33.866107000 +0300 -@@ -2030,6 +2030,10 @@ - return True - - def configure_ctypes(self, ext): -+ if MS_WINDOWS: -+ ext.libraries.extend(['ole32', 'oleaut32', 'uuid']) -+ ext.export_symbols.extend(['DllGetClassObject PRIVATE', -+ 'DllCanUnloadNow PRIVATE']) - if not self.use_system_libffi: - if MACOS: - return self.configure_ctypes_darwin(ext) diff --git a/mingw-w64-python/0555-msys-mingw-prefer-unix-sep-if-MSYSTEM.patch b/mingw-w64-python/0555-msys-mingw-prefer-unix-sep-if-MSYSTEM.patch deleted file mode 100644 index e581453fc3..0000000000 --- a/mingw-w64-python/0555-msys-mingw-prefer-unix-sep-if-MSYSTEM.patch +++ /dev/null @@ -1,377 +0,0 @@ -diff -Naur Python-3.8.0-orig/Include/pylifecycle.h Python-3.8.0/Include/pylifecycle.h ---- Python-3.8.0-orig/Include/pylifecycle.h 2019-10-14 16:34:47.000000000 +0300 -+++ Python-3.8.0/Include/pylifecycle.h 2019-10-22 10:02:36.752112100 +0300 -@@ -21,6 +21,12 @@ - PyAPI_FUNC(PyThreadState *) Py_NewInterpreter(void); - PyAPI_FUNC(void) Py_EndInterpreter(PyThreadState *); - -+PyAPI_FUNC(wchar_t) Py_GetSepW(const wchar_t *); -+PyAPI_FUNC(char) Py_GetSepA(const char *); -+ -+PyAPI_FUNC(void) Py_NormalizeSepsW(wchar_t *); -+PyAPI_FUNC(void) Py_NormalizeSepsA(char *); -+ - - /* Py_PyAtExit is for the atexit module, Py_AtExit is for low-level - * exit functions. -diff -Naur Python-3.8.0-orig/Lib/ntpath.py Python-3.8.0/Lib/ntpath.py ---- Python-3.8.0-orig/Lib/ntpath.py 2019-10-14 16:34:47.000000000 +0300 -+++ Python-3.8.0/Lib/ntpath.py 2019-10-22 10:02:37.157712800 +0300 -@@ -11,9 +11,7 @@ - curdir = '.' - pardir = '..' - extsep = '.' --sep = '\\' - pathsep = ';' --altsep = '/' - defpath = '.;C:\\bin' - devnull = 'nul' - -@@ -23,6 +21,15 @@ - import genericpath - from genericpath import * - -+if sys.platform == "win32" and "MSYSTEM" in os.environ: -+ sep = '/' -+ altsep = '\\' -+else: -+ sep = '\\' -+ altsep = '/' -+bsep = str.encode(sep) -+baltsep = str.encode(altsep) -+ - __all__ = ["normcase","isabs","join","splitdrive","split","splitext", - "basename","dirname","commonprefix","getsize","getmtime", - "getatime","getctime", "islink","exists","lexists","isdir","isfile", -@@ -33,9 +40,27 @@ - - def _get_bothseps(path): - if isinstance(path, bytes): -- return b'\\/' -+ return bsep+baltsep -+ else: -+ return sep+altsep -+ -+def _get_sep(path): -+ if isinstance(path, bytes): -+ return bsep -+ else: -+ return sep -+ -+def _get_altsep(path): -+ if isinstance(path, bytes): -+ return baltsep -+ else: -+ return altsep -+ -+def _get_colon(path): -+ if isinstance(path, bytes): -+ return b':' - else: -- return '\\/' -+ return ':' - - # Normalize the case of a pathname and map slashes to backslashes. - # Other normalizations (such as optimizing '../' away) are not done -@@ -47,9 +72,9 @@ - Makes all characters lowercase and all slashes into backslashes.""" - s = os.fspath(s) - if isinstance(s, bytes): -- return s.replace(b'/', b'\\').lower() -+ return s.replace(baltsep, bsep).lower() - else: -- return s.replace('/', '\\').lower() -+ return s.replace(altsep, sep).lower() - - - # Return whether a path is absolute. -@@ -68,14 +93,9 @@ - # Join two (or more) paths. - def join(path, *paths): - path = os.fspath(path) -- if isinstance(path, bytes): -- sep = b'\\' -- seps = b'\\/' -- colon = b':' -- else: -- sep = '\\' -- seps = '\\/' -- colon = ':' -+ sep = _get_sep(path) -+ seps = _get_bothseps(path) -+ colon = _get_colon(path) - try: - if not paths: - path[:0] + sep #23780: Ensure compatible data type even if p is null. -@@ -134,14 +154,9 @@ - """ - p = os.fspath(p) - if len(p) >= 2: -- if isinstance(p, bytes): -- sep = b'\\' -- altsep = b'/' -- colon = b':' -- else: -- sep = '\\' -- altsep = '/' -- colon = ':' -+ sep = _get_sep(p) -+ altsep = _get_altsep(p) -+ colon = _get_colon(p) - normp = p.replace(altsep, sep) - if (normp[0:2] == sep*2) and (normp[2:3] != sep): - # is a UNC path: -@@ -195,9 +210,9 @@ - def splitext(p): - p = os.fspath(p) - if isinstance(p, bytes): -- return genericpath._splitext(p, b'\\', b'/', b'.') -+ return genericpath._splitext(p, bsep, baltsep, b'.') - else: -- return genericpath._splitext(p, '\\', '/', '.') -+ return genericpath._splitext(p, sep, altsep, '.') - splitext.__doc__ = genericpath._splitext.__doc__ - - -@@ -442,15 +457,13 @@ - def normpath(path): - """Normalize path, eliminating double slashes, etc.""" - path = os.fspath(path) -+ sep = _get_sep(path) -+ altsep = _get_altsep(path) - if isinstance(path, bytes): -- sep = b'\\' -- altsep = b'/' - curdir = b'.' - pardir = b'..' - special_prefixes = (b'\\\\.\\', b'\\\\?\\') - else: -- sep = '\\' -- altsep = '/' - curdir = '.' - pardir = '..' - special_prefixes = ('\\\\.\\', '\\\\?\\') -@@ -620,6 +620,7 @@ - # strip the prefix anyway. - if ex.winerror == initial_winerror: - path = spath -+ path = normpath(path) - return path - - -@@ -645,12 +658,11 @@ - def relpath(path, start=None): - """Return a relative version of a path""" - path = os.fspath(path) -+ sep = _get_sep(path) - if isinstance(path, bytes): -- sep = b'\\' - curdir = b'.' - pardir = b'..' - else: -- sep = '\\' - curdir = '.' - pardir = '..' - -@@ -705,13 +717,11 @@ - raise ValueError('commonpath() arg is an empty sequence') - - paths = tuple(map(os.fspath, paths)) -+ sep = _get_sep(paths[0]) -+ altsep = _get_altsep(paths[0]) - if isinstance(paths[0], bytes): -- sep = b'\\' -- altsep = b'/' - curdir = b'.' - else: -- sep = '\\' -- altsep = '/' - curdir = '.' - - try: -diff -Naur Python-3.8.0-orig/Modules/posixmodule.c Python-3.8.0/Modules/posixmodule.c ---- Python-3.8.0-orig/Modules/posixmodule.c 2019-10-22 10:00:56.988936800 +0300 -+++ Python-3.8.0/Modules/posixmodule.c 2019-10-22 10:02:37.547713500 +0300 -@@ -3438,6 +3438,7 @@ - return PyErr_SetFromWindowsErr(0); - } - -+ Py_NormalizeSepsW(wbuf2); - PyObject *resobj = PyUnicode_FromWideChar(wbuf2, len); - if (wbuf2 != wbuf) { - PyMem_RawFree(wbuf2); -@@ -3886,6 +3887,7 @@ - result = GetFullPathNameW(path->wide, result, woutbufp, &wtemp); - } - if (result) { -+ Py_NormalizeSepsW(woutbufp); - v = PyUnicode_FromWideChar(woutbufp, wcslen(woutbufp)); - if (path->narrow) - Py_SETREF(v, PyUnicode_EncodeFSDefault(v)); -@@ -3962,6 +3964,7 @@ - target_path = tmp; - } - -+ Py_NormalizeSepsW(target_path); - result = PyUnicode_FromWideChar(target_path, result_length); - if (result && path->narrow) { - Py_SETREF(result, PyUnicode_EncodeFSDefault(result)); -diff -Naur Python-3.8.0-orig/Python/initconfig.c Python-3.8.0/Python/initconfig.c ---- Python-3.8.0-orig/Python/initconfig.c 2019-10-14 16:34:47.000000000 +0300 -+++ Python-3.8.0/Python/initconfig.c 2019-10-22 10:02:37.968914200 +0300 -@@ -98,7 +98,7 @@ - "PYTHONDEVMODE: enable the development mode.\n" - "PYTHONPYCACHEPREFIX: root directory for bytecode cache (pyc) files.\n"; - --#if defined(MS_WINDOWS) -+#if defined(_MSC_VER) - # define PYTHONHOMEHELP "\\python{major}{minor}" - #else - # define PYTHONHOMEHELP "/lib/pythonX.X" -@@ -1129,7 +1129,7 @@ - } - - /* Last fall back: hardcoded name */ --#ifdef MS_WINDOWS -+#ifdef _MSC_VER - const wchar_t *default_program_name = L"python"; - #else - const wchar_t *default_program_name = L"python3"; -diff -Naur Python-3.8.0-orig/Python/pathconfig.c Python-3.8.0/Python/pathconfig.c ---- Python-3.8.0-orig/Python/pathconfig.c 2019-10-14 16:34:47.000000000 +0300 -+++ Python-3.8.0/Python/pathconfig.c 2019-10-22 10:02:38.358914900 +0300 -@@ -13,6 +13,114 @@ - extern "C" { - #endif - -+#ifdef __MINGW32__ -+#define wcstok wcstok_s -+#include -+#endif -+ -+char -+Py_GetSepA(const char *name) -+{ -+ char* msystem = (char*)2; /* So that non Windows use / as sep */ -+ static char sep = '\0'; -+#ifdef _WIN32 -+ /* https://msdn.microsoft.com/en-gb/library/windows/desktop/aa365247%28v=vs.85%29.aspx -+ * The "\\?\" prefix .. indicate that the path should be passed to the system with minimal -+ * modification, which means that you cannot use forward slashes to represent path separators -+ */ -+ if (name != NULL && memcmp(name, "\\\\?\\", sizeof("\\\\?\\") - sizeof(char)) == 0) -+ { -+ return '\\'; -+ } -+#endif -+ if (sep != '\0') -+ return sep; -+#if defined(__MINGW32__) -+ msystem = Py_GETENV("MSYSTEM"); -+#endif -+ if (msystem != NULL) -+ sep = '/'; -+ else -+ sep = '\\'; -+ return sep; -+} -+ -+static char -+Py_GetAltSepA(const char *name) -+{ -+ char sep = Py_GetSepA(name); -+ if (sep == '/') -+ return '\\'; -+ return '/'; -+} -+ -+void -+Py_NormalizeSepsA(char *name) -+{ -+ char sep = Py_GetSepA(name); -+ char altsep = Py_GetAltSepA(name); -+ char* seps; -+ if (strlen(name) > 1 && name[1] == ':') { -+ name[0] = toupper(name[0]); -+ } -+ seps = strchr(name, altsep); -+ while(seps) { -+ *seps = sep; -+ seps = strchr(seps, altsep); -+ } -+} -+ -+wchar_t -+Py_GetSepW(const wchar_t *name) -+{ -+ char* msystem = (char*)2; /* So that non Windows use / as sep */ -+ static wchar_t sep = L'\0'; -+#ifdef _WIN32 -+ /* https://msdn.microsoft.com/en-gb/library/windows/desktop/aa365247%28v=vs.85%29.aspx -+ * The "\\?\" prefix .. indicate that the path should be passed to the system with minimal -+ * modification, which means that you cannot use forward slashes to represent path separators -+ */ -+ if (name != NULL && memcmp(name, L"\\\\?\\", sizeof(L"\\\\?\\") - sizeof(wchar_t)) == 0) -+ { -+ return L'\\'; -+ } -+#endif -+ if (sep != L'\0') -+ return sep; -+#if defined(__MINGW32__) -+ msystem = Py_GETENV("MSYSTEM"); -+#endif -+ if (msystem != NULL) -+ sep = L'/'; -+ else -+ sep = L'\\'; -+ return sep; -+} -+ -+static wchar_t -+Py_GetAltSepW(const wchar_t *name) -+{ -+ char sep = Py_GetSepW(name); -+ if (sep == L'/') -+ return L'\\'; -+ return L'/'; -+} -+ -+void -+Py_NormalizeSepsW(wchar_t *name) -+{ -+ wchar_t sep = Py_GetSepW(name); -+ wchar_t altsep = Py_GetAltSepW(name); -+ wchar_t* seps; -+ if (wcslen(name) > 1 && name[1] == L':') { -+ name[0] = towupper(name[0]); -+ } -+ seps = wcschr(name, altsep); -+ while(seps) { -+ *seps = sep; -+ seps = wcschr(seps, altsep); -+ } -+} - - _PyPathConfig _Py_path_config = _PyPathConfig_INIT; - #ifdef MS_WINDOWS -@@ -560,6 +668,7 @@ - if (_Py_path_config.program_name == NULL) { - Py_FatalError("Py_SetProgramName() failed: out of memory"); - } -+ Py_NormalizeSepsW(_Py_path_config.program_name); - } - - void -diff -Naur Python-3.8.0-orig/Python/traceback.c Python-3.8.0/Python/traceback.c ---- Python-3.8.0-orig/Python/traceback.c 2019-10-14 16:34:47.000000000 +0300 -+++ Python-3.8.0/Python/traceback.c 2019-10-22 10:02:39.170116300 +0300 -@@ -315,7 +315,7 @@ - filepath = PyBytes_AS_STRING(filebytes); - - /* Search tail of filename in sys.path before giving up */ -- tail = strrchr(filepath, SEP); -+ tail = strrchr(filepath, Py_GetSepA(filepath)); - if (tail == NULL) - tail = filepath; - else diff --git a/mingw-w64-python/0560-mingw-use-posix-getpath.patch b/mingw-w64-python/0560-mingw-use-posix-getpath.patch deleted file mode 100644 index 863ec1874a..0000000000 --- a/mingw-w64-python/0560-mingw-use-posix-getpath.patch +++ /dev/null @@ -1,401 +0,0 @@ -diff -Naur Python-3.8.0-orig/Include/pylifecycle.h Python-3.8.0/Include/pylifecycle.h ---- Python-3.8.0-orig/Include/pylifecycle.h 2019-10-22 10:02:41.276120000 +0300 -+++ Python-3.8.0/Include/pylifecycle.h 2019-10-22 10:02:44.427325500 +0300 -@@ -53,7 +53,7 @@ - PyAPI_FUNC(wchar_t *) Py_GetExecPrefix(void); - PyAPI_FUNC(wchar_t *) Py_GetPath(void); - PyAPI_FUNC(void) Py_SetPath(const wchar_t *); --#ifdef MS_WINDOWS -+#ifdef _MSC_VER - int _Py_CheckPython3(void); - #endif - -diff -Naur Python-3.8.0-orig/Modules/getpath.c Python-3.8.0/Modules/getpath.c ---- Python-3.8.0-orig/Modules/getpath.c 2019-10-14 16:34:47.000000000 +0300 -+++ Python-3.8.0/Modules/getpath.c 2019-10-22 10:02:44.848526300 +0300 -@@ -14,6 +14,11 @@ - # include - #endif - -+#ifdef MS_WINDOWS -+#include -+#include -+#endif -+ - /* Search in some common locations for the associated Python libraries. - * - * Two directories must be found, the platform independent directory -@@ -132,13 +137,39 @@ - int prefix_found; /* found platform independent libraries? */ - int exec_prefix_found; /* found the platform dependent libraries? */ - -+ wchar_t *dll_path; - int warnings; - const wchar_t *pythonpath_env; - } PyCalculatePath; - - static const wchar_t delimiter[2] = {DELIM, '\0'}; --static const wchar_t separator[2] = {SEP, '\0'}; -+static wchar_t separator[2] = {SEP, '\0'}; - -+static int -+is_sep(wchar_t ch) -+{ -+#ifdef _WIN32 -+ return ch == SEP || ch == ALTSEP; -+#else -+ return ch == SEP; -+#endif -+} -+ -+static int -+is_absolute(const wchar_t *path) -+{ -+#ifdef _WIN32 -+ size_t i = wcslen(path); -+ if (i >= 3) { -+ if (iswalpha(path[0]) && path[1] == L':' && is_sep(path[2])) { -+ return 1; -+ } -+ } -+ return 0; -+#else -+ return path[0] == SEP; -+#endif -+} - - /* Get file status. Encode the path to the locale encoding. */ - static int -@@ -161,7 +192,7 @@ - reduce(wchar_t *dir) - { - size_t i = wcslen(dir); -- while (i > 0 && dir[i] != SEP) { -+ while (i > 0 && !is_sep(dir[i])) { - --i; - } - dir[i] = '\0'; -@@ -241,14 +272,14 @@ - joinpath(wchar_t *buffer, const wchar_t *stuff, size_t buflen) - { - size_t n, k; -- if (stuff[0] != SEP) { -+ if (!is_sep(stuff[0])) { - n = wcslen(buffer); - if (n >= buflen) { - return PATHLEN_ERR(); - } - -- if (n > 0 && buffer[n-1] != SEP) { -- buffer[n++] = SEP; -+ if (n > 0 && !is_sep(buffer[n-1]) != SEP) { -+ buffer[n++] = Py_GetSepW(buffer); - } - } - else { -@@ -284,7 +315,7 @@ - static PyStatus - copy_absolute(wchar_t *path, const wchar_t *p, size_t pathlen) - { -- if (p[0] == SEP) { -+ if (is_absolute(p)) { - if (safe_wcscpy(path, p, pathlen) < 0) { - return PATHLEN_ERR(); - } -@@ -297,7 +328,7 @@ - } - return _PyStatus_OK(); - } -- if (p[0] == '.' && p[1] == SEP) { -+ if (p[0] == '.' && is_sep(p[1])) { - p += 2; - } - PyStatus status = joinpath(path, p, pathlen); -@@ -313,7 +344,7 @@ - static PyStatus - absolutize(wchar_t *path, size_t path_len) - { -- if (path[0] == SEP) { -+ if (is_absolute(path)) { - return _PyStatus_OK(); - } - -@@ -403,6 +434,7 @@ - return status; - } - -+ Py_NormalizeSepsW(path); - if (isfile(path)) { - /* Check VPATH to see if argv0_path is in the build directory. - VPATH can be empty. */ -@@ -427,6 +459,7 @@ - return status; - } - -+ Py_NormalizeSepsW(prefix); - if (ismodule(prefix, prefix_len)) { - *found = -1; - reduce(prefix); -@@ -529,12 +562,21 @@ - * return the compiled-in defaults instead. - */ - if (calculate->prefix_found > 0) { -+#ifdef _WIN32 -+ wchar_t drive_root[3]; -+ memset(drive_root, 0, sizeof(drive_root)); -+ wcsncpy(drive_root, prefix, 3); -+#endif - reduce(prefix); - reduce(prefix); - /* The prefix is the root directory, but reduce() chopped - * off the "/". */ - if (!prefix[0]) { -+#ifdef _WIN32 -+ wcsncpy(prefix, drive_root, 3); -+#else - wcscpy(prefix, separator); -+#endif - } - pathconfig->prefix = _PyMem_RawWcsdup(prefix); - } -@@ -649,6 +691,7 @@ - - /* Check for pybuilddir.txt */ - assert(*found == 0); -+ Py_NormalizeSepsW(exec_prefix); - status = calculate_pybuilddir(argv0_path, exec_prefix, exec_prefix_len, - found); - if (_PyStatus_EXCEPTION(status)) { -@@ -734,6 +777,7 @@ - if (_PyStatus_EXCEPTION(status)) { - return status; - } -+ Py_NormalizeSepsW(exec_prefix); - } - /* If we found EXEC_PREFIX do *not* reduce it! (Yet.) */ - return _PyStatus_OK(); -@@ -746,11 +790,20 @@ - wchar_t *exec_prefix) - { - if (calculate->exec_prefix_found > 0) { -+#ifdef _WIN32 -+ wchar_t drive_root[3]; -+ memset(drive_root, 0, sizeof(drive_root)); -+ wcsncpy(drive_root, exec_prefix, 3); -+#endif - reduce(exec_prefix); - reduce(exec_prefix); - reduce(exec_prefix); - if (!exec_prefix[0]) { -+#ifdef _WIN32 -+ wcsncpy(exec_prefix, drive_root, 3); -+#else - wcscpy(exec_prefix, separator); -+#endif - } - - pathconfig->exec_prefix = _PyMem_RawWcsdup(exec_prefix); -@@ -767,6 +820,48 @@ - } - - -+#ifdef MS_WINDOWS -+static int -+GetWindowsModulePaths(wchar_t *progpath) -+{ -+ int result = 0; -+ wchar_t program_full_path[MAXPATHLEN+1]; -+ memset(program_full_path, 0, sizeof(program_full_path)); -+ -+ if (GetModuleFileNameW(NULL, program_full_path, MAXPATHLEN)) { -+ result = 1; -+ Py_NormalizeSepsW(program_full_path); -+ } -+ -+ wcscpy(progpath, program_full_path); -+ return result; -+} -+ -+ -+wchar_t* -+_Py_GetDLLPath(void) -+{ -+ wchar_t dll_path[MAXPATHLEN+1]; -+ memset(dll_path, 0, sizeof(dll_path)); -+ -+#ifdef Py_ENABLE_SHARED -+ extern HANDLE PyWin_DLLhModule; -+ if (PyWin_DLLhModule) { -+ if (GetModuleFileNameW(PyWin_DLLhModule, dll_path, MAXPATHLEN)) { -+ Py_NormalizeSepsW(dll_path); -+ } else { -+ dll_path[0] = 0; -+ } -+ } -+#else -+ dll_path[0] = 0; -+#endif -+ -+ return _PyMem_RawWcsdup(dll_path); -+} -+#endif /* MS_WINDOWS */ -+ -+ - static PyStatus - calculate_program_full_path(PyCalculatePath *calculate, _PyPathConfig *pathconfig) - { -@@ -789,7 +884,7 @@ - * other way to find a directory to start the search from. If - * $PATH isn't exported, you lose. - */ -- if (wcschr(pathconfig->program_name, SEP)) { -+ if (wcschr(pathconfig->program_name, Py_GetSepW(pathconfig->program_name))) { - if (safe_wcscpy(program_full_path, pathconfig->program_name, - program_full_path_len) < 0) { - return PATHLEN_ERR(); -@@ -821,6 +916,10 @@ - PyMem_RawFree(path); - } - #endif /* __APPLE__ */ -+#ifdef MS_WINDOWS -+ else if(GetWindowsModulePaths(program_full_path)) { -+ } -+#endif /* MS_WINDOWS */ - else if (calculate->path_env) { - wchar_t *path = calculate->path_env; - while (1) { -@@ -861,7 +960,7 @@ - else { - program_full_path[0] = '\0'; - } -- if (program_full_path[0] != SEP && program_full_path[0] != '\0') { -+ if (!is_absolute(program_full_path)) { - status = absolutize(program_full_path, program_full_path_len); - if (_PyStatus_EXCEPTION(status)) { - return status; -@@ -1071,6 +1170,7 @@ - if (_PyStatus_EXCEPTION(status)) { - return status; - } -+ Py_NormalizeSepsW(zip_path); - - /* Replace "00" with version */ - size_t bufsz = wcslen(zip_path); -@@ -1098,7 +1198,7 @@ - while (1) { - wchar_t *delim = wcschr(defpath, DELIM); - -- if (defpath[0] != SEP) { -+ if (!is_absolute(defpath)) { - /* Paths are relative to prefix */ - bufsz += prefixsz; - } -@@ -1115,6 +1215,11 @@ - - bufsz += wcslen(zip_path) + 1; - bufsz += wcslen(exec_prefix) + 1; -+#ifdef MS_WINDOWS -+ if (is_absolute(prefix)) { -+ bufsz += wcslen(prefix) + 1; -+ } -+#endif - - /* Allocate the buffer */ - wchar_t *buf = PyMem_RawMalloc(bufsz * sizeof(wchar_t)); -@@ -1140,9 +1245,9 @@ - while (1) { - wchar_t *delim = wcschr(defpath, DELIM); - -- if (defpath[0] != SEP) { -+ if (!is_absolute(defpath)) { - wcscat(buf, prefix); -- if (prefixsz >= 2 && prefix[prefixsz - 2] != SEP && -+ if (prefixsz >= 2 && !is_sep(prefix[prefixsz - 2]) && - defpath[0] != (delim ? DELIM : L'\0')) - { - /* not empty */ -@@ -1163,6 +1268,12 @@ - defpath = delim + 1; - } - wcscat(buf, delimiter); -+#ifdef MS_WINDOWS -+ if (is_absolute(prefix)) { -+ wcscat(buf, prefix); -+ wcscat(buf, delimiter); -+ } -+#endif - - /* Finally, on goes the directory for dynamic-load modules */ - wcscat(buf, exec_prefix); -@@ -1188,16 +1299,20 @@ - if (!calculate->pythonpath) { - return DECODE_LOCALE_ERR("PYTHONPATH define", len); - } -+ Py_NormalizeSepsW(calculate->pythonpath); - - calculate->prefix = Py_DecodeLocale(PREFIX, &len); - if (!calculate->prefix) { - return DECODE_LOCALE_ERR("PREFIX define", len); - } -+ Py_NormalizeSepsW(calculate->prefix); - calculate->exec_prefix = Py_DecodeLocale(EXEC_PREFIX, &len); - if (!calculate->exec_prefix) { - return DECODE_LOCALE_ERR("EXEC_PREFIX define", len); - } -- calculate->lib_python = Py_DecodeLocale("lib/python" VERSION, &len); -+ Py_NormalizeSepsW(calculate->exec_prefix); -+ const char *lib_python_VERSION = (Py_GetSepW(NULL) == L'/') ? "lib/python" VERSION : "lib\\python" VERSION; -+ calculate->lib_python = Py_DecodeLocale(lib_python_VERSION, &len); - if (!calculate->lib_python) { - return DECODE_LOCALE_ERR("EXEC_PREFIX define", len); - } -@@ -1215,6 +1330,7 @@ - PyMem_RawFree(calculate->pythonpath); - PyMem_RawFree(calculate->prefix); - PyMem_RawFree(calculate->exec_prefix); -+ PyMem_RawFree(calculate->dll_path); - PyMem_RawFree(calculate->lib_python); - PyMem_RawFree(calculate->path_env); - } -@@ -1225,6 +1341,8 @@ - { - PyStatus status; - -+ calculate->dll_path = _Py_GetDLLPath(); -+ - if (pathconfig->program_full_path == NULL) { - status = calculate_program_full_path(calculate, pathconfig); - if (_PyStatus_EXCEPTION(status)) { -@@ -1343,6 +1461,7 @@ - { - PyStatus status; - PyCalculatePath calculate; -+ separator[0] = Py_GetSepW(NULL); - memset(&calculate, 0, sizeof(calculate)); - - status = calculate_init(&calculate, config); -diff -Naur Python-3.8.0-orig/Modules/posixmodule.c Python-3.8.0/Modules/posixmodule.c ---- Python-3.8.0-orig/Modules/posixmodule.c 2019-10-22 10:02:42.087321400 +0300 -+++ Python-3.8.0/Modules/posixmodule.c 2019-10-22 10:02:45.238527000 +0300 -@@ -3691,7 +3691,7 @@ - Py_END_ALLOW_THREADS - /* FindNextFile sets error to ERROR_NO_MORE_FILES if - it got to the end of the directory. */ -- if (!result && GetLastError() != ERROR_NO_MORE_FILES) { -+ if (!result && GetLastError() != 0 && GetLastError() != ERROR_NO_MORE_FILES) { - Py_DECREF(list); - list = path_error(path); - goto exit; -diff -Naur Python-3.8.4-orig/Python/dynload_win.c Python-3.8.4/Python/dynload_win.c ---- Python-3.8.4-orig/Python/dynload_win.c 2019-10-22 10:01:24.710185500 +0300 -+++ Python-3.8.4/Python/dynload_win.c 2019-10-22 10:02:45.644127700 +0300 -@@ -180,7 +180,9 @@ - char funcname[258], *import_python; - const wchar_t *wpathname; - -+#if defined(_MSC_VER) - _Py_CheckPython3(); -+#endif - - wpathname = _PyUnicode_AsUnicode(pathname); - if (wpathname == NULL) diff --git a/mingw-w64-python/0565-mingw-add-ModuleFileName-dir-to-PATH.patch b/mingw-w64-python/0565-mingw-add-ModuleFileName-dir-to-PATH.patch deleted file mode 100644 index 3c09b265bb..0000000000 --- a/mingw-w64-python/0565-mingw-add-ModuleFileName-dir-to-PATH.patch +++ /dev/null @@ -1,40 +0,0 @@ -diff -Naur Python-3.8.0-orig/Modules/getpath.c Python-3.8.0/Modules/getpath.c ---- Python-3.8.0-orig/Modules/getpath.c 2019-10-22 10:02:47.765731400 +0300 -+++ Python-3.8.0/Modules/getpath.c 2019-10-22 10:02:49.637734700 +0300 -@@ -1393,6 +1393,36 @@ - return status; - } - -+#ifdef MS_WINDOWS -+ if (calculate->path_env) { -+ wchar_t *module_path, *norm_path; -+ // Add path of executable/dll to system path. This -+ // is so that the correct tcl??.dll and tk??.dll get used. -+ module_path = calculate->dll_path[0] ? calculate->dll_path : pathconfig->program_full_path; -+ norm_path = (wchar_t *)alloca(sizeof(wchar_t) * (wcslen(module_path) + 1)); -+ if (norm_path) { -+ wchar_t *slashes, *end, *new_path; -+ wcscpy(norm_path, module_path); -+ slashes = wcschr(norm_path, L'/'); -+ while (slashes) { -+ *slashes = L'\\'; -+ slashes = wcschr(slashes + 1, L'/'); -+ } -+ end = wcsrchr(norm_path, L'\\') ? wcsrchr(norm_path, L'\\') : norm_path + wcslen(norm_path); -+ end[1] = L'\0'; -+ -+ new_path = (wchar_t *)alloca(sizeof(wchar_t) * (wcslen(L"PATH=") + wcslen(calculate->path_env) + 1 + wcslen(norm_path) + 1)); -+ if (new_path) { -+ wcscpy(new_path, L"PATH="); -+ wcscat(new_path, calculate->path_env); -+ wcscat(new_path, L";"); -+ wcscat(new_path, norm_path); -+ _wputenv(new_path); -+ } -+ } -+ } -+#endif -+ - if ((!calculate->prefix_found || !calculate->exec_prefix_found) && - calculate->warnings) - { diff --git a/mingw-w64-python/0570-mingw-add-BUILDIN_WIN32_MODULEs-time-msvcrt.patch b/mingw-w64-python/0570-mingw-add-BUILDIN_WIN32_MODULEs-time-msvcrt.patch deleted file mode 100644 index ca32a62e8e..0000000000 --- a/mingw-w64-python/0570-mingw-add-BUILDIN_WIN32_MODULEs-time-msvcrt.patch +++ /dev/null @@ -1,9 +0,0 @@ -diff -Naur Python-3.8.0-orig/Modules/Setup.config.in Python-3.8.0/Modules/Setup.config.in ---- Python-3.8.0-orig/Modules/Setup.config.in 2019-10-22 10:01:08.018156200 +0300 -+++ Python-3.8.0/Modules/Setup.config.in 2019-10-22 10:02:53.303741100 +0300 -@@ -11,4 +11,5 @@ - - # build-in modules for windows platform: - @USE_WIN32_MODULE@winreg ../PC/winreg.c -+@USE_WIN32_MODULE@msvcrt -DPy_BUILD_CORE ../PC/msvcrtmodule.c - diff --git a/mingw-w64-python/0610-msys-cygwin-semi-native-build-sysconfig.patch b/mingw-w64-python/0610-msys-cygwin-semi-native-build-sysconfig.patch deleted file mode 100644 index 76957662b6..0000000000 --- a/mingw-w64-python/0610-msys-cygwin-semi-native-build-sysconfig.patch +++ /dev/null @@ -1,104 +0,0 @@ -diff -Naur Python-3.8.0-orig/configure.ac Python-3.8.0/configure.ac ---- Python-3.8.0-orig/configure.ac 2019-10-22 10:02:29.123698700 +0300 -+++ Python-3.8.0/configure.ac 2019-10-22 10:02:56.595346900 +0300 -@@ -598,6 +598,65 @@ - AC_DEFINE(_INCLUDE__STDC_A1_SOURCE, 1, Define to include mbstate_t for mbrtowc) - fi - -+# On 'semi-native' build systems (MSYS*/Cygwin targeting MinGW-w64) -+# _sysconfigdata.py will contain paths that are correct only in the -+# build environment. This means external modules will fail to build -+# without setting up the same env and also that the build of Python -+# itself will fail as the paths are not correct for the host tools. -+# -+# Also, getpath.c uses GetModuleFileNameW (replacing \ with /) and -+# compares that with the define VPATH (passed in via command-line) -+# to determine whether it's the build- or the installed-Python. -+# -+# To work around these issues a set of _b2h variables are created: -+# VPATH_b2h, prefix_b2h, srcdir_b2h, abs_srcdir_b2h -+# and abs_builddir_b2h -+# .. where b2h stands for build to host. sysconfig.py replaces path -+# prefixes matching the non-b2h versions with the b2h equivalents. -+# -+# (note this assumes the host compilers are native and *not* cross -+# - in the 'semi-native' scenario only that is.) -+ -+AC_DEFUN([ABS_PATH_HOST], -+[$1=$(cd $$2 && pwd) -+ case $build_os in -+ mingw*) -+ case $host_os in -+ mingw*) $1=$(cd $$2 && pwd -W) ;; -+ *) ;; -+ esac -+ ;; -+ cygwin*) -+ case $host_os in -+ mingw*) $1=$(cygpath -w -m $$2) ;; -+ *) ;; -+ esac -+ ;; -+ esac -+AC_SUBST([$1]) -+]) -+ -+AC_MSG_CHECKING(absolute host location of VPATH) -+ABS_PATH_HOST([VPATH_b2h],[srcdir]) -+AC_MSG_RESULT([$VPATH_b2h]) -+ -+AC_MSG_CHECKING(absolute host location of prefix) -+ABS_PATH_HOST([prefix_b2h],[prefix]) -+AC_MSG_RESULT([$prefix_b2h]) -+ -+AC_MSG_CHECKING(absolute host location of srcdir) -+ABS_PATH_HOST([srcdir_b2h],[srcdir]) -+AC_MSG_RESULT([$srcdir_b2h]) -+ -+AC_MSG_CHECKING(absolute host location of abs_srcdir) -+ABS_PATH_HOST([abs_srcdir_b2h],[srcdir]) -+AC_MSG_RESULT([$abs_srcdir_b2h]) -+ -+my_builddir=. -+AC_MSG_CHECKING(Absolute host location of abs_builddir) -+ABS_PATH_HOST([abs_builddir_b2h],[my_builddir]) -+AC_MSG_RESULT([$abs_builddir_b2h]) -+ - AC_MSG_CHECKING([for init system calls]) - AC_SUBST(INITSYS) - case $host in -diff -Naur Python-3.8.0-orig/Lib/sysconfig.py Python-3.8.0/Lib/sysconfig.py ---- Python-3.8.0-orig/Lib/sysconfig.py 2019-10-22 10:02:09.342863900 +0300 -+++ Python-3.8.0/Lib/sysconfig.py 2019-10-22 10:02:57.000947600 +0300 -@@ -329,6 +329,14 @@ - if isinstance(v, str): - done[k] = v.strip() - -+ # any keys that have one with the same name suffixed with _b2h -+ # need to be replaced with the value of the _b2h key. -+ # This converts from MSYS*/Cygwin paths to Windows paths. -+ for k, v in dict(done).items(): -+ if isinstance(k, str): -+ if k.endswith("_b2h"): -+ done[k[:-4]]=v -+ - # save the results in the global dictionary - vars.update(done) - return vars -diff -Naur Python-3.8.0-orig/Makefile.pre.in Python-3.8.0/Makefile.pre.in ---- Python-3.8.0-orig/Makefile.pre.in 2019-10-22 10:01:28.376191900 +0300 -+++ Python-3.8.0/Makefile.pre.in 2019-10-22 10:02:57.390948300 +0300 -@@ -137,6 +137,13 @@ - # Install prefix for data files - datarootdir= @datarootdir@ - -+# Locations needed for semi-native fixup of sysconfig. -+srcdir_b2h= @srcdir_b2h@ -+VPATH_b2h= @VPATH_b2h@ -+abs_srcdir_b2h= @abs_srcdir_b2h@ -+abs_builddir_b2h= @abs_builddir_b2h@ -+prefix_b2h= @prefix_b2h@ -+ - # Expanded directories - BINDIR= @bindir@ - LIBDIR= @libdir@ diff --git a/mingw-w64-python/0620-mingw-sysconfig-like-posix.patch b/mingw-w64-python/0620-mingw-sysconfig-like-posix.patch deleted file mode 100644 index 33a1a95bc5..0000000000 --- a/mingw-w64-python/0620-mingw-sysconfig-like-posix.patch +++ /dev/null @@ -1,64 +0,0 @@ -diff -Naur Python-3.8.0-orig/Lib/distutils/command/build_ext.py Python-3.8.0/Lib/distutils/command/build_ext.py ---- Python-3.8.0-orig/Lib/distutils/command/build_ext.py 2019-10-22 10:01:56.348041100 +0300 -+++ Python-3.8.0/Lib/distutils/command/build_ext.py 2019-10-22 10:03:01.072554800 +0300 -@@ -221,9 +221,10 @@ - if sys.platform[:6] == 'cygwin': - if sys.executable.startswith(os.path.join(sys.exec_prefix, "bin")): - # building third party extensions -+ config_dir_name = os.path.basename(sysconfig.get_config_var('LIBPL')) - self.library_dirs.append(os.path.join(sys.prefix, "lib", - "python" + get_python_version(), -- "config")) -+ config_dir_name)) - else: - # building python standard extensions - self.library_dirs.append('.') -diff -Naur Python-3.8.0-orig/Lib/sysconfig.py Python-3.8.0/Lib/sysconfig.py ---- Python-3.8.0-orig/Lib/sysconfig.py 2019-10-22 10:02:59.528152100 +0300 -+++ Python-3.8.0/Lib/sysconfig.py 2019-10-22 10:03:01.462555500 +0300 -@@ -43,23 +43,23 @@ - 'data': '{base}', - }, - 'nt': { -- 'stdlib': '{installed_base}/Lib', -- 'platstdlib': '{base}/Lib', -- 'purelib': '{base}/Lib/site-packages', -- 'platlib': '{base}/Lib/site-packages', -- 'include': '{installed_base}/Include', -- 'platinclude': '{installed_base}/Include', -- 'scripts': '{base}/Scripts', -+ 'stdlib': '{installed_base}/lib/python{py_version_short}', -+ 'platstdlib': '{base}/lib/python{py_version_short}', -+ 'purelib': '{base}/lib/python{py_version_short}', -+ 'platlib': '{base}/lib/python{py_version_short}', -+ 'include': '{installed_base}/include/python{py_version_short}', -+ 'platinclude': '{installed_base}/include/python{py_version_short}', -+ 'scripts': '{base}/bin', - 'data': '{base}', - }, - # NOTE: When modifying "purelib" scheme, update site._get_path() too. - 'nt_user': { -- 'stdlib': '{userbase}/Python{py_version_nodot}', -- 'platstdlib': '{userbase}/Python{py_version_nodot}', -- 'purelib': '{userbase}/Python{py_version_nodot}/site-packages', -- 'platlib': '{userbase}/Python{py_version_nodot}/site-packages', -- 'include': '{userbase}/Python{py_version_nodot}/Include', -- 'scripts': '{userbase}/Python{py_version_nodot}/Scripts', -+ 'stdlib': '{userbase}/lib/python{py_version_short}', -+ 'platstdlib': '{userbase}/lib/python{py_version_short}', -+ 'purelib': '{userbase}/lib/python{py_version_short}/site-packages', -+ 'platlib': '{userbase}/lib/python{py_version_short}/site-packages', -+ 'include': '{userbase}/include/python{py_version_short}', -+ 'scripts': '{userbase}/bin', - 'data': '{userbase}', - }, - 'posix_user': { -@@ -461,7 +461,7 @@ - vars['INCLUDEPY'] = get_path('include') - vars['EXT_SUFFIX'] = '.pyd' - vars['EXE'] = '.exe' -- vars['VERSION'] = _PY_VERSION_SHORT_NO_DOT -+ vars['VERSION'] = _PY_VERSION_SHORT - vars['BINDIR'] = os.path.dirname(_safe_realpath(sys.executable)) - - # diff --git a/mingw-w64-python/0630-mingw-_winapi_as_builtin_for_Popen_in_cygwinccompiler.patch b/mingw-w64-python/0630-mingw-_winapi_as_builtin_for_Popen_in_cygwinccompiler.patch deleted file mode 100644 index 72c9f610af..0000000000 --- a/mingw-w64-python/0630-mingw-_winapi_as_builtin_for_Popen_in_cygwinccompiler.patch +++ /dev/null @@ -1,61 +0,0 @@ -diff -Naur Python-3.8.0-orig/Lib/distutils/cygwinccompiler.py Python-3.8.0/Lib/distutils/cygwinccompiler.py ---- Python-3.8.0-orig/Lib/distutils/cygwinccompiler.py 2019-10-22 10:02:17.798078800 +0300 -+++ Python-3.8.0/Lib/distutils/cygwinccompiler.py 2019-10-22 10:03:04.738561200 +0300 -@@ -58,6 +58,7 @@ - from distutils import log - from distutils.version import LooseVersion - from distutils.spawn import find_executable -+from subprocess import Popen, PIPE, check_output - - def get_msvcr(): - """Include the appropriate MSVC runtime library if Python was built -@@ -373,7 +374,7 @@ - return (CONFIG_H_UNCERTAIN, - "couldn't read '%s': %s" % (fn, exc.strerror)) - --RE_VERSION = re.compile(br'(\d+\.\d+(\.\d+)*)') -+RE_VERSION = re.compile(br'[\D\s]*(\d+\.\d+(\.\d+)*)[\D\s]*$') - - def _find_exe_version(cmd): - """Find the version of an executable by running `cmd` in the shell. -@@ -402,7 +403,16 @@ - - If not possible it returns None for it. - """ -- commands = ['gcc -dumpversion', 'ld -v', 'dllwrap --version'] -+ gcc = os.environ.get('CC') or 'gcc' -+ ld = 'ld' -+ out = Popen(gcc+' --print-prog-name ld', shell=True, stdout=PIPE).stdout -+ try: -+ ld = test=str(out.read(),encoding='utf-8').strip() -+ finally: -+ out.close() -+ dllwrap = os.environ.get('DLLWRAP') or 'dllwrap' -+ # MinGW64 doesn't have i686-w64-mingw32-ld, so instead we ask gcc. -+ commands = [gcc+' -dumpversion', ld+' -v', dllwrap+' --version'] - return tuple([_find_exe_version(cmd) for cmd in commands]) - - def is_cygwingcc(): -diff -Naur Python-3.8.0-orig/Modules/Setup.config.in Python-3.8.0/Modules/Setup.config.in ---- Python-3.8.0-orig/Modules/Setup.config.in 2019-10-22 10:02:55.456544900 +0300 -+++ Python-3.8.0/Modules/Setup.config.in 2019-10-22 10:03:05.159762000 +0300 -@@ -12,4 +12,5 @@ - # build-in modules for windows platform: - @USE_WIN32_MODULE@winreg ../PC/winreg.c - @USE_WIN32_MODULE@msvcrt -DPy_BUILD_CORE ../PC/msvcrtmodule.c -+@USE_WIN32_MODULE@_winapi _winapi.c - -diff -Naur Python-3.8.0-orig/setup.py Python-3.8.0/setup.py ---- Python-3.8.0-orig/setup.py 2019-10-22 10:02:35.597710000 +0300 -+++ Python-3.8.0/setup.py 2019-10-22 10:03:05.939763300 +0300 -@@ -1545,7 +1545,9 @@ - self.add(Extension('msvcrt', [os.path.join(pc_srcdir, p) - for p in ['msvcrtmodule.c']])) - -- self.add(Extension('_winapi', ['_winapi.c'])) -+ # Added to Setup.config.in as now needed earlier since I -+ # use subprocess (which uses Popen) in cygwinccompiler.py -+ # self.add(Extension('_winapi', ['_winapi.c'])) - - self.add(Extension('_msi', [os.path.join(pc_srcdir, p) - for p in ['_msi.c']], diff --git a/mingw-w64-python/0640-mingw-x86_64-size_t-format-specifier-pid_t.patch b/mingw-w64-python/0640-mingw-x86_64-size_t-format-specifier-pid_t.patch deleted file mode 100644 index d0d23f0f91..0000000000 --- a/mingw-w64-python/0640-mingw-x86_64-size_t-format-specifier-pid_t.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -Naur Python-3.8.0-orig/Include/pyport.h Python-3.8.0/Include/pyport.h ---- Python-3.8.0-orig/Include/pyport.h 2019-10-22 10:01:16.988171900 +0300 -+++ Python-3.8.0/Include/pyport.h 2019-10-22 10:03:09.574569700 +0300 -@@ -177,6 +177,8 @@ - # define PY_FORMAT_SIZE_T "l" - # elif defined(MS_WINDOWS) - # define PY_FORMAT_SIZE_T "I" -+# elif defined(__MINGW32__) && defined(__USE_MINGW_ANSI_STDIO) -+# define PY_FORMAT_SIZE_T "z" - # else - # error "This platform's pyconfig.h needs to define PY_FORMAT_SIZE_T" - # endif diff --git a/mingw-w64-python/0650-cross-dont-add-multiarch-paths-if-cross-compiling.patch b/mingw-w64-python/0650-cross-dont-add-multiarch-paths-if-cross-compiling.patch deleted file mode 100644 index 45aee2d6af..0000000000 --- a/mingw-w64-python/0650-cross-dont-add-multiarch-paths-if-cross-compiling.patch +++ /dev/null @@ -1,15 +0,0 @@ -diff -Naur Python-3.8.0-orig/setup.py Python-3.8.0/setup.py ---- Python-3.8.0-orig/setup.py 2019-10-22 10:03:08.498167800 +0300 -+++ Python-3.8.0/setup.py 2019-10-22 10:03:12.382574600 +0300 -@@ -654,10 +654,10 @@ - if not CROSS_COMPILING: - add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib') - add_dir_to_list(self.compiler.include_dirs, '/usr/local/include') -+ self.add_multiarch_paths() - # only change this for cross builds for 3.3, issues on Mageia - if CROSS_COMPILING: - self.add_cross_compiling_paths() -- self.add_multiarch_paths() - self.add_ldflags_cppflags() - - def init_inc_lib_dirs(self): diff --git a/mingw-w64-python/0660-mingw-use-backslashes-in-compileall-py.patch b/mingw-w64-python/0660-mingw-use-backslashes-in-compileall-py.patch deleted file mode 100644 index 1b146b2765..0000000000 --- a/mingw-w64-python/0660-mingw-use-backslashes-in-compileall-py.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -Naur Python-3.8.0-orig/Lib/compileall.py Python-3.8.0/Lib/compileall.py ---- Python-3.8.0-orig/Lib/compileall.py 2019-10-14 16:34:47.000000000 +0300 -+++ Python-3.8.0/Lib/compileall.py 2019-10-22 10:03:15.206179600 +0300 -@@ -36,6 +36,8 @@ - if name == '__pycache__': - continue - fullname = os.path.join(dir, name) -+ if sys.platform == "win32" and sys.version.find("GCC") >= 0: -+ fullname = fullname.replace('\\','/') - if ddir is not None: - dfile = os.path.join(ddir, name) - else: diff --git a/mingw-w64-python/0670-msys-convert_path-fix-and-root-hack.patch b/mingw-w64-python/0670-msys-convert_path-fix-and-root-hack.patch deleted file mode 100644 index 8785a6ee7b..0000000000 --- a/mingw-w64-python/0670-msys-convert_path-fix-and-root-hack.patch +++ /dev/null @@ -1,93 +0,0 @@ -diff -Naur Python-3.8.0-orig/Lib/distutils/command/install.py Python-3.8.0/Lib/distutils/command/install.py ---- Python-3.8.0-orig/Lib/distutils/command/install.py 2019-10-14 16:34:47.000000000 +0300 -+++ Python-3.8.0/Lib/distutils/command/install.py 2019-10-22 10:03:18.045384600 +0300 -@@ -341,7 +341,8 @@ - - # Convert directories from Unix /-separated syntax to the local - # convention. -- self.convert_paths('lib', 'purelib', 'platlib', -+ self.convert_paths('base', 'platbase', -+ 'lib', 'purelib', 'platlib', - 'scripts', 'data', 'headers', - 'userbase', 'usersite') - -diff -Naur Python-3.8.0-orig/Lib/distutils/util.py Python-3.8.0/Lib/distutils/util.py ---- Python-3.8.0-orig/Lib/distutils/util.py 2019-10-22 10:01:56.753641800 +0300 -+++ Python-3.8.0/Lib/distutils/util.py 2019-10-22 10:03:18.450985300 +0300 -@@ -130,6 +130,13 @@ - paths.remove('.') - if not paths: - return os.curdir -+ # On Windows, if paths is ['C:','folder','subfolder'] then -+ # os.path.join(*paths) will return 'C:folder\subfolder' which -+ # is thus relative to the CWD on that drive. So we work around -+ # this by adding a \ to path[0] -+ if (len(paths) > 0 and paths[0].endswith(':') and -+ sys.platform == "win32" and sys.version.find("GCC") >= 0): -+ paths[0] += '\\' - return os.path.join(*paths) - - # convert_path () -@@ -140,6 +147,10 @@ - relative, this is equivalent to "os.path.join(new_root,pathname)". - Otherwise, it requires making 'pathname' relative and then joining the - two, which is tricky on DOS/Windows and Mac OS. -+ -+ If on Windows or OS/2 and both new_root and pathname are on different -+ drives, raises DistutilsChangeRootError as this is nonsensical, -+ otherwise use drive which can be in either of new_root or pathname. - """ - if os.name == 'posix': - if not os.path.isabs(pathname): -@@ -149,9 +160,20 @@ - - elif os.name == 'nt': - (drive, path) = os.path.splitdrive(pathname) -- if path[0] == '\\': -+ if path[0] == os.sep: - path = path[1:] -- return os.path.join(new_root, path) -+ (drive_r, path_r) = os.path.splitdrive(new_root) -+ if path_r and path_r[0] == os.sep: -+ path_r = path_r[1:] -+ drive_used = '' -+ if len(drive) == 2 and len(drive_r) == 2 and drive != drive_r: -+ raise DistutilsChangeRootError("root and pathname not on same drive (%s, %s)" -+ % (drive_r,drive)) -+ elif len(drive_r) == 2: -+ drive_used = drive_r+os.sep -+ elif len(drive) == 2: -+ drive_used = drive+os.sep -+ return os.path.join(drive_used+path_r, path) - - else: - raise DistutilsPlatformError("nothing known about platform '%s'" % os.name) -diff -Naur Python-3.8.0-orig/Makefile.pre.in Python-3.8.0/Makefile.pre.in ---- Python-3.8.0-orig/Makefile.pre.in 2019-10-22 10:02:59.949352800 +0300 -+++ Python-3.8.0/Makefile.pre.in 2019-10-22 10:03:18.840986000 +0300 -@@ -1612,6 +1612,12 @@ - else true; \ - fi - -+ifeq ($(shell uname -o),Msys) -+DESTDIRFINAL=$(DESTDIR) -+else -+DESTDIRFINAL=$(DESTDIR)/ -+endif -+ - # Install the dynamically loadable modules - # This goes into $(exec_prefix) - sharedinstall: sharedmods -@@ -1619,9 +1625,9 @@ - --prefix=$(prefix) \ - --install-scripts=$(BINDIR) \ - --install-platlib=$(DESTSHARED) \ -- --root=$(DESTDIR)/ -- -rm $(DESTDIR)$(DESTSHARED)/_sysconfigdata_$(ABIFLAGS)_$(MACHDEP)_$(MULTIARCH).py -- -rm -r $(DESTDIR)$(DESTSHARED)/__pycache__ -+ --root=$(DESTDIRFINAL) -+ -rm $(DESTDIRFINAL)$(DESTSHARED)/_sysconfigdata_$(ABIFLAGS)_$(MACHDEP)_$(MULTIARCH).py -+ -rm -r $(DESTDIRFINAL)$(DESTSHARED)/__pycache__ - - # Here are a couple of targets for MacOSX again, to install a full - # framework-based Python. frameworkinstall installs everything, the diff --git a/mingw-w64-python/0690-allow-static-tcltk.patch b/mingw-w64-python/0690-allow-static-tcltk.patch deleted file mode 100644 index 377abb8fa8..0000000000 --- a/mingw-w64-python/0690-allow-static-tcltk.patch +++ /dev/null @@ -1,69 +0,0 @@ -diff -Naur Python-3.8.0-orig/setup.py Python-3.8.0/setup.py ---- Python-3.8.0-orig/setup.py 2019-10-22 10:03:14.129777700 +0300 -+++ Python-3.8.0/setup.py 2019-10-22 10:03:22.475792400 +0300 -@@ -703,7 +703,7 @@ - if HOST_PLATFORM == 'hp-ux11': - self.lib_dirs += ['/usr/lib/hpux64', '/usr/lib/hpux32'] - -- if MACOS: -+ if MACOS or MS_WINDOWS: - # This should work on any unixy platform ;-) - # If the user has bothered specifying additional -I and -L flags - # in OPT and LDFLAGS we might as well use them here. -@@ -713,6 +713,8 @@ - # directories with whitespace in the name to store libraries. - cflags, ldflags = sysconfig.get_config_vars( - 'CFLAGS', 'LDFLAGS') -+ cflags = cflags + ' ' + ('',os.environ.get('CC'))[os.environ.get('CC') != None] -+ ldflags = ldflags + ' ' + ('',os.environ.get('LDSHARED'))[os.environ.get('LDSHARED') != None] - for item in cflags.split(): - if item.startswith('-I'): - self.inc_dirs.append(item[2:]) -@@ -1907,14 +1909,19 @@ - # The versions with dots are used on Unix, and the versions without - # dots on Windows, for detection by cygwin. - tcllib = tklib = tcl_includes = tk_includes = None -- for version in ['8.6', '86', '8.5', '85', '8.4', '84', '8.3', '83', -- '8.2', '82', '8.1', '81', '8.0', '80']: -- tklib = self.compiler.find_library_file(self.lib_dirs, -- 'tk' + version) -- tcllib = self.compiler.find_library_file(self.lib_dirs, -- 'tcl' + version) -- if tklib and tcllib: -- # Exit the loop when we've found the Tcl/Tk libraries -+ tcltk_suffix = None -+ for suffix in ['', 's']: -+ for version in ['8.6', '86', '8.5', '85', '8.4', '84', '8.3', '83', -+ '8.2', '82', '8.1', '81', '8.0', '80', '']: -+ tklib = self.compiler.find_library_file(self.lib_dirs, -+ 'tk' + version + suffix) -+ tcllib = self.compiler.find_library_file(self.lib_dirs, -+ 'tcl' + version + suffix) -+ if tklib and tcllib: -+ # Exit the loop when we've found the Tcl/Tk libraries -+ tcltk_suffix = suffix -+ break -+ if tcltk_suffix != None: - break - - # Now check for the header files -@@ -1985,10 +1992,18 @@ - # Add the Tcl/Tk libraries - libs.append('tk'+ version) - libs.append('tcl'+ version) -+ libs.append('tk'+ version + tcltk_suffix) -+ libs.append('tcl'+ version + tcltk_suffix) -+ if MS_WINDOWS: -+ for winlib in ['ws2_32','gdi32','comctl32','comdlg32','imm32','uuid','oleaut32','ole32']: -+ libs.append( winlib ) - - # Finally, link with the X11 libraries (not appropriate on cygwin) -- if not CYGWIN: -+ # ...on those platforms, define STATIC_BUILD if linking to static tcl/tk. -+ if not CYGWIN and not MS_WINDOWS: - libs.append('X11') -+ elif tcllib.endswith('s.a'): -+ defs.append( ('STATIC_BUILD',1) ) - - # XXX handle these, but how to detect? - # *** Uncomment and edit for PIL (TkImaging) extension only: diff --git a/mingw-w64-python/0720-mingw-pdcurses_ISPAD.patch b/mingw-w64-python/0720-mingw-pdcurses_ISPAD.patch deleted file mode 100644 index e78c029252..0000000000 --- a/mingw-w64-python/0720-mingw-pdcurses_ISPAD.patch +++ /dev/null @@ -1,17 +0,0 @@ -diff -Naur Python-3.8.0-orig/Include/py_curses.h Python-3.8.0/Include/py_curses.h ---- Python-3.8.0-orig/Include/py_curses.h 2019-10-14 16:34:47.000000000 +0300 -+++ Python-3.8.0/Include/py_curses.h 2019-10-22 10:03:25.689398000 +0300 -@@ -36,6 +36,13 @@ - #include - #endif - -+#if defined(__MINGW32__) -+#include -+#if !defined(_ISPAD) -+#define _ISPAD 0x10 -+#endif -+#endif -+ - #ifdef HAVE_NCURSES_H - /* configure was checking , but we will - use , which has some or all these features. */ diff --git a/mingw-w64-python/0740-grammar-fixes.patch b/mingw-w64-python/0740-grammar-fixes.patch deleted file mode 100644 index 7198d9d0de..0000000000 --- a/mingw-w64-python/0740-grammar-fixes.patch +++ /dev/null @@ -1,25 +0,0 @@ -diff -Naur Python-3.8.0-orig/Python/graminit.c Python-3.8.0/Python/graminit.c ---- Python-3.8.0-orig/Python/graminit.c 2019-10-14 16:34:47.000000000 +0300 -+++ Python-3.8.0/Python/graminit.c 2019-10-22 10:03:28.497403000 +0300 -@@ -1,7 +1,8 @@ - /* Generated by Parser/pgen */ - - #include "grammar.h" --grammar _PyParser_Grammar; -+#include "pyport.h" -+PyAPI_DATA(grammar) _PyParser_Grammar; - static const arc arcs_0_0[3] = { - {2, 1}, - {3, 2}, -diff -Naur Python-3.8.0-orig/Modules/parsermodule.c Python-3.8.0/Modules/parsermodule.c ---- Python-3.8.0-orig/Modules/parsermodule.c 2019-10-14 16:34:47.000000000 +0300 -+++ Python-3.8.0/Modules/parsermodule.c 2019-10-22 10:03:28.497403000 +0300 -@@ -38,7 +38,7 @@ - #include "grammar.h" - #include "parsetok.h" - --extern grammar _PyParser_Grammar; /* From graminit.c */ -+PyAPI_DATA(grammar) _PyParser_Grammar; /* From graminit.c */ - - #ifdef lint - #include diff --git a/mingw-w64-python/0750-builddir-fixes.patch b/mingw-w64-python/0750-builddir-fixes.patch deleted file mode 100644 index 9544f8fa96..0000000000 --- a/mingw-w64-python/0750-builddir-fixes.patch +++ /dev/null @@ -1,49 +0,0 @@ -diff -Naur Python-3.8.0-orig/Makefile.pre.in Python-3.8.0/Makefile.pre.in ---- Python-3.8.0-orig/Makefile.pre.in 2019-10-22 10:03:21.368190400 +0300 -+++ Python-3.8.0/Makefile.pre.in 2019-10-22 10:03:31.336607900 +0300 -@@ -710,20 +710,20 @@ - - Programs/_freeze_importlib.o: Programs/_freeze_importlib.c Makefile - --Programs/_freeze_importlib: Programs/_freeze_importlib.o $(LIBRARY_OBJS_OMIT_FROZEN) -+Programs/_freeze_importlib$(EXE): Programs/_freeze_importlib.o $(LIBRARY_OBJS_OMIT_FROZEN) - $(LINKCC) $(PY_CORE_LDFLAGS) -o $@ Programs/_freeze_importlib.o $(LIBRARY_OBJS_OMIT_FROZEN) $(LIBS) $(MODLIBS) $(SYSLIBS) - - .PHONY: regen-importlib --regen-importlib: Programs/_freeze_importlib -+regen-importlib: Programs/_freeze_importlib$(EXE) - # Regenerate Python/importlib_external.h - # from Lib/importlib/_bootstrap_external.py using _freeze_importlib -- ./Programs/_freeze_importlib importlib._bootstrap_external \ -+ ./Programs/_freeze_importlib$(EXE) importlib._bootstrap_external \ - $(srcdir)/Lib/importlib/_bootstrap_external.py \ - $(srcdir)/Python/importlib_external.h.new - $(UPDATE_FILE) $(srcdir)/Python/importlib_external.h $(srcdir)/Python/importlib_external.h.new - # Regenerate Python/importlib.h from Lib/importlib/_bootstrap.py - # using _freeze_importlib -- ./Programs/_freeze_importlib importlib._bootstrap \ -+ ./Programs/_freeze_importlib$(EXE) importlib._bootstrap \ - $(srcdir)/Lib/importlib/_bootstrap.py \ - $(srcdir)/Python/importlib.h.new - $(UPDATE_FILE) $(srcdir)/Python/importlib.h $(srcdir)/Python/importlib.h.new -@@ -1781,7 +1781,7 @@ - find build -name '*.py[co]' -exec rm -f {} ';' || true - -rm -f pybuilddir.txt - -rm -f Lib/lib2to3/*Grammar*.pickle -- -rm -f Programs/_testembed Programs/_freeze_importlib -+ -rm -f Programs/_testembed Programs/_freeze_importlib$(EXE) - -find build -type f -a ! -name '*.gc??' -exec rm -f {} ';' - -rm -f Include/pydtrace_probes.h - -rm -f profile-gen-stamp -diff -Naur Python-3.8.0-orig/Programs/_freeze_importlib.c Python-3.8.0/Programs/_freeze_importlib.c ---- Python-3.8.0-orig/Programs/_freeze_importlib.c 2019-10-14 16:34:47.000000000 +0300 -+++ Python-3.8.0/Programs/_freeze_importlib.c 2019-10-22 10:03:31.757808700 +0300 -@@ -20,7 +20,7 @@ - {0, 0, 0} /* sentinel */ - }; - --#ifndef MS_WINDOWS -+#ifndef _MSC_VER - /* On Windows, this links with the regular pythonXY.dll, so this variable comes - from frozen.obj. In the Makefile, frozen.o is not linked into this executable, - so we define the variable here. */ diff --git a/mingw-w64-python/0760-msys-monkeypatch-os-system-via-sh-exe.patch b/mingw-w64-python/0760-msys-monkeypatch-os-system-via-sh-exe.patch deleted file mode 100644 index db89e15b76..0000000000 --- a/mingw-w64-python/0760-msys-monkeypatch-os-system-via-sh-exe.patch +++ /dev/null @@ -1,21 +0,0 @@ -diff -Naur Python-3.8.0-orig/setup.py Python-3.8.0/setup.py ---- Python-3.8.0-orig/setup.py 2019-10-22 10:03:24.597396100 +0300 -+++ Python-3.8.0/setup.py 2019-10-22 10:03:35.002614400 +0300 -@@ -38,6 +38,17 @@ - return sys.platform - - -+# On MSYS, os.system needs to be wrapped with sh.exe -+# as otherwise all the io redirection will fail. -+# Arguably, this could happen inside the real os.system -+# rather than this monkey patch. -+if sys.platform == "win32" and "MSYSTEM" in os.environ: -+ os_system = os.system -+ def msys_system(command): -+ command_in_sh = 'sh.exe -c "%s"' % command.replace("\\", "\\\\") -+ return os_system(command_in_sh) -+ os.system = msys_system -+ - CROSS_COMPILING = ("_PYTHON_HOST_PLATFORM" in os.environ) - HOST_PLATFORM = get_platform() - MS_WINDOWS = (HOST_PLATFORM == 'win32') diff --git a/mingw-w64-python/0770-msys-replace-slashes-used-in-io-redirection.patch b/mingw-w64-python/0770-msys-replace-slashes-used-in-io-redirection.patch deleted file mode 100644 index dd264cab47..0000000000 --- a/mingw-w64-python/0770-msys-replace-slashes-used-in-io-redirection.patch +++ /dev/null @@ -1,59 +0,0 @@ -diff -Naur Python-3.8.0-orig/setup.py Python-3.8.0/setup.py ---- Python-3.8.0-orig/setup.py 2019-10-22 10:03:36.718617400 +0300 -+++ Python-3.8.0/setup.py 2019-10-22 10:03:37.795019300 +0300 -@@ -563,7 +563,7 @@ - # Debian/Ubuntu multiarch support. - # https://wiki.ubuntu.com/MultiarchSpec - cc = sysconfig.get_config_var('CC') -- tmpfile = os.path.join(self.build_temp, 'multiarch') -+ tmpfile = os.path.join(self.build_temp, 'multiarch').replace('\\','/') - if not os.path.exists(self.build_temp): - os.makedirs(self.build_temp) - ret = os.system( -@@ -588,7 +588,7 @@ - opt = '' - if CROSS_COMPILING: - opt = '-t' + sysconfig.get_config_var('HOST_GNU_TYPE') -- tmpfile = os.path.join(self.build_temp, 'multiarch') -+ tmpfile = os.path.join(self.build_temp, 'multiarch').replace('\\','/') - if not os.path.exists(self.build_temp): - os.makedirs(self.build_temp) - ret = os.system( -@@ -607,7 +607,7 @@ - - def add_cross_compiling_paths(self): - cc = sysconfig.get_config_var('CC') -- tmpfile = os.path.join(self.build_temp, 'ccpaths') -+ tmpfile = os.path.join(self.build_temp, 'ccpaths').replace('\\','/') - if not os.path.exists(self.build_temp): - os.makedirs(self.build_temp) - ret = os.system('%s -E -v - %s 1>/dev/null' % (cc, tmpfile)) -@@ -915,7 +915,7 @@ - readline_termcap_library = "" - curses_library = "" - # Cannot use os.popen here in py3k. -- tmpfile = os.path.join(self.build_temp, 'readline_termcap_lib') -+ tmpfile = os.path.join(self.build_temp, 'readline_termcap_lib').replace('\\','/') - if not os.path.exists(self.build_temp): - os.makedirs(self.build_temp) - # Determine if readline is already linked against curses or tinfo. -@@ -1869,16 +1869,16 @@ - cflags = sysconfig.get_config_vars('CFLAGS')[0] - archs = re.findall(r'-arch\s+(\w+)', cflags) - -- tmpfile = os.path.join(self.build_temp, 'tk.arch') -+ tmpfile = os.path.join(self.build_temp, 'tk.arch').replace('\\','/') - if not os.path.exists(self.build_temp): - os.makedirs(self.build_temp) - - # Note: cannot use os.popen or subprocess here, that - # requires extensions that are not available here. - if is_macosx_sdk_path(F): -- os.system("file %s/Tk.framework/Tk | grep 'for architecture' > %s"%(os.path.join(sysroot, F[1:]), tmpfile)) -+ os.system("file %s/Tk.framework/Tk | grep 'for architecture' > %s"%(os.path.join(sysroot, F[1:]).replace('\\','/'), tmpfile)) - else: -- os.system("file %s/Tk.framework/Tk | grep 'for architecture' > %s"%(F, tmpfile)) -+ os.system("file %s/Tk.framework/Tk | grep 'for architecture' > %s"%(F.replace('\\','/'), tmpfile)) - - with open(tmpfile) as fp: - detected_archs = [] diff --git a/mingw-w64-python/0800-mingw-install-layout-as-posix.patch b/mingw-w64-python/0800-mingw-install-layout-as-posix.patch deleted file mode 100644 index 597a58b3b5..0000000000 --- a/mingw-w64-python/0800-mingw-install-layout-as-posix.patch +++ /dev/null @@ -1,29 +0,0 @@ -diff -Naur Python-3.8.0-orig/Lib/distutils/command/install.py Python-3.8.0/Lib/distutils/command/install.py ---- Python-3.8.0-orig/Lib/distutils/command/install.py 2019-10-22 10:03:20.572589000 +0300 -+++ Python-3.8.0/Lib/distutils/command/install.py 2019-10-22 10:03:40.618624200 +0300 -@@ -20,10 +20,10 @@ - HAS_USER_SITE = True - - WINDOWS_SCHEME = { -- 'purelib': '$base/Lib/site-packages', -- 'platlib': '$base/Lib/site-packages', -- 'headers': '$base/Include/$dist_name', -- 'scripts': '$base/Scripts', -+ 'purelib': '$base/lib/python$py_version_short/site-packages', -+ 'platlib': '$base/lib/python$py_version_short/site-packages', -+ 'headers': '$base/include/python$py_version_short$abiflags/$dist_name', -+ 'scripts': '$base/bin', - 'data' : '$base', - } - -@@ -50,8 +50,8 @@ - INSTALL_SCHEMES['nt_user'] = { - 'purelib': '$usersite', - 'platlib': '$usersite', -- 'headers': '$userbase/Python$py_version_nodot/Include/$dist_name', -- 'scripts': '$userbase/Python$py_version_nodot/Scripts', -+ 'headers': '$userbase/include/python$py_version_short$abiflags/$dist_name', -+ 'scripts': '$userbase/bin', - 'data' : '$userbase', - } - diff --git a/mingw-w64-python/0810-remove_path_max.default.patch b/mingw-w64-python/0810-remove_path_max.default.patch deleted file mode 100644 index 101b1921d3..0000000000 --- a/mingw-w64-python/0810-remove_path_max.default.patch +++ /dev/null @@ -1,11 +0,0 @@ -diff -Naur Python-3.8.0-orig/Include/osdefs.h Python-3.8.0/Include/osdefs.h ---- Python-3.8.0-orig/Include/osdefs.h 2019-10-14 16:34:47.000000000 +0300 -+++ Python-3.8.0/Include/osdefs.h 2019-10-22 10:03:43.426629200 +0300 -@@ -10,7 +10,6 @@ - #ifdef MS_WINDOWS - #define SEP L'\\' - #define ALTSEP L'/' --#define MAXPATHLEN 256 - #define DELIM L';' - #endif - diff --git a/mingw-w64-python/0820-dont-link-with-gettext.patch b/mingw-w64-python/0820-dont-link-with-gettext.patch deleted file mode 100644 index 50251a2c4b..0000000000 --- a/mingw-w64-python/0820-dont-link-with-gettext.patch +++ /dev/null @@ -1,40 +0,0 @@ -diff -Naur Python-3.8.0-orig/configure.ac Python-3.8.0/configure.ac ---- Python-3.8.0-orig/configure.ac 2019-10-22 10:02:59.122551400 +0300 -+++ Python-3.8.0/configure.ac 2019-10-22 10:03:46.312634200 +0300 -@@ -3071,10 +3071,19 @@ - fi - - # check if we need libintl for locale functions -+case $host in -+ *-*-mingw*) -+ dnl Native windows build don't use libintl (see _localemodule.c). -+ dnl Also we don't like setup.py to add "intl" library to the list -+ dnl when build _locale module. -+ ;; -+ *) - AC_CHECK_LIB(intl, textdomain, - [AC_DEFINE(WITH_LIBINTL, 1, - [Define to 1 if libintl is needed for locale functions.]) - LIBS="-lintl $LIBS"]) -+ ;; -+esac - - # checks for system dependent C++ extensions support - case "$ac_sys_system" in -diff -Naur Python-3.8.0-orig/Modules/_localemodule.c Python-3.8.0/Modules/_localemodule.c ---- Python-3.8.0-orig/Modules/_localemodule.c 2019-10-14 16:34:47.000000000 +0300 -+++ Python-3.8.0/Modules/_localemodule.c 2019-10-22 10:03:46.718235000 +0300 -@@ -12,6 +12,13 @@ - #define PY_SSIZE_T_CLEAN - #include "Python.h" - #include "pycore_fileutils.h" -+#ifdef __MINGW32__ -+/* The header libintl.h and library libintl may exist on mingw host. -+ * To be compatible with MSVC build we has to undef some defines. -+ */ -+#undef HAVE_LIBINTL_H -+#undef HAVE_BIND_TEXTDOMAIN_CODESET -+#endif - - #include - #include diff --git a/mingw-w64-python/0830-ctypes-python-dll.patch b/mingw-w64-python/0830-ctypes-python-dll.patch deleted file mode 100644 index ec7985102c..0000000000 --- a/mingw-w64-python/0830-ctypes-python-dll.patch +++ /dev/null @@ -1,14 +0,0 @@ -diff -Naur Python-3.8.0-orig/Lib/ctypes/__init__.py Python-3.8.0/Lib/ctypes/__init__.py ---- Python-3.8.0-orig/Lib/ctypes/__init__.py 2019-10-14 16:34:47.000000000 +0300 -+++ Python-3.8.0/Lib/ctypes/__init__.py 2019-10-22 10:03:49.931840600 +0300 -@@ -449,7 +449,9 @@ - cdll = LibraryLoader(CDLL) - pydll = LibraryLoader(PyDLL) - --if _os.name == "nt": -+if _os.name == "nt" and _sys.version.find('GCC') >= 0: -+ pythonapi = PyDLL("libpython%d.%d%s.dll" % (_sys.version_info[:2] + (_sys.abiflags,)), None) -+elif _os.name == "nt": - pythonapi = PyDLL("python dll", None, _sys.dllhandle) - elif _sys.platform == "cygwin": - pythonapi = PyDLL("libpython%d.%d.dll" % _sys.version_info[:2]) diff --git a/mingw-w64-python/0840-gdbm-module-includes.patch b/mingw-w64-python/0840-gdbm-module-includes.patch deleted file mode 100644 index 7c28266fa8..0000000000 --- a/mingw-w64-python/0840-gdbm-module-includes.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -Naur Python-3.8.0-orig/Modules/_gdbmmodule.c Python-3.8.0/Modules/_gdbmmodule.c ---- Python-3.8.0-orig/Modules/_gdbmmodule.c 2019-10-14 16:34:47.000000000 +0300 -+++ Python-3.8.0/Modules/_gdbmmodule.c 2019-10-22 10:03:53.161046300 +0300 -@@ -11,7 +11,7 @@ - #include - #include "gdbm.h" - --#if defined(WIN32) && !defined(__CYGWIN__) -+#if defined(WIN32) && !defined(__CYGWIN__) && !defined(__MINGW32__) - #include "gdbmerrno.h" - extern const char * gdbm_strerror(gdbm_error); - #endif diff --git a/mingw-w64-python/0850-use-gnu_printf-in-format.patch b/mingw-w64-python/0850-use-gnu_printf-in-format.patch deleted file mode 100644 index f9a52548cd..0000000000 --- a/mingw-w64-python/0850-use-gnu_printf-in-format.patch +++ /dev/null @@ -1,45 +0,0 @@ -diff -Naur Python-3.8.0-orig/Include/bytesobject.h Python-3.8.0/Include/bytesobject.h ---- Python-3.8.0-orig/Include/bytesobject.h 2019-10-14 16:34:47.000000000 +0300 -+++ Python-3.8.0/Include/bytesobject.h 2019-10-22 10:03:56.031451300 +0300 -@@ -52,9 +52,9 @@ - PyAPI_FUNC(PyObject *) PyBytes_FromString(const char *); - PyAPI_FUNC(PyObject *) PyBytes_FromObject(PyObject *); - PyAPI_FUNC(PyObject *) PyBytes_FromFormatV(const char*, va_list) -- Py_GCC_ATTRIBUTE((format(printf, 1, 0))); -+ Py_GCC_ATTRIBUTE((format(gnu_printf, 1, 0))); - PyAPI_FUNC(PyObject *) PyBytes_FromFormat(const char*, ...) -- Py_GCC_ATTRIBUTE((format(printf, 1, 2))); -+ Py_GCC_ATTRIBUTE((format(gnu_printf, 1, 2))); - PyAPI_FUNC(Py_ssize_t) PyBytes_Size(PyObject *); - PyAPI_FUNC(char *) PyBytes_AsString(PyObject *); - PyAPI_FUNC(PyObject *) PyBytes_Repr(PyObject *, int); -diff -Naur Python-3.8.0-orig/Include/pyerrors.h Python-3.8.0/Include/pyerrors.h ---- Python-3.8.0-orig/Include/pyerrors.h 2019-10-14 16:34:47.000000000 +0300 -+++ Python-3.8.0/Include/pyerrors.h 2019-10-22 10:03:56.437052000 +0300 -@@ -319,9 +319,9 @@ - - #include - PyAPI_FUNC(int) PyOS_snprintf(char *str, size_t size, const char *format, ...) -- Py_GCC_ATTRIBUTE((format(printf, 3, 4))); -+ Py_GCC_ATTRIBUTE((format(gnu_printf, 3, 4))); - PyAPI_FUNC(int) PyOS_vsnprintf(char *str, size_t size, const char *format, va_list va) -- Py_GCC_ATTRIBUTE((format(printf, 3, 0))); -+ Py_GCC_ATTRIBUTE((format(gnu_printf, 3, 0))); - - #ifndef Py_LIMITED_API - # define Py_CPYTHON_ERRORS_H -diff -Naur Python-3.8.0-orig/Include/sysmodule.h Python-3.8.0/Include/sysmodule.h ---- Python-3.8.0-orig/Include/sysmodule.h 2019-10-14 16:34:47.000000000 +0300 -+++ Python-3.8.0/Include/sysmodule.h 2019-10-22 10:03:56.858252800 +0300 -@@ -15,9 +15,9 @@ - PyAPI_FUNC(void) PySys_SetPath(const wchar_t *); - - PyAPI_FUNC(void) PySys_WriteStdout(const char *format, ...) -- Py_GCC_ATTRIBUTE((format(printf, 1, 2))); -+ Py_GCC_ATTRIBUTE((format(gnu_printf, 1, 2))); - PyAPI_FUNC(void) PySys_WriteStderr(const char *format, ...) -- Py_GCC_ATTRIBUTE((format(printf, 1, 2))); -+ Py_GCC_ATTRIBUTE((format(gnu_printf, 1, 2))); - PyAPI_FUNC(void) PySys_FormatStdout(const char *format, ...); - PyAPI_FUNC(void) PySys_FormatStderr(const char *format, ...); - diff --git a/mingw-w64-python/0870-mingw-fix-ssl-dont-use-enum_certificates.patch b/mingw-w64-python/0870-mingw-fix-ssl-dont-use-enum_certificates.patch deleted file mode 100644 index 67498a7c3b..0000000000 --- a/mingw-w64-python/0870-mingw-fix-ssl-dont-use-enum_certificates.patch +++ /dev/null @@ -1,21 +0,0 @@ -diff -Naur Python-3.8.0-orig/Lib/ssl.py Python-3.8.0/Lib/ssl.py ---- Python-3.8.0-orig/Lib/ssl.py 2019-10-14 16:34:47.000000000 +0300 -+++ Python-3.8.0/Lib/ssl.py 2019-10-22 10:04:00.493059100 +0300 -@@ -249,7 +249,7 @@ - CHANGE_CIPHER_SPEC = 0x0101 - - --if sys.platform == "win32": -+if sys.platform == "win32" and sys.version.find("GCC") == -1: - from _ssl import enum_certificates, enum_crls - - from socket import socket, AF_INET, SOCK_STREAM, create_connection -@@ -569,7 +569,7 @@ - def load_default_certs(self, purpose=Purpose.SERVER_AUTH): - if not isinstance(purpose, _ASN1Object): - raise TypeError(purpose) -- if sys.platform == "win32": -+ if sys.platform == "win32" and sys.version.find("GCC") == -1: - for storename in self._windows_cert_stores: - self._load_windows_store_certs(storename, purpose) - self.set_default_verify_paths() diff --git a/mingw-w64-python/0890-mingw-build-optimized-ext.patch b/mingw-w64-python/0890-mingw-build-optimized-ext.patch deleted file mode 100644 index 5ba3ad4cca..0000000000 --- a/mingw-w64-python/0890-mingw-build-optimized-ext.patch +++ /dev/null @@ -1,16 +0,0 @@ -diff -Naur Python-3.8.0-orig/Lib/distutils/cygwinccompiler.py Python-3.8.0/Lib/distutils/cygwinccompiler.py ---- Python-3.8.0-orig/Lib/distutils/cygwinccompiler.py 2019-10-22 10:03:07.686966400 +0300 -+++ Python-3.8.0/Lib/distutils/cygwinccompiler.py 2019-10-22 10:04:03.316664100 +0300 -@@ -305,9 +305,9 @@ - raise CCompilerError( - 'Cygwin gcc cannot be used with --compiler=mingw32') - -- self.set_executables(compiler='gcc -O -Wall', -- compiler_so='gcc -mdll -O -Wall', -- compiler_cxx='g++ -O -Wall', -+ self.set_executables(compiler='gcc -O2 -Wall', -+ compiler_so='gcc -mdll -O2 -Wall', -+ compiler_cxx='g++ -O2 -Wall', - linker_exe='gcc', - linker_so='%s %s %s' - % (self.linker_dll, shared_option, diff --git a/mingw-w64-python/0900-cygwinccompiler-dont-strip-modules-if-pydebug.patch b/mingw-w64-python/0900-cygwinccompiler-dont-strip-modules-if-pydebug.patch deleted file mode 100644 index a002f9866d..0000000000 --- a/mingw-w64-python/0900-cygwinccompiler-dont-strip-modules-if-pydebug.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -Naur Python-3.8.0-orig/Lib/distutils/cygwinccompiler.py Python-3.8.0/Lib/distutils/cygwinccompiler.py ---- Python-3.8.0-orig/Lib/distutils/cygwinccompiler.py 2019-10-22 10:04:05.048267100 +0300 -+++ Python-3.8.0/Lib/distutils/cygwinccompiler.py 2019-10-22 10:04:06.140269100 +0300 -@@ -238,7 +238,7 @@ - # (On my machine: 10KiB < stripped_file < ??100KiB - # unstripped_file = stripped_file + XXX KiB - # ( XXX=254 for a typical python extension)) -- if not debug: -+ if not debug and not hasattr(sys, 'gettotalrefcount'): - extra_preargs.append("-s") - - UnixCCompiler.link(self, target_desc, objects, output_filename, diff --git a/mingw-w64-python/0910-fix-using-dllhandle-and-winver-mingw.patch b/mingw-w64-python/0910-fix-using-dllhandle-and-winver-mingw.patch deleted file mode 100644 index b2462b7118..0000000000 --- a/mingw-w64-python/0910-fix-using-dllhandle-and-winver-mingw.patch +++ /dev/null @@ -1,21 +0,0 @@ -diff -Naur Python-3.8.0-orig/Python/sysmodule.c Python-3.8.0/Python/sysmodule.c ---- Python-3.8.0-orig/Python/sysmodule.c 2019-10-14 16:34:47.000000000 +0300 -+++ Python-3.8.0/Python/sysmodule.c 2019-10-22 10:04:08.995074100 +0300 -@@ -34,7 +34,7 @@ - #include - #endif /* MS_WINDOWS */ - --#ifdef MS_COREDLL -+#if defined(MS_WINDOWS) && defined(Py_ENABLE_SHARED) - extern void *PyWin_DLLhModule; - /* A string loaded from the DLL at startup: */ - extern const char *PyWin_DLLVersionString; -@@ -2694,7 +2694,7 @@ - PyUnicode_FromString("little")); - #endif - --#ifdef MS_COREDLL -+#if defined(MS_WINDOWS) && defined(Py_ENABLE_SHARED) - SET_SYS_FROM_STRING("dllhandle", - PyLong_FromVoidPtr(PyWin_DLLhModule)); - SET_SYS_FROM_STRING("winver", diff --git a/mingw-w64-python/0920-mingw-add-LIBPL-to-library-dirs.patch b/mingw-w64-python/0920-mingw-add-LIBPL-to-library-dirs.patch deleted file mode 100644 index e58e64e3d5..0000000000 --- a/mingw-w64-python/0920-mingw-add-LIBPL-to-library-dirs.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -Naur Python-3.8.0-orig/Lib/distutils/command/build_ext.py Python-3.8.0/Lib/distutils/command/build_ext.py ---- Python-3.8.0-orig/Lib/distutils/command/build_ext.py 2019-10-22 10:03:03.194158500 +0300 -+++ Python-3.8.0/Lib/distutils/command/build_ext.py 2019-10-22 10:04:11.803079000 +0300 -@@ -218,7 +218,7 @@ - - # For extensions under Cygwin, Python's library directory must be - # appended to library_dirs -- if sys.platform[:6] == 'cygwin': -+ if sys.platform[:6] == 'cygwin' or self.plat_name.startswith(('mingw')): - if sys.executable.startswith(os.path.join(sys.exec_prefix, "bin")): - # building third party extensions - config_dir_name = os.path.basename(sysconfig.get_config_var('LIBPL')) diff --git a/mingw-w64-python/0970-Add-AMD64-to-sys-config-so-msvccompiler-get_build_version-works.patch b/mingw-w64-python/0970-Add-AMD64-to-sys-config-so-msvccompiler-get_build_version-works.patch deleted file mode 100644 index 023463b4a1..0000000000 --- a/mingw-w64-python/0970-Add-AMD64-to-sys-config-so-msvccompiler-get_build_version-works.patch +++ /dev/null @@ -1,27 +0,0 @@ -diff -Naur Python-3.8.0-orig/Python/getcompiler.c Python-3.8.0/Python/getcompiler.c ---- Python-3.8.0-orig/Python/getcompiler.c 2019-10-14 16:34:47.000000000 +0300 -+++ Python-3.8.0/Python/getcompiler.c 2019-10-22 10:04:17.450288900 +0300 -@@ -10,7 +10,22 @@ - #if defined(__clang__) - #define COMPILER "\n[Clang " __clang_version__ "]" - #elif defined(__GNUC__) --#define COMPILER "\n[GCC " __VERSION__ "]" -+/* To not break compatibility with things that determine -+ CPU arch by calling get_build_version in msvccompiler.py -+ (such as NumPy) add "32 bit" or "64 bit (AMD64)" on Windows -+ and also use a space as a separator rather than a newline. */ -+#if defined(_WIN32) -+#define COMP_SEP " " -+#if defined(__x86_64__) -+#define ARCH_SUFFIX " 64 bit (AMD64)" -+#else -+#define ARCH_SUFFIX " 32 bit" -+#endif -+#else -+#define COMP_SEP "\n" -+#define ARCH_SUFFIX "" -+#endif -+#define COMPILER COMP_SEP "[GCC " __VERSION__ ARCH_SUFFIX "]" - // Generic fallbacks. - #elif defined(__cplusplus) - #define COMPILER "[C++]" diff --git a/mingw-w64-python/0990-MINGW-link-with-additional-library.patch b/mingw-w64-python/0990-MINGW-link-with-additional-library.patch deleted file mode 100644 index 238555e9f1..0000000000 --- a/mingw-w64-python/0990-MINGW-link-with-additional-library.patch +++ /dev/null @@ -1,19 +0,0 @@ -diff -Naur Python-3.8.0-orig/configure.ac Python-3.8.0/configure.ac ---- Python-3.8.0-orig/configure.ac 2019-10-22 10:03:48.434238000 +0300 -+++ Python-3.8.0/configure.ac 2019-10-22 10:04:20.273893900 +0300 -@@ -5668,6 +5668,15 @@ - done - AC_MSG_RESULT(done) - -+# For mingw build need additional library for linking -+case $host in -+ *-*-mingw*) -+ LIBS="$LIBS -lversion -lshlwapi" -+ ;; -+ *) -+ ;; -+esac -+ - # Availability of -O2: - AC_MSG_CHECKING(for -O2) - saved_cflags="$CFLAGS" diff --git a/mingw-w64-python/1010-install-msilib.patch b/mingw-w64-python/1010-install-msilib.patch deleted file mode 100644 index 65a82a0dc0..0000000000 --- a/mingw-w64-python/1010-install-msilib.patch +++ /dev/null @@ -1,11 +0,0 @@ -diff -Naur Python-3.8.0-orig/Makefile.pre.in Python-3.8.0/Makefile.pre.in ---- Python-3.8.0-orig/Makefile.pre.in 2019-10-22 10:03:33.473811700 +0300 -+++ Python-3.8.0/Makefile.pre.in 2019-10-22 10:04:23.315899200 +0300 -@@ -1404,6 +1404,7 @@ - distutils distutils/command distutils/tests $(XMLLIBSUBDIRS) \ - test/test_tools test/test_warnings test/test_warnings/data \ - turtledemo \ -+ msilib \ - multiprocessing multiprocessing/dummy \ - unittest unittest/test unittest/test/testmock \ - venv venv/scripts venv/scripts/common venv/scripts/posix \ diff --git a/mingw-w64-python/1060-dont-include-system-ncurses-path.patch b/mingw-w64-python/1060-dont-include-system-ncurses-path.patch deleted file mode 100644 index 99f6a8593a..0000000000 --- a/mingw-w64-python/1060-dont-include-system-ncurses-path.patch +++ /dev/null @@ -1,22 +0,0 @@ -diff -Naur Python-3.8.0-orig/configure.ac Python-3.8.0/configure.ac ---- Python-3.8.0-orig/configure.ac 2019-10-22 10:04:22.223897300 +0300 -+++ Python-3.8.0/configure.ac 2019-10-22 10:04:26.170704200 +0300 -@@ -5293,9 +5293,15 @@ - - # first curses header check - ac_save_cppflags="$CPPFLAGS" --if test "$cross_compiling" = no; then -- CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw" --fi -+case $host_os in -+ mingw*) -+ ;; -+ *) -+ if test "$cross_compiling" = no; then -+ CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw" -+ fi -+ ;; -+esac - - AC_CHECK_HEADERS(curses.h ncurses.h) - diff --git a/mingw-w64-python/1620-fix-signal-module-build.patch b/mingw-w64-python/1620-fix-signal-module-build.patch deleted file mode 100644 index a35aeec7ae..0000000000 --- a/mingw-w64-python/1620-fix-signal-module-build.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -Naur Python-3.8.0-orig/Modules/Setup Python-3.8.0/Modules/Setup ---- Python-3.8.0-orig/Modules/Setup 2019-10-22 10:01:07.612555400 +0300 -+++ Python-3.8.0/Modules/Setup 2019-10-22 10:04:29.009909200 +0300 -@@ -111,7 +111,7 @@ - _abc _abc.c # Abstract base classes - itertools itertoolsmodule.c # Functions creating iterators for efficient looping - atexit atexitmodule.c # Register functions to be run at interpreter-shutdown --_signal -DPy_BUILD_CORE_BUILTIN -I$(srcdir)/Include/internal signalmodule.c -+_signal -DPy_BUILD_CORE_BUILTIN -I$(srcdir)/Include/internal signalmodule.c -lws2_32 - _stat _stat.c # stat.h interface - time -DPy_BUILD_CORE_BUILTIN -I$(srcdir)/Include/internal timemodule.c # -lm # time operations and variables - _thread -DPy_BUILD_CORE_BUILTIN -I$(srcdir)/Include/internal _threadmodule.c # low-level threading interface diff --git a/mingw-w64-python/1630-build-winconsoleio.patch b/mingw-w64-python/1630-build-winconsoleio.patch deleted file mode 100644 index 196592ad3d..0000000000 --- a/mingw-w64-python/1630-build-winconsoleio.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -Naur Python-3.8.0-orig/Modules/Setup Python-3.8.0/Modules/Setup ---- Python-3.8.0-orig/Modules/Setup 2019-10-22 10:04:31.147113000 +0300 -+++ Python-3.8.0/Modules/Setup 2019-10-22 10:04:32.223514900 +0300 -@@ -120,7 +120,7 @@ - _locale -DPy_BUILD_CORE_BUILTIN _localemodule.c # -lintl - - # Standard I/O baseline --_io -DPy_BUILD_CORE_BUILTIN -I$(srcdir)/Include/internal -I$(srcdir)/Modules/_io _io/_iomodule.c _io/iobase.c _io/fileio.c _io/bytesio.c _io/bufferedio.c _io/textio.c _io/stringio.c -+_io -DPy_BUILD_CORE_BUILTIN -I$(srcdir)/Include/internal -I$(srcdir)/Modules/_io _io/_iomodule.c _io/iobase.c _io/fileio.c _io/bytesio.c _io/bufferedio.c _io/textio.c _io/stringio.c _io/winconsoleio.c - - # faulthandler module - faulthandler faulthandler.c diff --git a/mingw-w64-python/1650-expose-sem_unlink.patch b/mingw-w64-python/1650-expose-sem_unlink.patch deleted file mode 100644 index 16c91759f0..0000000000 --- a/mingw-w64-python/1650-expose-sem_unlink.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -Naur Python-3.8.0-orig/Modules/_multiprocessing/multiprocessing.c Python-3.8.0/Modules/_multiprocessing/multiprocessing.c ---- Python-3.8.0-orig/Modules/_multiprocessing/multiprocessing.c 2019-10-14 16:34:47.000000000 +0300 -+++ Python-3.8.0/Modules/_multiprocessing/multiprocessing.c 2019-10-22 10:04:35.437120500 +0300 -@@ -128,7 +128,7 @@ - {"recv", multiprocessing_recv, METH_VARARGS, ""}, - {"send", multiprocessing_send, METH_VARARGS, ""}, - #endif --#if !defined(POSIX_SEMAPHORES_NOT_ENABLED) && !defined(__ANDROID__) -+#if defined(MS_WINDOWS) || (!defined(POSIX_SEMAPHORES_NOT_ENABLED) && !defined(__ANDROID__)) - {"sem_unlink", _PyMp_sem_unlink, METH_VARARGS, ""}, - #endif - {NULL} diff --git a/mingw-w64-python/1700-cygpty-isatty.patch b/mingw-w64-python/1700-cygpty-isatty.patch deleted file mode 100644 index 69694ce327..0000000000 --- a/mingw-w64-python/1700-cygpty-isatty.patch +++ /dev/null @@ -1,417 +0,0 @@ -diff -Naur Python-3.8.0-orig/Include/iscygpty.h Python-3.8.0/Include/iscygpty.h ---- Python-3.8.0-orig/Include/iscygpty.h 1970-01-01 03:00:00.000000000 +0300 -+++ Python-3.8.0/Include/iscygpty.h 2019-10-22 10:04:39.461927600 +0300 -@@ -0,0 +1,41 @@ -+/* -+ * iscygpty.h -- part of ptycheck -+ * https://github.com/k-takata/ptycheck -+ * -+ * Copyright (c) 2015-2017 K.Takata -+ * -+ * You can redistribute it and/or modify it under the terms of either -+ * the MIT license (as described below) or the Vim license. -+ * -+ * Permission is hereby granted, free of charge, to any person obtaining -+ * a copy of this software and associated documentation files (the -+ * "Software"), to deal in the Software without restriction, including -+ * without limitation the rights to use, copy, modify, merge, publish, -+ * distribute, sublicense, and/or sell copies of the Software, and to -+ * permit persons to whom the Software is furnished to do so, subject to -+ * the following conditions: -+ * -+ * The above copyright notice and this permission notice shall be -+ * included in all copies or substantial portions of the Software. -+ * -+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -+ * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -+ */ -+ -+#ifndef _ISCYGPTY_H -+#define _ISCYGPTY_H -+ -+#ifdef _WIN32 -+int is_cygpty(int fd); -+int is_cygpty_used(void); -+#else -+#define is_cygpty(fd) 0 -+#define is_cygpty_used() 0 -+#endif -+ -+#endif /* _ISCYGPTY_H */ -diff -Naur Python-3.8.0-orig/Makefile.pre.in Python-3.8.0/Makefile.pre.in ---- Python-3.8.0-orig/Makefile.pre.in 2019-10-22 10:04:25.063102300 +0300 -+++ Python-3.8.0/Makefile.pre.in 2019-10-22 10:04:39.867528300 +0300 -@@ -346,6 +346,7 @@ - Python/import.o \ - Python/importdl.o \ - Python/initconfig.o \ -+ Python/iscygpty.o \ - Python/marshal.o \ - Python/modsupport.o \ - Python/mysnprintf.o \ -@@ -1011,6 +1012,7 @@ - $(srcdir)/Include/import.h \ - $(srcdir)/Include/interpreteridobject.h \ - $(srcdir)/Include/intrcheck.h \ -+ $(srcdir)/Include/iscygpty.h \ - $(srcdir)/Include/iterobject.h \ - $(srcdir)/Include/listobject.h \ - $(srcdir)/Include/longintrepr.h \ -diff -Naur Python-3.8.0-orig/Modules/_io/fileio.c Python-3.8.0/Modules/_io/fileio.c ---- Python-3.8.0-orig/Modules/_io/fileio.c 2019-10-14 16:34:47.000000000 +0300 -+++ Python-3.8.0/Modules/_io/fileio.c 2019-10-22 10:04:40.273129000 +0300 -@@ -18,6 +18,7 @@ - #endif - #include /* For offsetof */ - #include "_iomodule.h" -+#include "iscygpty.h" - - /* - * Known likely problems: -@@ -1119,7 +1120,7 @@ - return err_closed(); - Py_BEGIN_ALLOW_THREADS - _Py_BEGIN_SUPPRESS_IPH -- res = isatty(self->fd); -+ res = isatty(self->fd) || is_cygpty(self->fd); - _Py_END_SUPPRESS_IPH - Py_END_ALLOW_THREADS - return PyBool_FromLong(res); -diff -Naur Python-3.8.0-orig/Modules/main.c Python-3.8.0/Modules/main.c ---- Python-3.8.0-orig/Modules/main.c 2019-10-14 16:34:47.000000000 +0300 -+++ Python-3.8.0/Modules/main.c 2019-10-22 10:04:41.068730400 +0300 -@@ -5,6 +5,7 @@ - #include "pycore_pylifecycle.h" - #include "pycore_pymem.h" - #include "pycore_pystate.h" -+#include "iscygpty.h" - - #ifdef __FreeBSD__ - # include /* fedisableexcept() */ -@@ -103,7 +104,7 @@ - static int - stdin_is_interactive(const PyConfig *config) - { -- return (isatty(fileno(stdin)) || config->interactive); -+ return (isatty(fileno(stdin)) || config->interactive || is_cygpty(fileno(stdin))); - } - - -diff -Naur Python-3.8.0-orig/Modules/posixmodule.c Python-3.8.0/Modules/posixmodule.c ---- Python-3.8.0-orig/Modules/posixmodule.c 2019-10-22 10:02:48.171332100 +0300 -+++ Python-3.8.0/Modules/posixmodule.c 2019-10-22 10:04:41.489931200 +0300 -@@ -34,6 +34,7 @@ - FSCTL_GET_REPARSE_POINT is not exported with WIN32_LEAN_AND_MEAN. */ - # include - #endif -+#include "iscygpty.h" - - #include "pycore_ceval.h" /* _PyEval_ReInitThreads() */ - #include "pycore_pystate.h" /* _PyRuntime */ -@@ -9258,7 +9259,7 @@ - { - int return_value; - _Py_BEGIN_SUPPRESS_IPH -- return_value = isatty(fd); -+ return_value = isatty(fd) || is_cygpty(fd); - _Py_END_SUPPRESS_IPH - return return_value; - } -diff -Naur Python-3.8.0-orig/Python/frozenmain.c Python-3.8.0/Python/frozenmain.c ---- Python-3.8.0-orig/Python/frozenmain.c 2019-10-14 16:34:47.000000000 +0300 -+++ Python-3.8.0/Python/frozenmain.c 2019-10-22 10:04:41.895531900 +0300 -@@ -4,6 +4,7 @@ - #include "Python.h" - #include "pycore_pystate.h" - #include -+#include "iscygpty.h" - - #ifdef MS_WINDOWS - extern void PyWinFreeze_ExeInit(void); -@@ -107,7 +108,7 @@ - else - sts = 0; - -- if (inspect && isatty((int)fileno(stdin))) -+ if (inspect && (isatty((int)fileno(stdin)) || is_cygpty((int)fileno(stdin)))) - sts = PyRun_AnyFile(stdin, "") != 0; - - #ifdef MS_WINDOWS -diff -Naur Python-3.8.0-orig/Python/iscygpty.c Python-3.8.0/Python/iscygpty.c ---- Python-3.8.0-orig/Python/iscygpty.c 1970-01-01 03:00:00.000000000 +0300 -+++ Python-3.8.0/Python/iscygpty.c 2019-10-22 10:04:42.301132600 +0300 -@@ -0,0 +1,185 @@ -+/* -+ * iscygpty.c -- part of ptycheck -+ * https://github.com/k-takata/ptycheck -+ * -+ * Copyright (c) 2015-2017 K.Takata -+ * -+ * You can redistribute it and/or modify it under the terms of either -+ * the MIT license (as described below) or the Vim license. -+ * -+ * Permission is hereby granted, free of charge, to any person obtaining -+ * a copy of this software and associated documentation files (the -+ * "Software"), to deal in the Software without restriction, including -+ * without limitation the rights to use, copy, modify, merge, publish, -+ * distribute, sublicense, and/or sell copies of the Software, and to -+ * permit persons to whom the Software is furnished to do so, subject to -+ * the following conditions: -+ * -+ * The above copyright notice and this permission notice shall be -+ * included in all copies or substantial portions of the Software. -+ * -+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -+ * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -+ */ -+ -+#ifdef _WIN32 -+ -+#include -+#include -+#include -+#include -+ -+#ifdef USE_FILEEXTD -+/* VC 7.1 or earlier doesn't support SAL. */ -+# if !defined(_MSC_VER) || (_MSC_VER < 1400) -+# define __out -+# define __in -+# define __in_opt -+# endif -+/* Win32 FileID API Library: -+ * http://www.microsoft.com/en-us/download/details.aspx?id=22599 -+ * Needed for WinXP. */ -+# include -+#else /* USE_FILEEXTD */ -+/* VC 8 or earlier. */ -+# if defined(_MSC_VER) && (_MSC_VER < 1500) -+# ifdef ENABLE_STUB_IMPL -+# define STUB_IMPL -+# else -+# error "Win32 FileID API Library is required for VC2005 or earlier." -+# endif -+# endif -+#endif /* USE_FILEEXTD */ -+ -+ -+#include "iscygpty.h" -+ -+//#define USE_DYNFILEID -+#ifdef USE_DYNFILEID -+typedef BOOL (WINAPI *pfnGetFileInformationByHandleEx)( -+ HANDLE hFile, -+ FILE_INFO_BY_HANDLE_CLASS FileInformationClass, -+ LPVOID lpFileInformation, -+ DWORD dwBufferSize -+); -+static pfnGetFileInformationByHandleEx pGetFileInformationByHandleEx = NULL; -+ -+# ifndef USE_FILEEXTD -+static BOOL WINAPI stub_GetFileInformationByHandleEx( -+ HANDLE hFile, -+ FILE_INFO_BY_HANDLE_CLASS FileInformationClass, -+ LPVOID lpFileInformation, -+ DWORD dwBufferSize -+ ) -+{ -+ return FALSE; -+} -+# endif -+ -+static void setup_fileid_api(void) -+{ -+ if (pGetFileInformationByHandleEx != NULL) { -+ return; -+ } -+ pGetFileInformationByHandleEx = (pfnGetFileInformationByHandleEx) -+ GetProcAddress(GetModuleHandle(TEXT("kernel32.dll")), -+ "GetFileInformationByHandleEx"); -+ if (pGetFileInformationByHandleEx == NULL) { -+# ifdef USE_FILEEXTD -+ pGetFileInformationByHandleEx = GetFileInformationByHandleEx; -+# else -+ pGetFileInformationByHandleEx = stub_GetFileInformationByHandleEx; -+# endif -+ } -+} -+#else -+# define pGetFileInformationByHandleEx GetFileInformationByHandleEx -+# define setup_fileid_api() -+#endif -+ -+ -+#define is_wprefix(s, prefix) \ -+ (wcsncmp((s), (prefix), sizeof(prefix) / sizeof(WCHAR) - 1) == 0) -+ -+/* Check if the fd is a cygwin/msys's pty. */ -+int is_cygpty(int fd) -+{ -+#ifdef STUB_IMPL -+ return 0; -+#else -+ HANDLE h; -+ int size = sizeof(FILE_NAME_INFO) + sizeof(WCHAR) * (MAX_PATH - 1); -+ FILE_NAME_INFO *nameinfo; -+ WCHAR *p = NULL; -+ -+ setup_fileid_api(); -+ -+ h = (HANDLE) _get_osfhandle(fd); -+ if (h == INVALID_HANDLE_VALUE) { -+ return 0; -+ } -+ /* Cygwin/msys's pty is a pipe. */ -+ if (GetFileType(h) != FILE_TYPE_PIPE) { -+ return 0; -+ } -+ nameinfo = malloc(size + sizeof(WCHAR)); -+ if (nameinfo == NULL) { -+ return 0; -+ } -+ /* Check the name of the pipe: -+ * '\{cygwin,msys}-XXXXXXXXXXXXXXXX-ptyN-{from,to}-master' */ -+ if (pGetFileInformationByHandleEx(h, FileNameInfo, nameinfo, size)) { -+ nameinfo->FileName[nameinfo->FileNameLength / sizeof(WCHAR)] = L'\0'; -+ p = nameinfo->FileName; -+ if (is_wprefix(p, L"\\cygwin-")) { /* Cygwin */ -+ p += 8; -+ } else if (is_wprefix(p, L"\\msys-")) { /* MSYS and MSYS2 */ -+ p += 6; -+ } else { -+ p = NULL; -+ } -+ if (p != NULL) { -+ while (*p && isxdigit(*p)) /* Skip 16-digit hexadecimal. */ -+ ++p; -+ if (is_wprefix(p, L"-pty")) { -+ p += 4; -+ } else { -+ p = NULL; -+ } -+ } -+ if (p != NULL) { -+ while (*p && isdigit(*p)) /* Skip pty number. */ -+ ++p; -+ if (is_wprefix(p, L"-from-master")) { -+ //p += 12; -+ } else if (is_wprefix(p, L"-to-master")) { -+ //p += 10; -+ } else { -+ p = NULL; -+ } -+ } -+ } -+ free(nameinfo); -+ return (p != NULL); -+#endif /* STUB_IMPL */ -+} -+ -+/* Check if at least one cygwin/msys pty is used. */ -+int is_cygpty_used(void) -+{ -+ int fd, ret = 0; -+ -+ for (fd = 0; fd < 3; fd++) { -+ ret |= is_cygpty(fd); -+ } -+ return ret; -+} -+ -+#endif /* _WIN32 */ -+ -+/* vim: set ts=4 sw=4: */ -diff -Naur Python-3.8.0-orig/Python/pylifecycle.c Python-3.8.0/Python/pylifecycle.c ---- Python-3.8.0-orig/Python/pylifecycle.c 2019-10-14 16:34:47.000000000 +0300 -+++ Python-3.8.0/Python/pylifecycle.c 2019-10-22 10:04:42.691133300 +0300 -@@ -24,6 +24,7 @@ - #include "ast.h" - #include "marshal.h" - #include "osdefs.h" -+#include "iscygpty.h" - #include - - #ifdef HAVE_SIGNAL_H -@@ -2349,7 +2350,7 @@ - int - Py_FdIsInteractive(FILE *fp, const char *filename) - { -- if (isatty((int)fileno(fp))) -+ if (isatty((int)fileno(fp)) || is_cygpty((int)fileno(fp))) - return 1; - if (!Py_InteractiveFlag) - return 0; ---- Python-3.8.7/Python/bltinmodule.c.orig 2020-12-21 17:25:24.000000000 +0100 -+++ Python-3.8.7/Python/bltinmodule.c 2021-01-06 16:50:48.899457200 +0100 -@@ -1,6 +1,7 @@ - /* Built-in functions */ - - #include "Python.h" -+#include "iscygpty.h" - #include - #include "ast.h" - #undef Yield /* undefine macro conflicting with */ -@@ -1980,7 +1981,7 @@ - Py_DECREF(tmp); - if (fd < 0 && PyErr_Occurred()) - return NULL; -- tty = fd == fileno(stdin) && isatty(fd); -+ tty = fd == fileno(stdin) && (isatty(fd) || is_cygpty(fd)); - } - if (tty) { - tmp = _PyObject_CallMethodId(fout, &PyId_fileno, NULL); -@@ -1993,7 +1994,7 @@ - Py_DECREF(tmp); - if (fd < 0 && PyErr_Occurred()) - return NULL; -- tty = fd == fileno(stdout) && isatty(fd); -+ tty = fd == fileno(stdout) && (isatty(fd) || is_cygpty(fd)); - } - } - ---- Python-3.8.7/Objects/fileobject.c.orig 2020-12-21 17:25:24.000000000 +0100 -+++ Python-3.8.7/Objects/fileobject.c 2021-01-06 16:51:19.605061600 +0100 -@@ -2,6 +2,7 @@ - - #define PY_SSIZE_T_CLEAN - #include "Python.h" -+#include "iscygpty.h" - #include "pycore_pystate.h" - - #if defined(HAVE_GETC_UNLOCKED) && !defined(_Py_MEMORY_SANITIZER) -@@ -434,7 +435,7 @@ - } - - Py_BEGIN_ALLOW_THREADS -- res = isatty(self->fd); -+ res = isatty(self->fd) || is_cygpty(self->fd); - Py_END_ALLOW_THREADS - - return PyBool_FromLong(res); ---- Python-3.8.7/Python/fileutils.c.orig 2020-12-21 17:25:24.000000000 +0100 -+++ Python-3.8.7/Python/fileutils.c 2021-01-06 16:50:56.153853200 +0100 -@@ -1,4 +1,5 @@ - #include "Python.h" -+#include "iscygpty.h" - #include "pycore_fileutils.h" - #include "osdefs.h" - #include -@@ -59,7 +60,7 @@ - #endif - int valid; - _Py_BEGIN_SUPPRESS_IPH -- valid = isatty(fd); -+ valid = isatty(fd) || is_cygpty(fd); - _Py_END_SUPPRESS_IPH - if (!valid) - Py_RETURN_NONE; diff --git a/mingw-w64-python/1701-disable-broken-gdbm-module.patch b/mingw-w64-python/1701-disable-broken-gdbm-module.patch deleted file mode 100644 index bde9685754..0000000000 --- a/mingw-w64-python/1701-disable-broken-gdbm-module.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -Naur Python-3.8.0-orig/setup.py Python-3.8.0/setup.py ---- Python-3.8.0-orig/setup.py 2019-10-22 10:04:16.342687000 +0300 -+++ Python-3.8.0/setup.py 2019-10-22 10:04:48.353943200 +0300 -@@ -1331,7 +1331,7 @@ - if dbm_args: - dbm_order = [arg.split('=')[-1] for arg in dbm_args][-1].split(":") - else: -- dbm_order = "ndbm:gdbm:bdb".split(":") -+ dbm_order = [] - dbmext = None - for cand in dbm_order: - if cand == "ndbm": diff --git a/mingw-w64-python/1800-link-win-resource-files-and-build-pythonw.patch b/mingw-w64-python/1800-link-win-resource-files-and-build-pythonw.patch deleted file mode 100644 index da074016e7..0000000000 --- a/mingw-w64-python/1800-link-win-resource-files-and-build-pythonw.patch +++ /dev/null @@ -1,91 +0,0 @@ ---- Python-3.8.7/configure.ac.orig 2021-02-14 08:44:30.296278300 +0100 -+++ Python-3.8.7/configure.ac 2021-02-14 08:44:39.824214800 +0100 -@@ -1320,6 +1320,9 @@ - - AC_MSG_RESULT($LDLIBRARY) - -+AC_SUBST(WINDRES) -+AC_CHECK_TOOL(WINDRES, windres) -+ - AC_SUBST(AR) - AC_CHECK_TOOLS(AR, ar aal, ar) - -diff -Naur Python-3.8.0-orig/Makefile.pre.in Python-3.8.0/Makefile.pre.in ---- Python-3.8.0-orig/Makefile.pre.in 2019-10-22 10:04:44.812737000 +0300 -+++ Python-3.8.0/Makefile.pre.in 2019-10-22 10:04:51.177548200 +0300 -@@ -38,6 +38,7 @@ - MAINCC= @MAINCC@ - LINKCC= @LINKCC@ - AR= @AR@ -+WINDRES= @WINDRES@ - READELF= @READELF@ - SOABI= @SOABI@ - LDVERSION= @LDVERSION@ -@@ -249,6 +249,7 @@ - - PYTHON= python$(EXE) - BUILDPYTHON= python$(BUILDEXE) -+BUILDPYTHONW= pythonw$(BUILDEXE) - - PYTHON_FOR_REGEN=@PYTHON_FOR_REGEN@ - UPDATE_FILE=@PYTHON_FOR_REGEN@ $(srcdir)/Tools/scripts/update_file.py -@@ -455,7 +456,7 @@ - - # Default target - all: @DEF_MAKE_ALL_RULE@ --build_all: check-clean-src $(BUILDPYTHON) oldsharedmods sharedmods gdbhooks \ -+build_all: check-clean-src $(BUILDPYTHON) $(BUILDPYTHONW) oldsharedmods sharedmods gdbhooks \ - Programs/_testembed python-config - - # Check that the source is clean when building out of source. -@@ -569,9 +570,27 @@ - clinic: check-clean-src $(srcdir)/Modules/_blake2/blake2s_impl.c - $(PYTHON_FOR_REGEN) $(srcdir)/Tools/clinic/clinic.py --make --srcdir $(srcdir) - -+pythonnt_rc.h: -+ # FIXME: FIELD3 not set -+ @echo '#define FIELD3 0' > $@ -+ @echo '#define MS_DLL_ID "$(VERSION)"' >> $@ -+ @echo '#define PYTHON_DLL_NAME "$(DLLLIBRARY)"' >> $@ -+ -+python_exe.o: pythonnt_rc.h $(srcdir)/PC/python_exe.rc -+ $(WINDRES) -I$(srcdir)/Include -I$(srcdir)/PC -I. $(srcdir)/PC/python_exe.rc $@ -+ -+pythonw_exe.o: pythonnt_rc.h $(srcdir)/PC/pythonw_exe.rc -+ $(WINDRES) -I$(srcdir)/Include -I$(srcdir)/PC -I. $(srcdir)/PC/pythonw_exe.rc $@ -+ -+python_nt.o: pythonnt_rc.h $(srcdir)/PC/python_nt.rc -+ $(WINDRES) -I$(srcdir)/Include -I$(srcdir)/PC -I. $(srcdir)/PC/python_nt.rc $@ -+ -+$(BUILDPYTHONW): Programs/python.o $(LIBRARY) $(LDLIBRARY) $(PY3LIBRARY) pythonw_exe.o -+ $(LINKCC) $(PY_CORE_LDFLAGS) $(LINKFORSHARED) -municode -mwindows -o $@ Programs/python.o $(BLDLIBRARY) $(LIBS) $(MODLIBS) $(SYSLIBS) pythonw_exe.o -+ - # Build the interpreter --$(BUILDPYTHON): Programs/python.o $(LIBRARY) $(LDLIBRARY) $(PY3LIBRARY) -- $(LINKCC) $(PY_CORE_LDFLAGS) $(LINKFORSHARED) -o $@ Programs/python.o $(BLDLIBRARY) $(LIBS) $(MODLIBS) $(SYSLIBS) -+$(BUILDPYTHON): Programs/python.o $(LIBRARY) $(LDLIBRARY) $(PY3LIBRARY) python_exe.o -+ $(LINKCC) $(PY_CORE_LDFLAGS) $(LINKFORSHARED) -municode -o $@ Programs/python.o $(BLDLIBRARY) $(LIBS) $(MODLIBS) $(SYSLIBS) python_exe.o - - platform: $(BUILDPYTHON) pybuilddir.txt - $(RUNSHARED) $(PYTHON_FOR_BUILD) -c 'import sys ; from sysconfig import get_platform ; print("%s-%d.%d" % (get_platform(), *sys.version_info[:2]))' >platform -@@ -677,10 +696,10 @@ - - # This rule builds the Cygwin Python DLL and import library if configured - # for a shared core library; otherwise, this rule is a noop. --$(DLLLIBRARY) libpython$(LDVERSION).dll.a: $(LIBRARY_OBJS) -+$(DLLLIBRARY) libpython$(LDVERSION).dll.a: $(LIBRARY_OBJS) python_nt.o - if test -n "$(DLLLIBRARY)"; then \ - $(LDSHARED) -Wl,--out-implib=$@ -o $(DLLLIBRARY) $^ \ -- $(LIBS) $(MODLIBS) $(SYSLIBS); \ -+ $(LIBS) $(MODLIBS) $(SYSLIBS) python_nt.o; \ - else true; \ - fi - -@@ -1246,6 +1265,7 @@ - done - if test "$(PYTHONFRAMEWORKDIR)" = "no-framework" ; then \ - $(INSTALL_PROGRAM) $(BUILDPYTHON) $(DESTDIR)$(BINDIR)/python$(LDVERSION)$(EXE); \ -+ $(INSTALL_PROGRAM) $(BUILDPYTHONW) $(DESTDIR)$(BINDIR)/python3w$(EXE); \ - else \ - $(INSTALL_PROGRAM) $(STRIPFLAG) Mac/pythonw $(DESTDIR)$(BINDIR)/python$(LDVERSION)$(EXE); \ - fi diff --git a/mingw-w64-python/1810-3.7-mpdec-mingw.patch b/mingw-w64-python/1810-3.7-mpdec-mingw.patch deleted file mode 100644 index 27c1f6bdeb..0000000000 --- a/mingw-w64-python/1810-3.7-mpdec-mingw.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -Naur Python-3.8.0-orig/setup.py Python-3.8.0/setup.py ---- Python-3.8.0-orig/setup.py 2019-10-22 10:04:50.085546300 +0300 -+++ Python-3.8.0/setup.py 2019-10-22 10:04:54.016753200 +0300 -@@ -2165,7 +2165,7 @@ - undef_macros = [] - if '--with-system-libmpdec' in sysconfig.get_config_var("CONFIG_ARGS"): - include_dirs = [] -- libraries = [':libmpdec.so.2'] -+ libraries = [':libmpdec.dll.a'] - sources = ['_decimal/_decimal.c'] - depends = ['_decimal/docstrings.h'] - else: diff --git a/mingw-w64-python/1850-disable-readline.patch b/mingw-w64-python/1850-disable-readline.patch deleted file mode 100644 index 4e0b4193d0..0000000000 --- a/mingw-w64-python/1850-disable-readline.patch +++ /dev/null @@ -1,15 +0,0 @@ -diff -Naur Python-3.8.0-orig/setup.py Python-3.8.0/setup.py ---- Python-3.8.0-orig/setup.py 2019-10-22 10:04:55.763956200 +0300 -+++ Python-3.8.0/setup.py 2019-10-22 10:04:59.804363300 +0300 -@@ -911,7 +911,10 @@ - - def detect_readline_curses(self): - # readline -- do_readline = self.compiler.find_library_file(self.lib_dirs, 'readline') -+ if not MS_WINDOWS: -+ do_readline = self.compiler.find_library_file(self.lib_dirs, 'readline') -+ else: -+ do_readline = False - readline_termcap_library = "" - curses_library = "" - # Cannot use os.popen here in py3k. diff --git a/mingw-w64-python/1860-fix-isselectable.patch b/mingw-w64-python/1860-fix-isselectable.patch deleted file mode 100644 index 47ad5c7f69..0000000000 --- a/mingw-w64-python/1860-fix-isselectable.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -Naur Python-3.8.0-orig/Include/fileobject.h Python-3.8.0/Include/fileobject.h ---- Python-3.8.0-orig/Include/fileobject.h 2019-10-14 16:34:47.000000000 +0300 -+++ Python-3.8.0/Include/fileobject.h 2019-10-22 10:05:02.627968300 +0300 -@@ -23,7 +23,7 @@ - PyAPI_DATA(int) Py_HasFileSystemDefaultEncoding; - - /* A routine to check if a file descriptor can be select()-ed. */ --#ifdef _MSC_VER -+#ifdef MS_WINDOWS - /* On Windows, any socket fd can be select()-ed, no matter how high */ - #define _PyIsSelectable_fd(FD) (1) - #else diff --git a/mingw-w64-python/1870-use-_wcsnicmp-instead-wcsncasecmp.patch b/mingw-w64-python/1870-use-_wcsnicmp-instead-wcsncasecmp.patch deleted file mode 100644 index 518a9ee606..0000000000 --- a/mingw-w64-python/1870-use-_wcsnicmp-instead-wcsncasecmp.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -Naur Python-3.8.0-orig/Modules/getpath.c Python-3.8.0/Modules/getpath.c ---- Python-3.8.0-orig/Modules/getpath.c 2019-10-22 10:02:51.821738500 +0300 -+++ Python-3.8.0/Modules/getpath.c 2019-10-22 10:05:05.467173300 +0300 -@@ -373,7 +373,7 @@ - /* Check for already have an executable suffix */ - size_t n = wcslen(progpath); - size_t s = wcslen(EXE_SUFFIX); -- if (wcsncasecmp(EXE_SUFFIX, progpath + n - s, s) == 0) { -+ if (_wcsnicmp(EXE_SUFFIX, progpath + n - s, s) == 0) { - return _PyStatus_OK(); - } - diff --git a/mingw-w64-python/1890-_xxsubinterpretersmodule.patch b/mingw-w64-python/1890-_xxsubinterpretersmodule.patch deleted file mode 100644 index 0366172e30..0000000000 --- a/mingw-w64-python/1890-_xxsubinterpretersmodule.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- Python-3.8.0/Modules/_xxsubinterpretersmodule.c.orig 2019-10-22 13:34:28.145872500 +0300 -+++ Python-3.8.0/Modules/_xxsubinterpretersmodule.c 2019-10-22 13:34:49.299509600 +0300 -@@ -1749,7 +1749,7 @@ - "A channel ID identifies a channel and may be used as an int."); - - static PyTypeObject ChannelIDtype = { -- PyVarObject_HEAD_INIT(&PyType_Type, 0) -+ PyVarObject_HEAD_INIT(NULL, 0) - "_xxsubinterpreters.ChannelID", /* tp_name */ - sizeof(channelid), /* tp_basicsize */ - 0, /* tp_itemsize */ diff --git a/mingw-w64-python/2010-configure-have-inet-pton.patch b/mingw-w64-python/2010-configure-have-inet-pton.patch deleted file mode 100644 index f7b1d3a220..0000000000 --- a/mingw-w64-python/2010-configure-have-inet-pton.patch +++ /dev/null @@ -1,18 +0,0 @@ -diff -Naur Python-3.8.0-orig/configure.ac Python-3.8.0/configure.ac ---- Python-3.8.0-orig/configure.ac 2019-10-22 10:04:27.917907300 +0300 -+++ Python-3.8.0/configure.ac 2019-10-22 10:05:14.312388800 +0300 -@@ -4110,10 +4110,14 @@ - - AC_MSG_CHECKING(for inet_pton) - AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ -+#ifdef _WIN32 -+#include -+#else - #include - #include - #include - #include -+#endif - ]], [[void* p = inet_pton]])], - [AC_DEFINE(HAVE_INET_PTON, 1, Define if you have the 'inet_pton' function.) - AC_MSG_RESULT(yes)], diff --git a/mingw-w64-python/2030-fix-msvc9-import.patch b/mingw-w64-python/2030-fix-msvc9-import.patch deleted file mode 100644 index e2d49816e6..0000000000 --- a/mingw-w64-python/2030-fix-msvc9-import.patch +++ /dev/null @@ -1,21 +0,0 @@ -diff -Naur Python-3.8.0-orig/Lib/distutils/msvc9compiler.py Python-3.8.0/Lib/distutils/msvc9compiler.py ---- Python-3.8.0-orig/Lib/distutils/msvc9compiler.py 2019-10-14 16:34:47.000000000 +0300 -+++ Python-3.8.0/Lib/distutils/msvc9compiler.py 2019-10-22 10:05:17.120393700 +0300 -@@ -292,8 +292,6 @@ - - # More globals - VERSION = get_build_version() --if VERSION < 8.0: -- raise DistutilsPlatformError("VC %0.1f is not supported by this module" % VERSION) - # MACROS = MacroExpander(VERSION) - - class MSVCCompiler(CCompiler) : -@@ -328,6 +326,8 @@ - - def __init__(self, verbose=0, dry_run=0, force=0): - CCompiler.__init__ (self, verbose, dry_run, force) -+ if VERSION < 8.0: -+ raise DistutilsPlatformError("VC %0.1f is not supported by this module" % VERSION) - self.__version = VERSION - self.__root = r"Software\Microsoft\VisualStudio" - # self.__macros = MACROS diff --git a/mingw-w64-python/2051-set-venv-activate-path-unix.patch b/mingw-w64-python/2051-set-venv-activate-path-unix.patch deleted file mode 100644 index 269582db89..0000000000 --- a/mingw-w64-python/2051-set-venv-activate-path-unix.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -Naur Python-3.8.0-orig/Lib/venv/scripts/common/activate Python-3.8.0/Lib/venv/scripts/common/activate ---- Python-3.8.0-orig/Lib/venv/scripts/common/activate 2019-10-14 16:34:47.000000000 +0300 -+++ Python-3.8.0/Lib/venv/scripts/common/activate 2019-10-22 10:05:22.783203700 +0300 -@@ -37,7 +37,7 @@ - # unset irrelevant variables - deactivate nondestructive - --VIRTUAL_ENV="__VENV_DIR__" -+VIRTUAL_ENV=$(cygpath "__VENV_DIR__") - export VIRTUAL_ENV - - _OLD_VIRTUAL_PATH="$PATH" diff --git a/mingw-w64-python/2052-venv-creation-fixes.patch b/mingw-w64-python/2052-venv-creation-fixes.patch deleted file mode 100644 index 3c3cc19627..0000000000 --- a/mingw-w64-python/2052-venv-creation-fixes.patch +++ /dev/null @@ -1,62 +0,0 @@ -Don't copy the whole /bin when symlinking. -Also provide python3.exe for backwards compat. -Unset MSYSTEM, to fix some path comparisons due to os.sep differences. -Skip some msvc build specifics -diff -Naur Python-3.8.0-orig/Lib/venv/__init__.py Python-3.8.0/Lib/venv/__init__.py ---- Python-3.8.0-orig/Lib/venv/__init__.py 2019-10-22 10:05:21.691201800 +0300 -+++ Python-3.8.0/Lib/venv/__init__.py 2019-10-22 10:05:25.591208600 +0300 -@@ -11,6 +11,7 @@ - import sys - import sysconfig - import types -+from sysconfig import _POSIX_BUILD - - logger = logging.getLogger(__name__) - -@@ -110,7 +111,7 @@ - context.executable = executable - context.python_dir = dirname - context.python_exe = exename -- if sys.platform == 'win32': -+ if sys.platform == 'win32' and not _POSIX_BUILD: - binname = 'Scripts' - incpath = 'Include' - libpath = os.path.join(env_dir, 'Lib', 'site-packages') -@@ -244,7 +244,7 @@ - if not os.path.islink(path): - os.chmod(path, 0o755) - else: -- if self.symlinks: -+ if self.symlinks and not _POSIX_BUILD: - # For symlinking, we need a complete copy of the root directory - # If symlinks fail, you'll get unnecessary copies of files, but - # we assume that if you've opted into symlinks on Windows then -@@ -266,7 +267,13 @@ - if os.path.lexists(src): - copier(src, os.path.join(binpath, suffix)) - -- if sysconfig.is_python_build(True): -+ if _POSIX_BUILD: -+ # copy from python/pythonw so the venvlauncher magic in symlink_or_copy triggers -+ copier(os.path.join(dirname, 'python.exe'), os.path.join(binpath, 'python3.exe')) -+ copier(os.path.join(dirname, 'python.exe'), os.path.join(binpath, 'python%d.%d.exe' % sys.version_info[:2])) -+ copier(os.path.join(dirname, 'pythonw.exe'), os.path.join(binpath, 'python3w.exe')) -+ -+ if sysconfig.is_python_build(True) and not _POSIX_BUILD: - # copy init.tcl - for root, dirs, files in os.walk(context.python_dir): - if 'init.tcl' in files: -@@ -285,9 +285,11 @@ - # We run ensurepip in isolated mode to avoid side effects from - # environment vars, the current directory and anything else - # intended for the global Python environment -+ env = os.environ.copy() -+ env.pop("MSYSTEM", None) - cmd = [context.env_exe, '-Im', 'ensurepip', '--upgrade', -- '--default-pip'] -- subprocess.check_output(cmd, stderr=subprocess.STDOUT) -+ '--default-pip'] -+ subprocess.check_call(cmd, stderr=subprocess.STDOUT, env=env) - - def setup_scripts(self, context): - """ diff --git a/mingw-w64-python/2060-pass-gen-profile-ldflags.patch b/mingw-w64-python/2060-pass-gen-profile-ldflags.patch deleted file mode 100644 index c033a9d221..0000000000 --- a/mingw-w64-python/2060-pass-gen-profile-ldflags.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -Naur Python-3.8.0-orig/Makefile.pre.in Python-3.8.0/Makefile.pre.in ---- Python-3.8.0-orig/Makefile.pre.in 2019-10-22 10:05:10.396781900 +0300 -+++ Python-3.8.0/Makefile.pre.in 2019-10-22 10:05:28.430413600 +0300 -@@ -699,7 +699,7 @@ - $(DLLLIBRARY) libpython$(LDVERSION).dll.a: $(LIBRARY_OBJS) python_nt.o - if test -n "$(DLLLIBRARY)"; then \ - $(LDSHARED) -Wl,--out-implib=$@ -o $(DLLLIBRARY) $^ \ -- $(LIBS) $(MODLIBS) $(SYSLIBS) python_nt.o; \ -+ $(LIBS) $(LDFLAGS_NODIST) $(MODLIBS) $(SYSLIBS) python_nt.o; \ - else true; \ - fi - diff --git a/mingw-w64-python/2070-distutils-add-windmc-to-cygwinccompiler.patch b/mingw-w64-python/2070-distutils-add-windmc-to-cygwinccompiler.patch deleted file mode 100644 index 5f81526a1a..0000000000 --- a/mingw-w64-python/2070-distutils-add-windmc-to-cygwinccompiler.patch +++ /dev/null @@ -1,44 +0,0 @@ -diff -Naur Python-3.8.0-orig/Lib/distutils/cygwinccompiler.py Python-3.8.0/Lib/distutils/cygwinccompiler.py ---- Python-3.8.0-orig/Lib/distutils/cygwinccompiler.py 2019-10-22 10:04:07.887472100 +0300 -+++ Python-3.8.0/Lib/distutils/cygwinccompiler.py 2019-10-22 10:05:31.254018600 +0300 -@@ -165,6 +165,28 @@ - self.spawn(["windres", "-i", src, "-o", obj]) - except DistutilsExecError as msg: - raise CompileError(msg) -+ elif ext == '.mc': -+ # Adapted from msvc9compiler: -+ # -+ # Compile .MC to .RC file to .RES file. -+ # * '-h dir' specifies the directory for the generated include file -+ # * '-r dir' specifies the target directory of the generated RC file and the binary message resource it includes -+ # -+ # For now (since there are no options to change this), -+ # we use the source-directory for the include file and -+ # the build directory for the RC file and message -+ # resources. This works at least for win32all. -+ h_dir = os.path.dirname(src) -+ rc_dir = os.path.dirname(obj) -+ try: -+ # first compile .MC to .RC and .H file -+ self.spawn(['windmc'] + ['-h', h_dir, '-r', rc_dir] + [src]) -+ base, _ = os.path.splitext(os.path.basename(src)) -+ rc_file = os.path.join(rc_dir, base + '.rc') -+ # then compile .RC to .RES file -+ self.spawn(['windres', '-i', rc_file, '-o', obj]) -+ except DistutilsExecError as msg: -+ raise CompileError(msg) - else: # for other files use the C-compiler - try: - self.spawn(self.compiler_so + cc_args + [src, '-o', obj] + -@@ -259,9 +281,9 @@ - base, ext = os.path.splitext(src_name) - # use 'normcase' only for resource suffixes - ext_normcase = os.path.normcase(ext) -- if ext_normcase in ['.rc','.res']: -+ if ext_normcase in ['.rc', '.res', '.mc']: - ext = ext_normcase -- if ext not in (self.src_extensions + ['.rc','.res']): -+ if ext not in (self.src_extensions + ['.rc', '.res', '.mc']): - raise UnknownFileError("unknown file type '%s' (from '%s')" % \ - (ext, src_name)) - base = os.path.splitdrive(base)[1] # Chop off the drive diff --git a/mingw-w64-python/2080-pkg-config-windows-must-link-ext-with-python-lib.patch b/mingw-w64-python/2080-pkg-config-windows-must-link-ext-with-python-lib.patch deleted file mode 100644 index af2751206c..0000000000 --- a/mingw-w64-python/2080-pkg-config-windows-must-link-ext-with-python-lib.patch +++ /dev/null @@ -1,20 +0,0 @@ ---- Python-3.8.0/configure.ac.orig 2019-10-24 13:55:46.684382200 +0300 -+++ Python-3.8.0/configure.ac 2019-10-24 13:55:55.334394400 +0300 -@@ -4990,7 +4990,7 @@ - - # On Android and Cygwin the shared libraries must be linked with libpython. - AC_SUBST(LIBPYTHON) --if test -n "$ANDROID_API_LEVEL" -o "$MACHDEP" = "cygwin"; then -+if test -n "$ANDROID_API_LEVEL" -o "$MACHDEP" = "cygwin" -o "$MACHDEP" = "win"; then - LIBPYTHON="-lpython${VERSION}${ABIFLAGS}" - else - LIBPYTHON='' ---- Python-3.8.0/Misc/python.pc.in.orig 2019-10-24 13:55:46.684382200 +0300 -+++ Python-3.8.0/Misc/python.pc.in 2019-10-24 13:55:55.334394400 +0300 -@@ -9,5 +9,5 @@ - Requires: - Version: @VERSION@ - Libs.private: @LIBS@ --Libs: -+Libs: -L${libdir} -lpython@VERSION@@ABIFLAGS@ - Cflags: -I${includedir}/python@VERSION@@ABIFLAGS@ diff --git a/mingw-w64-python/3000-importlib-bootstrap-path-sep.patch b/mingw-w64-python/3000-importlib-bootstrap-path-sep.patch deleted file mode 100644 index c46cf68fbd..0000000000 --- a/mingw-w64-python/3000-importlib-bootstrap-path-sep.patch +++ /dev/null @@ -1,14 +0,0 @@ ---- Python-3.8.0/Lib/importlib/_bootstrap_external.py.orig 2019-12-21 14:31:23.806479400 +0100 -+++ Python-3.8.0/Lib/importlib/_bootstrap_external.py 2019-12-21 14:34:37.093867400 +0100 -@@ -1603,6 +1603,11 @@ - continue - else: - raise ImportError('importlib requires posix or nt') -+ -+ if 'MSYSTEM' in os_module.environ: -+ path_separators = path_separators[::-1] -+ path_sep = path_separators[0] -+ - setattr(self_module, '_os', os_module) - setattr(self_module, 'path_sep', path_sep) - setattr(self_module, 'path_separators', ''.join(path_separators)) diff --git a/mingw-w64-python/3001-pathlib-path-sep.patch b/mingw-w64-python/3001-pathlib-path-sep.patch deleted file mode 100644 index be5d188e26..0000000000 --- a/mingw-w64-python/3001-pathlib-path-sep.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- Python-3.8.1/Lib/pathlib.py.orig 2019-12-18 18:21:23.000000000 +0100 -+++ Python-3.8.1/Lib/pathlib.py 2019-12-23 11:17:46.731915100 +0100 -@@ -122,6 +122,8 @@ - - sep = '\\' - altsep = '/' -+ if 'MSYSTEM' in os.environ: -+ sep, altsep = altsep, sep - has_drv = True - pathmod = ntpath - diff --git a/mingw-w64-python/3011-fix-build-testinternalcapi.patch b/mingw-w64-python/3011-fix-build-testinternalcapi.patch deleted file mode 100644 index d06b0ffef3..0000000000 --- a/mingw-w64-python/3011-fix-build-testinternalcapi.patch +++ /dev/null @@ -1,14 +0,0 @@ ---- Python-3.8.7/setup.py.orig 2020-12-26 07:15:03.663309900 +0100 -+++ Python-3.8.7/setup.py 2020-12-26 07:51:28.765752400 +0100 -@@ -892,7 +892,11 @@ - depends=['testcapi_long.h'])) - - # Python Internal C API test module -+ macros = [] -+ if MS_WINDOWS: -+ macros.append(('PY3_DLLNAME', 'L"%s"' % sysconfig.get_config_var('DLLLIBRARY'))) - self.add(Extension('_testinternalcapi', ['_testinternalcapi.c'], -+ define_macros=macros, - extra_compile_args=['-DPy_BUILD_CORE_MODULE'])) - - # Python PEP-3118 (buffer protocol) test module \ No newline at end of file diff --git a/mingw-w64-python/3020-extend-MS_WINDOWS-flag.patch b/mingw-w64-python/3020-extend-MS_WINDOWS-flag.patch deleted file mode 100644 index 07ec022943..0000000000 --- a/mingw-w64-python/3020-extend-MS_WINDOWS-flag.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- cpython-msys2/setup.py 2021-01-24 12:00:01.170000000 +0700 -+++ cpython/setup.py 2021-01-24 10:50:57.710000000 +0700 -@@ -51,7 +51,7 @@ - - CROSS_COMPILING = ("_PYTHON_HOST_PLATFORM" in os.environ) - HOST_PLATFORM = get_platform() --MS_WINDOWS = (HOST_PLATFORM == 'win32') -+MS_WINDOWS = (HOST_PLATFORM == 'win32' or HOST_PLATFORM == 'mingw') - CYGWIN = (HOST_PLATFORM == 'cygwin') - MACOS = (HOST_PLATFORM == 'darwin') - AIX = (HOST_PLATFORM.startswith('aix')) diff --git a/mingw-w64-python/4000-clang-arm64.patch b/mingw-w64-python/4000-clang-arm64.patch deleted file mode 100644 index 10e5d021e5..0000000000 --- a/mingw-w64-python/4000-clang-arm64.patch +++ /dev/null @@ -1,46 +0,0 @@ ---- Python-3.8.7/Python/getcompiler.c.orig 2021-01-21 00:00:29.237009400 -0800 -+++ Python-3.8.7/Python/getcompiler.c 2021-01-21 00:08:07.812256200 -0800 -@@ -7,7 +7,7 @@ - - // Note the __clang__ conditional has to come before the __GNUC__ one because - // clang pretends to be GCC. --#if defined(__clang__) -+#if defined(__clang__) && !defined(_WIN32) - #define COMPILER "\n[Clang " __clang_version__ "]" - #elif defined(__GNUC__) - /* To not break compatibility with things that determine -@@ -18,6 +18,8 @@ - #define COMP_SEP " " - #if defined(__x86_64__) - #define ARCH_SUFFIX " 64 bit (AMD64)" -+#elif defined(__aarch64__) -+#define ARCH_SUFFIX " 64 bit (ARM64)" - #else - #define ARCH_SUFFIX " 32 bit" - #endif -@@ -25,7 +27,14 @@ - #define COMP_SEP "\n" - #define ARCH_SUFFIX "" - #endif -+#if defined(__clang__) -+#define str(x) #x -+#define xstr(x) str(x) -+#define COMPILER COMP_SEP "[GCC Clang " xstr(__clang_major__) "." \ -+ xstr(__clang_minor__) "." xstr(__clang_patchlevel__) ARCH_SUFFIX "]" -+#else - #define COMPILER COMP_SEP "[GCC " __VERSION__ ARCH_SUFFIX "]" -+#endif - // Generic fallbacks. - #elif defined(__cplusplus) - #define COMPILER "[C++]" ---- Python-3.8.7/Lib/distutils/cygwinccompiler.py~ 2021-01-21 00:32:02.844891200 -0800 -+++ Python-3.8.7/Lib/distutils/cygwinccompiler.py 2021-01-21 10:58:17.540398500 -0800 -@@ -396,7 +396,7 @@ - return (CONFIG_H_UNCERTAIN, - "couldn't read '%s': %s" % (fn, exc.strerror)) - --RE_VERSION = re.compile(br'[\D\s]*(\d+\.\d+(\.\d+)*)[\D\s]*$') -+RE_VERSION = re.compile(br'[\D\s]*(\d+\.\d+(\.\d+)*)[\D\s]*') - - def _find_exe_version(cmd): - """Find the version of an executable by running `cmd` in the shell. diff --git a/mingw-w64-python/5000-warnings-fixes.patch b/mingw-w64-python/5000-warnings-fixes.patch deleted file mode 100644 index 035b603638..0000000000 --- a/mingw-w64-python/5000-warnings-fixes.patch +++ /dev/null @@ -1,115 +0,0 @@ -diff -Naur Python-3.8.0-orig/Modules/_winapi.c Python-3.8.0/Modules/_winapi.c ---- Python-3.8.0-orig/Modules/_winapi.c 2019-10-22 10:01:51.434032500 +0300 -+++ Python-3.8.0/Modules/_winapi.c 2019-10-22 10:05:34.654824500 +0300 -@@ -951,7 +951,7 @@ - DWORD err; - BOOL result; - PyObject *value; -- Py_ssize_t handle_list_size; -+ Py_ssize_t handle_list_size = 0; - DWORD attribute_count = 0; - SIZE_T attribute_list_size = 0; - -diff -Naur Python-3.8.0-orig/Modules/posixmodule.c Python-3.8.0/Modules/posixmodule.c ---- Python-3.8.0-orig/Modules/posixmodule.c 2019-10-22 10:04:46.029539100 +0300 -+++ Python-3.8.0/Modules/posixmodule.c 2019-10-22 10:05:35.076025300 +0300 -@@ -4804,7 +4804,7 @@ - /*[clinic end generated code: output=cfcac69d027b82cf input=2fbd62a2f228f8f4]*/ - { - #ifdef MS_WINDOWS -- HANDLE hFile; -+ HANDLE hFile = 0; - FILETIME atime, mtime; - #else - int result; -@@ -12225,7 +12225,9 @@ - int ncpu = 0; - #ifdef MS_WINDOWS - /* Declare prototype here to avoid pulling in all of the Win7 APIs in 3.8 */ -+#if defined (_WIN32_WINNT) && (_WIN32_WINNT < 0x601) - DWORD WINAPI GetActiveProcessorCount(WORD group); -+#endif - ncpu = GetActiveProcessorCount(ALL_PROCESSOR_GROUPS); - #elif defined(__hpux) - ncpu = mpctl(MPC_GETNUMSPUS, NULL, NULL); -@@ -13489,7 +13491,7 @@ - loaded. */ - Py_BEGIN_ALLOW_THREADS - if (!(hKernel32 = GetModuleHandleW(L"kernel32")) || -- !(AddDllDirectory = (PAddDllDirectory)GetProcAddress( -+ !(AddDllDirectory = (PAddDllDirectory)(void *)GetProcAddress( - hKernel32, "AddDllDirectory")) || - !(cookie = (*AddDllDirectory)(path->wide))) { - err = GetLastError(); -@@ -13539,7 +13541,7 @@ - loaded. */ - Py_BEGIN_ALLOW_THREADS - if (!(hKernel32 = GetModuleHandleW(L"kernel32")) || -- !(RemoveDllDirectory = (PRemoveDllDirectory)GetProcAddress( -+ !(RemoveDllDirectory = (PRemoveDllDirectory)(void *)GetProcAddress( - hKernel32, "RemoveDllDirectory")) || - !(*RemoveDllDirectory)(cookieValue)) { - err = GetLastError(); -diff -Naur Python-3.8.0-orig/Modules/socketmodule.h Python-3.8.0/Modules/socketmodule.h ---- Python-3.8.0-orig/Modules/socketmodule.h 2019-10-14 16:34:47.000000000 +0300 -+++ Python-3.8.0/Modules/socketmodule.h 2019-10-22 10:05:35.466026000 +0300 -@@ -29,8 +29,10 @@ - */ - # ifdef SIO_GET_MULTICAST_FILTER - # include /* for SIO_RCVALL */ -+#ifndef __MINGW32__ /* resolve by configure */ - # define HAVE_ADDRINFO - # define HAVE_SOCKADDR_STORAGE -+#endif - # define HAVE_GETADDRINFO - # define HAVE_GETNAMEINFO - # define ENABLE_IPV6 -diff -Naur Python-3.8.0-orig/PC/python_exe.rc Python-3.8.0/PC/python_exe.rc ---- Python-3.8.0-orig/PC/python_exe.rc 2019-10-14 16:34:47.000000000 +0300 -+++ Python-3.8.0/PC/python_exe.rc 2019-10-22 10:05:35.871626700 +0300 -@@ -7,7 +7,7 @@ - #include - 1 RT_MANIFEST "python.manifest" - --1 ICON DISCARDABLE "icons\python.ico" -+1 ICON DISCARDABLE "icons/python.ico" - - - ///////////////////////////////////////////////////////////////////////////// -diff -Naur Python-3.8.0-orig/PC/pythonw_exe.rc Python-3.8.0/PC/pythonw_exe.rc ---- Python-3.8.0-orig/PC/pythonw_exe.rc 2019-10-14 16:34:47.000000000 +0300 -+++ Python-3.8.0/PC/pythonw_exe.rc 2019-10-22 10:05:36.277227400 +0300 -@@ -7,7 +7,7 @@ - #include - 1 RT_MANIFEST "python.manifest" - --1 ICON DISCARDABLE "icons\pythonw.ico" -+1 ICON DISCARDABLE "icons/pythonw.ico" - - - ///////////////////////////////////////////////////////////////////////////// -diff -Naur Python-3.8.0-orig/PC/winreg.c Python-3.8.0/PC/winreg.c ---- Python-3.8.0-orig/PC/winreg.c 2019-10-22 10:01:02.698546800 +0300 -+++ Python-3.8.0/PC/winreg.c 2019-10-22 10:05:36.682828100 +0300 -@@ -800,6 +800,7 @@ - case REG_BINARY: - /* ALSO handle ALL unknown data types here. Even if we can't - support it natively, we should handle the bits. */ -+ /* fallthrough */ - default: - if (retDataSize == 0) { - Py_INCREF(Py_None); -diff -Naur Python-3.8.0-orig/Python/thread_nt.h Python-3.8.0/Python/thread_nt.h ---- Python-3.8.0-orig/Python/thread_nt.h 2019-10-14 16:34:47.000000000 +0300 -+++ Python-3.8.0/Python/thread_nt.h 2019-10-22 10:05:37.088428800 +0300 -@@ -342,8 +342,9 @@ - { - dprintf(("%lu: PyThread_release_lock(%p) called\n", PyThread_get_thread_ident(),aLock)); - -- if (!(aLock && LeaveNonRecursiveMutex((PNRMUTEX) aLock))) -+ if (!(aLock && LeaveNonRecursiveMutex((PNRMUTEX) aLock))) { - dprintf(("%lu: Could not PyThread_release_lock(%p) error: %ld\n", PyThread_get_thread_ident(), aLock, GetLastError())); -+ } - } - - /* minimum/maximum thread stack sizes supported */ diff --git a/mingw-w64-python/PKGBUILD b/mingw-w64-python/PKGBUILD index 5f136a60df..63a9b1a360 100644 --- a/mingw-w64-python/PKGBUILD +++ b/mingw-w64-python/PKGBUILD @@ -3,26 +3,26 @@ # Contributor: Saul Ibarra Corretge # Contributor: Frode Solheim -# TODO :: subprocess.Popen .. specifically list2cmdline in subprocess.py -# needs a fix so it can handle running MSYS2 executables better. -# Arguments should not be quoted in the Windows fashion as-per: -# http://www.daviddeley.com/autohotkey/parameters/parameters.htm -# but instead how Cygwin expects them to be quoted. Checking for -# {cygwin,msys-2.0}.dll in the executable is the only way that I -# can think to do this at present. -# Any double quoted string will cause problems, e.g. -# -DGNOMELOCALEDIR=\"/mingw64/share/locale\" - +_primary_python="yes" +_pybasever=3.9 _realname=python -pkgbase="mingw-w64-${_realname}" -pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}") -_pybasever=3.8 -pkgver=${_pybasever}.9 -pkgrel=2 -provides=("${MINGW_PACKAGE_PREFIX}-python3=${pkgver}") -conflicts=("${MINGW_PACKAGE_PREFIX}-python3" - "${MINGW_PACKAGE_PREFIX}-python2<2.7.16-7") -replaces=("${MINGW_PACKAGE_PREFIX}-python3") + +if [[ "${_primary_python}" == "yes" ]]; then + pkgbase="mingw-w64-${_realname}" + pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}") + provides=("${MINGW_PACKAGE_PREFIX}-python3" + "${MINGW_PACKAGE_PREFIX}-python${_pybasever}") + conflicts=("${MINGW_PACKAGE_PREFIX}-python3" + "${MINGW_PACKAGE_PREFIX}-python${_pybasever}" + "${MINGW_PACKAGE_PREFIX}-python2<2.7.16-7") + replaces=("${MINGW_PACKAGE_PREFIX}-python3" + "${MINGW_PACKAGE_PREFIX}-python${_pybasever}") +else + pkgbase="mingw-w64-${_realname}${_pybasever}" + pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}${_pybasever}") +fi +pkgver=${_pybasever}.6 +pkgrel=1 pkgdesc="A high-level scripting language (mingw-w64)" arch=('any') mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64' 'clang32' 'clangarm64') @@ -40,104 +40,115 @@ depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs" "${MINGW_PACKAGE_PREFIX}-tk" "${MINGW_PACKAGE_PREFIX}-zlib" "${MINGW_PACKAGE_PREFIX}-xz") -makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" "${MINGW_PACKAGE_PREFIX}-pkg-config" "autoconf-archive") -options=('makeflags') # 'debug' '!strip' ) +makedepends=( + "${MINGW_PACKAGE_PREFIX}-gcc" + "${MINGW_PACKAGE_PREFIX}-pkg-config" + "autoconf-archive" +) +options=('makeflags') # 'debug' '!strip') source=("https://www.python.org/ftp/python/${pkgver%rc?}/Python-${pkgver}.tar.xz" - 0000-make-_sysconfigdata.py-relocatable.patch - 0001-fix-_nt_quote_args-using-subprocess-list2cmdline.patch + "smoketests.py" + 0001-make-_sysconfigdata.py-relocatable.patch 0002-restore-setup-config.patch - 0100-MINGW-BASE-use-NT-thread-model.patch - 0110-MINGW-translate-gcc-internal-defines-to-python-platf.patch - 0130-MINGW-configure-MACHDEP-and-platform-for-build.patch - 0140-MINGW-preset-configure-defaults.patch - 0150-MINGW-configure-largefile-support-for-windows-builds.patch - 0170-MINGW-add-srcdir-PC-to-CPPFLAGS.patch - 0180-MINGW-init-system-calls.patch - 0200-MINGW-build-in-windows-modules-winreg.patch - 0210-MINGW-determine-if-pwdmodule-should-be-used.patch - 0250-MINGW-compiler-customize-mingw-cygwin-compilers.patch - 0260-MINGW-compiler-enable-new-dtags.patch - 0290-issue6672-v2-Add-Mingw-recognition-to-pyport.h-to-al.patch - 0300-MINGW-configure-for-shared-build.patch - 0310-MINGW-dynamic-loading-support.patch - 0330-MINGW-ignore-main-program-for-frozen-scripts.patch - 0350-MINGW-setup-_multiprocessing-module.patch - 0360-MINGW-setup-select-module.patch - 0370-MINGW-setup-_ctypes-module-with-system-libffi.patch - 0380-MINGW-defect-winsock2-and-setup-_socket-module.patch - 0390-MINGW-exclude-unix-only-modules.patch - 0400-MINGW-setup-msvcrt-and-_winapi-modules.patch - 0410-MINGW-build-extensions-with-GCC.patch - 0420-MINGW-use-Mingw32CCompiler-as-default-compiler-for-m.patch - 0430-MINGW-find-import-library.patch - 0440-MINGW-setup-_ssl-module.patch - 0460-MINGW-generalization-of-posix-build-in-sysconfig.py.patch - 0462-MINGW-support-stdcall-without-underscore.patch - 0464-use-replace-instead-rename-to-avoid-failure-on-windo.patch - 0470-MINGW-avoid-circular-dependency-from-time-module-dur.patch - 0480-MINGW-generalization-of-posix-build-in-distutils-sys.patch - 0490-MINGW-customize-site.patch - 0500-add-python-config-sh.patch - 0510-cross-darwin-feature.patch - 0520-py3k-mingw-ntthreads-vs-pthreads.patch - 0530-mingw-system-libffi.patch - 0555-msys-mingw-prefer-unix-sep-if-MSYSTEM.patch - 0560-mingw-use-posix-getpath.patch - 0565-mingw-add-ModuleFileName-dir-to-PATH.patch - 0570-mingw-add-BUILDIN_WIN32_MODULEs-time-msvcrt.patch - 0610-msys-cygwin-semi-native-build-sysconfig.patch - 0620-mingw-sysconfig-like-posix.patch - 0630-mingw-_winapi_as_builtin_for_Popen_in_cygwinccompiler.patch - 0640-mingw-x86_64-size_t-format-specifier-pid_t.patch - 0650-cross-dont-add-multiarch-paths-if-cross-compiling.patch - 0660-mingw-use-backslashes-in-compileall-py.patch - 0670-msys-convert_path-fix-and-root-hack.patch - 0690-allow-static-tcltk.patch - 0720-mingw-pdcurses_ISPAD.patch - 0740-grammar-fixes.patch - 0750-builddir-fixes.patch - 0760-msys-monkeypatch-os-system-via-sh-exe.patch - 0770-msys-replace-slashes-used-in-io-redirection.patch - 0800-mingw-install-layout-as-posix.patch - 0810-remove_path_max.default.patch - 0820-dont-link-with-gettext.patch - 0830-ctypes-python-dll.patch - 0840-gdbm-module-includes.patch - 0850-use-gnu_printf-in-format.patch - 0870-mingw-fix-ssl-dont-use-enum_certificates.patch - 0890-mingw-build-optimized-ext.patch - 0900-cygwinccompiler-dont-strip-modules-if-pydebug.patch - 0910-fix-using-dllhandle-and-winver-mingw.patch - 0920-mingw-add-LIBPL-to-library-dirs.patch - 0970-Add-AMD64-to-sys-config-so-msvccompiler-get_build_version-works.patch - 0990-MINGW-link-with-additional-library.patch - 1010-install-msilib.patch - 1060-dont-include-system-ncurses-path.patch - 1620-fix-signal-module-build.patch - 1630-build-winconsoleio.patch - 1650-expose-sem_unlink.patch - 1700-cygpty-isatty.patch - 1701-disable-broken-gdbm-module.patch - 1800-link-win-resource-files-and-build-pythonw.patch - 1810-3.7-mpdec-mingw.patch - 1850-disable-readline.patch - 1860-fix-isselectable.patch - 1870-use-_wcsnicmp-instead-wcsncasecmp.patch - 1890-_xxsubinterpretersmodule.patch - 2010-configure-have-inet-pton.patch - 2030-fix-msvc9-import.patch - 2051-set-venv-activate-path-unix.patch - 2052-venv-creation-fixes.patch - 2060-pass-gen-profile-ldflags.patch - 2070-distutils-add-windmc-to-cygwinccompiler.patch - 2080-pkg-config-windows-must-link-ext-with-python-lib.patch - 3000-importlib-bootstrap-path-sep.patch - 3001-pathlib-path-sep.patch - 3011-fix-build-testinternalcapi.patch - 3020-extend-MS_WINDOWS-flag.patch - 4000-clang-arm64.patch - 5000-warnings-fixes.patch - smoketests.py) + 0003-MINGW-BASE-use-NT-thread-model.patch + 0004-MINGW-translate-gcc-internal-defines-to-python-platf.patch + 0005-MINGW-configure-MACHDEP-and-platform-for-build.patch + 0006-MINGW-preset-configure-defaults.patch + 0007-MINGW-configure-largefile-support-for-windows-builds.patch + 0008-MINGW-add-srcdir-PC-to-CPPFLAGS.patch + 0009-MINGW-init-system-calls.patch + 0010-MINGW-build-in-windows-modules-winreg.patch + 0011-MINGW-determine-if-pwdmodule-should-be-used.patch + 0012-MINGW-compiler-customize-mingw-cygwin-compilers.patch + 0013-MINGW-compiler-enable-new-dtags.patch + 0014-issue6672-v2-Add-Mingw-recognition-to-pyport.h-to-al.patch + 0015-MINGW-configure-for-shared-build.patch + 0016-MINGW-dynamic-loading-support.patch + 0017-MINGW-ignore-main-program-for-frozen-scripts.patch + 0018-MINGW-setup-_multiprocessing-module.patch + 0019-MINGW-setup-select-module.patch + 0020-MINGW-setup-_ctypes-module-with-system-libffi.patch + 0021-MINGW-defect-winsock2-and-setup-_socket-module.patch + 0022-MINGW-exclude-unix-only-modules.patch + 0023-MINGW-setup-msvcrt-and-_winapi-modules.patch + 0024-MINGW-build-extensions-with-GCC.patch + 0025-MINGW-use-Mingw32CCompiler-as-default-compiler-for-m.patch + 0026-MINGW-find-import-library.patch + 0027-MINGW-setup-_ssl-module.patch + 0028-MINGW-generalization-of-posix-build-in-sysconfig.py.patch + 0029-MINGW-support-stdcall-without-underscore.patch + 0030-use-replace-instead-rename-to-avoid-failure-on-windo.patch + 0031-MINGW-avoid-circular-dependency-from-time-module-dur.patch + 0032-MINGW-generalization-of-posix-build-in-distutils-sys.patch + 0033-MINGW-customize-site.patch + 0034-add-python-config-sh.patch + 0035-cross-darwin-feature.patch + 0036-py3k-mingw-ntthreads-vs-pthreads.patch + 0037-mingw-system-libffi.patch + 0038-msys-mingw-prefer-unix-sep-if-MSYSTEM.patch + 0039-mingw-use-posix-getpath.patch + 0040-mingw-add-ModuleFileName-dir-to-PATH.patch + 0041-mingw-add-BUILDIN_WIN32_MODULEs-time-msvcrt.patch + 0042-msys-cygwin-semi-native-build-sysconfig.patch + 0043-mingw-sysconfig-like-posix.patch + 0044-mingw-_winapi_as_builtin_for_Popen_in_cygwinccompile.patch + 0045-cross-dont-add-multiarch-paths-if-cross-compiling.patch + 0046-mingw-use-backslashes-in-compileall-py.patch + 0047-msys-convert_path-fix-and-root-hack.patch + 0048-allow-static-tcltk.patch + 0049-mingw-pdcurses_ISPAD.patch + 0050-grammar-fixes.patch + 0051-builddir-fixes.patch + 0052-msys-monkeypatch-os-system-via-sh-exe.patch + 0053-msys-replace-slashes-used-in-io-redirection.patch + 0054-mingw-install-layout-as-posix.patch + 0055-remove_path_max.default.patch + 0056-dont-link-with-gettext.patch + 0057-ctypes-python-dll.patch + 0058-gdbm-module-includes.patch + 0059-use-gnu_printf-in-format.patch + 0060-mingw-fix-ssl-dont-use-enum_certificates.patch + 0061-mingw-build-optimized-ext.patch + 0062-cygwinccompiler-dont-strip-modules-if-pydebug.patch + 0063-fix-using-dllhandle-and-winver-mingw.patch + 0064-mingw-add-LIBPL-to-library-dirs.patch + 0065-Add-AMD64-to-sys-config-so-msvccompiler-get_build_ve.patch + 0066-MINGW-link-with-additional-library.patch + 0067-install-msilib.patch + 0068-dont-include-system-ncurses-path.patch + 0069-fix-signal-module-build.patch + 0070-build-winconsoleio.patch + 0071-expose-sem_unlink.patch + 0072-cygpty-isatty.patch + 0073-disable-broken-gdbm-module.patch + 0074-link-win-resource-files-and-build-pythonw.patch + 0075-3.7-mpdec-mingw.patch + 0076-disable-readline.patch + 0077-fix-isselectable.patch + 0078-use-_wcsnicmp-instead-wcsncasecmp.patch + 0079-_xxsubinterpretersmodule.patch + 0080-sqlite3-module-defines.patch + 0081-configure-have-inet-pton.patch + 0082-fix-msvc9-import.patch + 0083-set-venv-activate-path-unix.patch + 0084-venv-creation-fixes.patch + 0085-pass-gen-profile-ldflags.patch + 0086-distutils-add-windmc-to-cygwinccompiler.patch + 0087-pkg-config-windows-must-link-ext-with-python-lib.patch + 0088-importlib-bootstrap-path-sep.patch + 0089-pathlib-path-sep.patch + 0090-warnings-fixes.patch + 0091-fix-build-testinternalcapi.patch + 0092-extend-MS_WINDOWS-flag.patch + 0093-clang-arm64.patch + 0094-MINGW-stack-reserve.patch + 0095-Add-support-for-Windows-7-Python-3.9.patch + 0097-Don-t-use-os.pathsep-to-find-EOF.patch + 0098-Fix-extension-suffix-for-c-extensions-on-mingw.patch + 0099-Change-the-get_platform-method-in-sysconfig-and-dist.patch + 0103-squash-Fixup-.rc-handling.patch + 0104-squash-Set-MS_DLL_ID.patch + 0107-squash-fix-srcdir-builddir.patch) # Helper macros to help make tasks easier # apply_patch_with_msg() { @@ -148,164 +159,111 @@ apply_patch_with_msg() { done } -del_file_exists() { - for _fname in "$@" - do - if [ -f ${_fname} ]; then - rm -rf ${_fname} - fi - done -} -# =========================================== # - prepare() { cd "${srcdir}/Python-${pkgver}" - plain "Apply Ray Donnelly's should-be-upstreamed patches" - apply_patch_with_msg \ - 0000-make-_sysconfigdata.py-relocatable.patch \ - 0001-fix-_nt_quote_args-using-subprocess-list2cmdline.patch \ - 0002-restore-setup-config.patch - - plain "Apply Roumen Petrov's core patches (10)" - apply_patch_with_msg \ - 0100-MINGW-BASE-use-NT-thread-model.patch \ - 0110-MINGW-translate-gcc-internal-defines-to-python-platf.patch \ - 0130-MINGW-configure-MACHDEP-and-platform-for-build.patch \ - 0140-MINGW-preset-configure-defaults.patch \ - 0150-MINGW-configure-largefile-support-for-windows-builds.patch \ - 0170-MINGW-add-srcdir-PC-to-CPPFLAGS.patch \ - 0180-MINGW-init-system-calls.patch \ - 0200-MINGW-build-in-windows-modules-winreg.patch \ - 0210-MINGW-determine-if-pwdmodule-should-be-used.patch - - plain "Apply Roumen Petrov's compiler patch (2)" - apply_patch_with_msg \ - 0250-MINGW-compiler-customize-mingw-cygwin-compilers.patch \ - 0260-MINGW-compiler-enable-new-dtags.patch - - plain "Apply Roumen Petrov's extensions patches (21)" - apply_patch_with_msg \ - 0290-issue6672-v2-Add-Mingw-recognition-to-pyport.h-to-al.patch \ - 0300-MINGW-configure-for-shared-build.patch \ - 0310-MINGW-dynamic-loading-support.patch \ - 0330-MINGW-ignore-main-program-for-frozen-scripts.patch \ - 0350-MINGW-setup-_multiprocessing-module.patch \ - 0360-MINGW-setup-select-module.patch \ - 0370-MINGW-setup-_ctypes-module-with-system-libffi.patch \ - 0380-MINGW-defect-winsock2-and-setup-_socket-module.patch \ - 0390-MINGW-exclude-unix-only-modules.patch \ - 0400-MINGW-setup-msvcrt-and-_winapi-modules.patch \ - 0410-MINGW-build-extensions-with-GCC.patch \ - 0420-MINGW-use-Mingw32CCompiler-as-default-compiler-for-m.patch \ - 0430-MINGW-find-import-library.patch \ - 0440-MINGW-setup-_ssl-module.patch \ - 0460-MINGW-generalization-of-posix-build-in-sysconfig.py.patch \ - 0462-MINGW-support-stdcall-without-underscore.patch \ - 0464-use-replace-instead-rename-to-avoid-failure-on-windo.patch \ - 0470-MINGW-avoid-circular-dependency-from-time-module-dur.patch \ - 0480-MINGW-generalization-of-posix-build-in-distutils-sys.patch \ - 0490-MINGW-customize-site.patch - - plain "Apply Ray Donnelly's general/cross patches (42)" - apply_patch_with_msg \ - 0500-add-python-config-sh.patch \ - 0510-cross-darwin-feature.patch \ - 0520-py3k-mingw-ntthreads-vs-pthreads.patch \ - 0530-mingw-system-libffi.patch \ - 0555-msys-mingw-prefer-unix-sep-if-MSYSTEM.patch \ - 0560-mingw-use-posix-getpath.patch \ - 0565-mingw-add-ModuleFileName-dir-to-PATH.patch \ - 0570-mingw-add-BUILDIN_WIN32_MODULEs-time-msvcrt.patch - - apply_patch_with_msg \ - 0610-msys-cygwin-semi-native-build-sysconfig.patch \ - 0620-mingw-sysconfig-like-posix.patch \ - 0630-mingw-_winapi_as_builtin_for_Popen_in_cygwinccompiler.patch \ - 0640-mingw-x86_64-size_t-format-specifier-pid_t.patch \ - 0650-cross-dont-add-multiarch-paths-if-cross-compiling.patch \ - 0660-mingw-use-backslashes-in-compileall-py.patch \ - 0670-msys-convert_path-fix-and-root-hack.patch \ - 0690-allow-static-tcltk.patch - - apply_patch_with_msg \ - 0720-mingw-pdcurses_ISPAD.patch \ - 0740-grammar-fixes.patch \ - 0750-builddir-fixes.patch \ - 0760-msys-monkeypatch-os-system-via-sh-exe.patch \ - 0770-msys-replace-slashes-used-in-io-redirection.patch \ - 0800-mingw-install-layout-as-posix.patch \ - 0810-remove_path_max.default.patch \ - 0820-dont-link-with-gettext.patch \ - 0830-ctypes-python-dll.patch \ - 0840-gdbm-module-includes.patch \ - 0850-use-gnu_printf-in-format.patch \ - 0870-mingw-fix-ssl-dont-use-enum_certificates.patch \ - 0890-mingw-build-optimized-ext.patch \ - 0900-cygwinccompiler-dont-strip-modules-if-pydebug.patch \ - 0910-fix-using-dllhandle-and-winver-mingw.patch \ - 0920-mingw-add-LIBPL-to-library-dirs.patch \ - 0970-Add-AMD64-to-sys-config-so-msvccompiler-get_build_version-works.patch \ - 0990-MINGW-link-with-additional-library.patch \ - 1010-install-msilib.patch \ - 1060-dont-include-system-ncurses-path.patch - - plain "New patches added for the update from 3.5.3 to 3.6.1" - apply_patch_with_msg \ - 1620-fix-signal-module-build.patch \ - 1630-build-winconsoleio.patch \ - 1650-expose-sem_unlink.patch - - # Extend some isatty calls to check for mintty when checking for - # a terminal output. - # https://github.com/Alexpux/MINGW-packages/issues/2645 - apply_patch_with_msg \ - 1700-cygpty-isatty.patch - - # gdbm is broken and as a result breaks dbm/shelve. - # Don't include it so the dbm.dumb backend is used instead, - # like with the official CPython build. - apply_patch_with_msg \ - 1701-disable-broken-gdbm-module.patch - - # https://github.com/Alexpux/MINGW-packages/issues/3139 - apply_patch_with_msg \ - 1800-link-win-resource-files-and-build-pythonw.patch - - apply_patch_with_msg \ - 1810-3.7-mpdec-mingw.patch \ - 1850-disable-readline.patch \ - 1860-fix-isselectable.patch \ - 1870-use-_wcsnicmp-instead-wcsncasecmp.patch \ - 1890-_xxsubinterpretersmodule.patch - - # https://github.com/msys2/MINGW-packages/issues/5184 - apply_patch_with_msg 2010-configure-have-inet-pton.patch - - # https://github.com/msys2/MINGW-packages/issues/5155 - apply_patch_with_msg 2030-fix-msvc9-import.patch - - # https://github.com/msys2/MINGW-packages/issues/5001 - apply_patch_with_msg 2051-set-venv-activate-path-unix.patch - apply_patch_with_msg 2052-venv-creation-fixes.patch - - apply_patch_with_msg 2060-pass-gen-profile-ldflags.patch - - apply_patch_with_msg 2070-distutils-add-windmc-to-cygwinccompiler.patch - apply_patch_with_msg 2080-pkg-config-windows-must-link-ext-with-python-lib.patch - - # https://github.com/msys2/MINGW-packages/issues/6035 - apply_patch_with_msg 3000-importlib-bootstrap-path-sep.patch - apply_patch_with_msg 3001-pathlib-path-sep.patch - - apply_patch_with_msg 5000-warnings-fixes.patch - - apply_patch_with_msg 3011-fix-build-testinternalcapi.patch - - apply_patch_with_msg 3020-extend-MS_WINDOWS-flag.patch - - apply_patch_with_msg 4000-clang-arm64.patch - + apply_patch_with_msg 0001-make-_sysconfigdata.py-relocatable.patch \ + 0002-restore-setup-config.patch \ + 0003-MINGW-BASE-use-NT-thread-model.patch \ + 0004-MINGW-translate-gcc-internal-defines-to-python-platf.patch \ + 0005-MINGW-configure-MACHDEP-and-platform-for-build.patch \ + 0006-MINGW-preset-configure-defaults.patch \ + 0007-MINGW-configure-largefile-support-for-windows-builds.patch \ + 0008-MINGW-add-srcdir-PC-to-CPPFLAGS.patch \ + 0009-MINGW-init-system-calls.patch \ + 0010-MINGW-build-in-windows-modules-winreg.patch \ + 0011-MINGW-determine-if-pwdmodule-should-be-used.patch \ + 0012-MINGW-compiler-customize-mingw-cygwin-compilers.patch \ + 0013-MINGW-compiler-enable-new-dtags.patch \ + 0014-issue6672-v2-Add-Mingw-recognition-to-pyport.h-to-al.patch \ + 0015-MINGW-configure-for-shared-build.patch \ + 0016-MINGW-dynamic-loading-support.patch \ + 0017-MINGW-ignore-main-program-for-frozen-scripts.patch \ + 0018-MINGW-setup-_multiprocessing-module.patch \ + 0019-MINGW-setup-select-module.patch \ + 0020-MINGW-setup-_ctypes-module-with-system-libffi.patch \ + 0021-MINGW-defect-winsock2-and-setup-_socket-module.patch \ + 0022-MINGW-exclude-unix-only-modules.patch \ + 0023-MINGW-setup-msvcrt-and-_winapi-modules.patch \ + 0024-MINGW-build-extensions-with-GCC.patch \ + 0025-MINGW-use-Mingw32CCompiler-as-default-compiler-for-m.patch \ + 0026-MINGW-find-import-library.patch \ + 0027-MINGW-setup-_ssl-module.patch \ + 0028-MINGW-generalization-of-posix-build-in-sysconfig.py.patch \ + 0029-MINGW-support-stdcall-without-underscore.patch \ + 0030-use-replace-instead-rename-to-avoid-failure-on-windo.patch \ + 0031-MINGW-avoid-circular-dependency-from-time-module-dur.patch \ + 0032-MINGW-generalization-of-posix-build-in-distutils-sys.patch \ + 0033-MINGW-customize-site.patch \ + 0034-add-python-config-sh.patch \ + 0035-cross-darwin-feature.patch \ + 0036-py3k-mingw-ntthreads-vs-pthreads.patch \ + 0037-mingw-system-libffi.patch \ + 0038-msys-mingw-prefer-unix-sep-if-MSYSTEM.patch \ + 0039-mingw-use-posix-getpath.patch \ + 0040-mingw-add-ModuleFileName-dir-to-PATH.patch \ + 0041-mingw-add-BUILDIN_WIN32_MODULEs-time-msvcrt.patch \ + 0042-msys-cygwin-semi-native-build-sysconfig.patch \ + 0043-mingw-sysconfig-like-posix.patch \ + 0044-mingw-_winapi_as_builtin_for_Popen_in_cygwinccompile.patch \ + 0045-cross-dont-add-multiarch-paths-if-cross-compiling.patch \ + 0046-mingw-use-backslashes-in-compileall-py.patch \ + 0047-msys-convert_path-fix-and-root-hack.patch \ + 0048-allow-static-tcltk.patch \ + 0049-mingw-pdcurses_ISPAD.patch \ + 0050-grammar-fixes.patch \ + 0051-builddir-fixes.patch \ + 0052-msys-monkeypatch-os-system-via-sh-exe.patch \ + 0053-msys-replace-slashes-used-in-io-redirection.patch \ + 0054-mingw-install-layout-as-posix.patch \ + 0055-remove_path_max.default.patch \ + 0056-dont-link-with-gettext.patch \ + 0057-ctypes-python-dll.patch \ + 0058-gdbm-module-includes.patch \ + 0059-use-gnu_printf-in-format.patch \ + 0060-mingw-fix-ssl-dont-use-enum_certificates.patch \ + 0061-mingw-build-optimized-ext.patch \ + 0062-cygwinccompiler-dont-strip-modules-if-pydebug.patch \ + 0063-fix-using-dllhandle-and-winver-mingw.patch \ + 0064-mingw-add-LIBPL-to-library-dirs.patch \ + 0065-Add-AMD64-to-sys-config-so-msvccompiler-get_build_ve.patch \ + 0066-MINGW-link-with-additional-library.patch \ + 0067-install-msilib.patch \ + 0068-dont-include-system-ncurses-path.patch \ + 0069-fix-signal-module-build.patch \ + 0070-build-winconsoleio.patch \ + 0071-expose-sem_unlink.patch \ + 0072-cygpty-isatty.patch \ + 0073-disable-broken-gdbm-module.patch \ + 0074-link-win-resource-files-and-build-pythonw.patch \ + 0075-3.7-mpdec-mingw.patch \ + 0076-disable-readline.patch \ + 0077-fix-isselectable.patch \ + 0078-use-_wcsnicmp-instead-wcsncasecmp.patch \ + 0079-_xxsubinterpretersmodule.patch \ + 0080-sqlite3-module-defines.patch \ + 0081-configure-have-inet-pton.patch \ + 0082-fix-msvc9-import.patch \ + 0083-set-venv-activate-path-unix.patch \ + 0084-venv-creation-fixes.patch \ + 0085-pass-gen-profile-ldflags.patch \ + 0086-distutils-add-windmc-to-cygwinccompiler.patch \ + 0087-pkg-config-windows-must-link-ext-with-python-lib.patch \ + 0088-importlib-bootstrap-path-sep.patch \ + 0089-pathlib-path-sep.patch \ + 0090-warnings-fixes.patch \ + 0091-fix-build-testinternalcapi.patch \ + 0092-extend-MS_WINDOWS-flag.patch \ + 0093-clang-arm64.patch \ + 0094-MINGW-stack-reserve.patch \ + 0095-Add-support-for-Windows-7-Python-3.9.patch \ + 0097-Don-t-use-os.pathsep-to-find-EOF.patch \ + 0098-Fix-extension-suffix-for-c-extensions-on-mingw.patch \ + 0099-Change-the-get_platform-method-in-sysconfig-and-dist.patch \ + 0103-squash-Fixup-.rc-handling.patch \ + 0104-squash-Set-MS_DLL_ID.patch \ + 0107-squash-fix-srcdir-builddir.patch + autoreconf -vfi } @@ -323,10 +281,6 @@ check() { build() { local PREFIX_WIN=$(cygpath -wm ${MINGW_PREFIX}) - if [[ $MINGW_PACKAGE_PREFIX == *-clang-* ]]; then - export CC=clang CXX=clang++ - fi - CFLAGS+=" -fwrapv -D__USE_MINGW_ANSI_STDIO=1 -D_WIN32_WINNT=0x0601" CXXFLAGS+=" -fwrapv -D__USE_MINGW_ANSI_STDIO=1 -D_WIN32_WINNT=0x0601" CPPFLAGS+=" -I${PREFIX_WIN}/include/ncurses " @@ -336,7 +290,8 @@ build() { CFLAGS+=" -DNDEBUG " CXXFLAGS+=" -DNDEBUG " _extra_config+=("--enable-optimizations") - _extra_config+=("--with-lto") + # FIXME: https://github.com/msys2-contrib/cpython-mingw/issues/10 + # _extra_config+=("--with-lto") else CFLAGS+=" -O0 -ggdb" CXXFLAGS+=" -O0 -ggdb" @@ -407,10 +362,11 @@ package() { # import python_gdb # reload(python_gdb) # end - [[ -d "${pkgdir}${MINGW_PREFIX}"/share/gdb/python3/ ]] || mkdir -p "${pkgdir}${MINGW_PREFIX}"/share/gdb/python3/ - cp -f python.exe-gdb.py "${pkgdir}${MINGW_PREFIX}"/share/gdb/python3/python_gdb.py + if [[ "${_primary_python}" == "yes" ]]; then + [[ -d "${pkgdir}${MINGW_PREFIX}"/share/gdb/python3/ ]] || mkdir -p "${pkgdir}${MINGW_PREFIX}"/share/gdb/python3/ + cp -f python.exe-gdb.py "${pkgdir}${MINGW_PREFIX}"/share/gdb/python3/python_gdb.py + fi - rm "${pkgdir}${MINGW_PREFIX}"/bin/2to3 cp -f "${pkgdir}${MINGW_PREFIX}"/lib/python${_pybasever}/config-${VERABI}/libpython${VERABI}.dll.a "${pkgdir}${MINGW_PREFIX}"/lib/libpython${VERABI}.dll.a # Need for building boost python module @@ -428,17 +384,28 @@ package() { # clean-up reference to build directory sed -i "s#${srcdir}/Python-${pkgver}:##" "${pkgdir}${MINGW_PREFIX}"/lib/python${_pybasever}/config-${VERABI}/Makefile - for fscripts in 2to3-${_pybasever} idle3 idle${_pybasever} pydoc3 pydoc${_pybasever}; do + for fscripts in 2to3 2to3-${_pybasever} idle3 idle${_pybasever} pydoc3 pydoc${_pybasever}; do sed -i "s|$(cygpath -w ${MINGW_PREFIX} | sed 's|\\|\\\\|g')/bin/python${_pybasever}.exe|/usr/bin/env python${_pybasever}.exe|g" "${pkgdir}${MINGW_PREFIX}"/bin/${fscripts} done - # Default names are aliases for Python now - cp "${pkgdir}${MINGW_PREFIX}"/bin/python3.exe "${pkgdir}${MINGW_PREFIX}"/bin/python.exe - cp "${pkgdir}${MINGW_PREFIX}"/bin/python3w.exe "${pkgdir}${MINGW_PREFIX}"/bin/pythonw.exe - cp "${pkgdir}${MINGW_PREFIX}"/bin/python3-config "${pkgdir}${MINGW_PREFIX}"/bin/python-config - cp "${pkgdir}${MINGW_PREFIX}"/bin/idle3 "${pkgdir}${MINGW_PREFIX}"/bin/idle - cp "${pkgdir}${MINGW_PREFIX}"/bin/pydoc3 "${pkgdir}${MINGW_PREFIX}"/bin/pydoc - cp "${pkgdir}${MINGW_PREFIX}"/bin/2to3-${_pybasever} "${pkgdir}${MINGW_PREFIX}"/bin/2to3 + if [[ "${_primary_python}" == "yes" ]]; then + # Default names are aliases for Python now + cp "${pkgdir}${MINGW_PREFIX}"/bin/python3.exe "${pkgdir}${MINGW_PREFIX}"/bin/python.exe + cp "${pkgdir}${MINGW_PREFIX}"/bin/python3w.exe "${pkgdir}${MINGW_PREFIX}"/bin/pythonw.exe + cp "${pkgdir}${MINGW_PREFIX}"/bin/python3-config "${pkgdir}${MINGW_PREFIX}"/bin/python-config + cp "${pkgdir}${MINGW_PREFIX}"/bin/idle3 "${pkgdir}${MINGW_PREFIX}"/bin/idle + cp "${pkgdir}${MINGW_PREFIX}"/bin/pydoc3 "${pkgdir}${MINGW_PREFIX}"/bin/pydoc + else + rm "${pkgdir}${MINGW_PREFIX}"/bin/python3.exe + rm "${pkgdir}${MINGW_PREFIX}"/bin/python3w.exe + rm "${pkgdir}${MINGW_PREFIX}"/bin/python3-config + rm "${pkgdir}${MINGW_PREFIX}"/bin/idle3 + rm "${pkgdir}${MINGW_PREFIX}"/bin/pydoc3 + rm "${pkgdir}${MINGW_PREFIX}"/bin/2to3 + rm "${pkgdir}${MINGW_PREFIX}"/lib/pkgconfig/python3-embed.pc + rm "${pkgdir}${MINGW_PREFIX}"/lib/pkgconfig/python3.pc + rm "${pkgdir}${MINGW_PREFIX}"/share/man/man1/python3.1 + fi sed -i "s|#!${pkgdir}${MINGW_PREFIX}/bin/python${VERABI}.exe|#!/usr/bin/env python${_pybasever}.exe|" "${pkgdir}${MINGW_PREFIX}"/lib/python${_pybasever}/config-${VERABI}/python-config.py @@ -447,9 +414,12 @@ package() { # Fix up two instances of MSYS2 paths in python-config.sh in-case the final consumer of the results are native executables. sed -e "s|${MINGW_PREFIX}|${PREFIX_WIN}|" \ - -i "${pkgdir}${MINGW_PREFIX}"/bin/python${VERABI}-config \ - -i "${pkgdir}${MINGW_PREFIX}"/bin/python3-config \ - -i "${pkgdir}${MINGW_PREFIX}"/bin/python-config + -i "${pkgdir}${MINGW_PREFIX}"/bin/python${VERABI}-config + if [[ "${_primary_python}" == "yes" ]]; then + sed -e "s|${MINGW_PREFIX}|${PREFIX_WIN}|" \ + -i "${pkgdir}${MINGW_PREFIX}"/bin/python3-config \ + -i "${pkgdir}${MINGW_PREFIX}"/bin/python-config + fi # replace paths in sysconfig sed -i "s|${pkgdir}${MINGW_PREFIX}|${MINGW_PREFIX}|g" \ @@ -462,99 +432,106 @@ package() { cp venvwlauncher.exe "${pkgdir}${MINGW_PREFIX}"/lib/python${_pybasever}/venv/scripts/nt/pythonw.exe } -sha256sums=('5e391f3ec45da2954419cab0beaefd8be38895ea5ce33577c3ec14940c4b9572' - '0ee1acf745d38d41fd098487b9595705fd8f6666d7b154d54ddba32d14f1253b' - '0d27f52bc514dbf2b730f62fa6c18c797a2f4cbad8698d95b15e2774d68e483d' - 'd2d73d9fb9db48fecb3a6856e4606f444eaac7637fd4f65e192701e53ac422eb' - 'abed03b63e0b498804b44d1cdf8b1ff0c3c4329d3ea9c0323b2512adcacb9b57' - 'c2fb01aacfc5d96bdb69ef37282f300ecd8bfa3e11921caa1fce8e871f5a31f8' - '6446e0a5255d317d93c5c55094d4c797cf68fbd14bb08d38c94d7080837d1380' - '8e90c38ac27316781f8853fcbce300526d92732edf4cd08d1dc2a0438fd2d694' - '36f6e8b4320ee79b6ff7e84aefec3aec57293bcbacf08ea7847f3147d459b4a9' - '0a6a1ee72f3aa050f1ff0b8ff88845189309163ef1a5f70808f1ab351348cdae' - '56bdf305a3786ae50871045373e89f2e20df3055e1033197f122ee2c6c8b0966' - '910c84eb01cfe2207ee7fd8549247d9498be8b58c4dbbb6eaa2118037e77730e' - 'da5057e58a4866e20c3c604153febb2b57a089d327a954ee5b51830af8204e17' - '265a3c99923b76210e0401bc0cafa88b99328343aec43d64aa94cb84fcdda6d8' - '4f1db216d6a2dad137b07ccdd4b2d71c37169083706addf90c3b0b850312632a' - 'f07fc8cc9030c2adf9d7c301eadb8b182aad7f1f2cde102cce730f51a093bbdd' - '9f05613753a8b4ad8c5a6b32c257a318e9ff416345f4ebef3e69f56cf9a51578' - '9269a4d4dab6a0e93b8a0b5ed84c3e93bdfbaf99148e467daf993f6f767c8d45' - '1e89597d37838ad7c18463b83476b3cc6bec1480a052e757b9fbfb3264d4d890' - '03891c0fe4ad90a9926c0e04dc7bb0efbf0022cd6d7746cf2d173dbd739f6142' - '3b85b18922d21e8fc6e07a12e1c8d79c7ec271dddb75ed0fb4f44148b030b360' - '6d0119cd216b944927254598cfec1b85757000ab39f5ba987a86ed2216d6351b' - 'ee3f515a3e4060b08b106d788039aa0abfb0424fdf09b613dbab06256405b7ef' - '9c6e64ba27d72e912be3486a0cc65d9f59f5d7ba71fb634fef0860a00311d12c' - '3842234d2c3aeece0416a670c789801ef76ce31841a9c1bfcbb26340aa346712' - '194ef359356d4d58bb15bafe8738c0586350d26e85cc39f5db833f428d67b41d' - 'ce63ec2ec57db5fcfae332f8bb413d6c2f8888d29e449b8ae674cbcbe01a5f95' - 'f7729d39c8eadce379b2b21cd253c604bfe3e4293945b4d6def9bf0c9b3c8f4f' - '7bd7cac5cc9424b934ae31e6aebf7a960fca8d6ac82778f107a4b16a4e7865c8' - '85ec670b8c0a8fc7a5dcafc19aa697d358c5bfe67cb3d7e17ec8070d4edb16f3' - '4804d854bb9fb3e6ff11c23e420b6ff34266bbc93ce33115129bf838171d49ee' - 'a26997445938dd01a03a16a622d19adbc270e679df195407436c97246c96f99a' - '269fc7d93aeefc286009612604385ac2ec1d0304b97c858ffe123c282be8d94c' - '17341d1d4f654f8fbaea905dcf0f4091c66eefa6725b592632413fc77498b6c3' - '47613ba1b262d7c3dbe96ecff5543d0923ad874eec7aa7451e17b0b414691f83' - '1b3a27ea33b66efe3131dcb9951030aa7d4c18f9ec851e89a4582b69f8e673e7' - '90719b6f11be4be6e6df37a9699d87da9f5200090baf0276f0d6aeb717b9e06c' - '840cbf8fafa2cc230dd8a9f667dbad80d54ad573f929f9970252722b9183688b' - 'fbae2e8121a027713ce9cf2197b4d702f512e65d028a2a71d4229a4c70f8410d' - '95cf0d30ad7f0f171da79187f1564b8b2796e9d76551cfb442c26ae4d9f1aafe' - '6b37b7d4ecd269abcf92ada988d4be48e0fee1473d6a2cc7d6562812c579095d' - '4bb617a956b783edfb1a4246580172c4f9eb2728ff14730618854a3be7840dad' - '65aff7e831f3bb4b37ed5d4db5dfa75ab6bd582d132dd197e658ccb699dbfac7' - 'f2a7b6dce11311e3d318d5729258935a520dcb7ce4dc879ecb1738a2f8bfe434' - '0a81aa7fd5fa0b511fda81ce3345f3199d3be1c83fc660f7f365ef4ede88f3f7' - '27122f9db1be8b1efbccd6ab263313aa66c97dfcd0acb9499434a1fa4ecbb2bd' - '0c93d28bec11968da47b300fe8049d7e32c07c27ccde36ce5f1701306f3cbaf5' - 'cef46c7e1afcaf9b6bacf723d5ae22f3f42045eb93bbd9bf5d2b1dba7638028a' - '819bd305734a8fe190afdd399e6158c041c5b9912b436375b2d8dc520f7376ba' - 'f33d70071a232a2a3930aa0a2b3f032ef6a17e07acc7412000ceb25bdd339ade' - '5c56aa13fd3f18bd4b327d8cd540ff7fd9e0145e6358d6330103938655d3dfd7' - 'ca3eea7fac20d160d9aa3a8e17c0b9ab169cfe16a685f78d2c4d1fd52f8f6784' - '7f2b4c0fcf4a78b983ae3c3a57c47748470370aa4bf17ea9b3ad53802d201afd' - 'a55bd3b222d08dc6bb68d4e30ec3e544b303d93330131a310f3a2e20ca93f4b9' - '2b4e223aed8ec9df431806c54bd3df923dbd34805e311006aba3f62682eeca56' - '882d3ac8739184368a30991843db8581e3fd1aee639ddc110ac8cd9e8a89ea1f' - '5d1a85e93b4c7626aa2cfa68201c2d93574647ab6ef0679d3ff4b4cc5c2ba042' - 'd06065357943599d515b7ea081da99981b68c4c6a9a5e6bb5e0f1019fea80104' - 'b323e44874873591b763b1926cac00d354323d32ff06941eefa415dbdb643cfb' - '26fe3548c0e3997aa09077a5f4d1b4152c98c6c6e7ed64e26557704cc4758f73' - '2b33a669fc281b69d6d3683402ea8d83a86f6bf625a14944d0ac553f414688d3' - '86223efa8b47df1aec5bdecbe5321b29cfbba46e49bf268cf2d646423d8990c2' - 'd817ee8eeb04450de6c313db4cde76cca92236e14b60fb0fdb30014250b76fdb' - 'a8d7416f819963fb7d2e6800d51d27f5fdc74d804d2b559528eb6867c9e3b88a' - 'a492d1366f130122e4e54bee722b65a3d8a2afb30768026e2922edec0d11c9e4' - '16ab24a074e2e06e6cee4bc06373b2b71e5d7990b71f60fa613a6e9bf55d6c12' - '3245dc7c2e65e15c981b5a9c6372210dae582e7c7dfee632ec92a40868f3a63b' - '168172f22ea13879b958179fee20d0b2d78136bc755501f108840a14a0b521f6' - '5f6de8a7646cf755df9f8666346dbcff1005b5165b7b9aea75921344b3eceee6' - '84d2457f89057d1f4c48cfe85a1fe4f397eaa6a4f2dd0bad36beccf9dfdb5819' - '8fe0d9cb7b36faa27d2bb41661f4f9ea0298901d261c5daf702e29e97e46bd4c' - '7e2652a26a8e7198b9b6fd2bfd476c514362f347ba75b1dd014faac443266fd7' - '8ea5b335b10bfb4e492646902db043aee06c953941b3eca7fe24603a3238abf8' - 'a9977459a8e6c31f1643da7ede6ac7199dee96559d74188f5c9d3799787ac4fa' - '7bab1dfb1d5b288e3270a61f9b1892c151f1dd1f8e32c07ae6adc37ef14844bb' - '551047905350e113384f99e0e929e9381dc0a4ed514ca4ebe279dcdad798edce' - 'afafaa920fee0bb11fb246b37956c71c0e68dadaf09e27ebdcd7097dd2c0f0ef' - 'fc6164a90f0ca2a9341aaf4448b4334c3393459ca5cbad6d7149f8bcf70da5fe' - '181672743d9e2449064a1b18764fa400af5d3cd268098e7b7e5069d0b128caa2' - '6f2032347bb40e2ebe9b3a03062147ffa2f656d47c87821623c3b7d46dc15ddb' - 'c4670070e546317295071350872e1a00918fd3284609620f84beb44ed54c1ebd' - '17bf1ea04f476ee66555bc4386ffbebfe6be6f75e67947b7f85511241ac46407' - '0ded9e2792b95902d898aba91020103875f2987a9566b353f3e6988b08848f4a' - 'd3a0669c83e4df5d33606b4c3443d2c6c71b76cb4f6421d6d54ee630023be6c2' - 'a7fbf65a86889f95138360ca4dbd4e51de2e214384ee39740d9c6c381ff997d9' - 'ac0400fd7c9ceada1356fe4b7eae3892f35652f09f488b31fd011e0642d373a3' - '6f1a48380445406709ba5c6b4b9c6f0301ea645324feb429f3719dc29b8f28ff' - 'b2f4083ada35c18876edf38220d84ca757cf710bc5c2d80ee8b5083dc6c2609f' - '487c92837717975ad6c63fe2a1f8e8c5c9e0554e96000102d83c82f4a77fd9bd' - 'f6ecf2edc9468210111d77e396853af49cb8a43d9bc0d20212f88cf2bc33685d' - '6efc39323d14239f2a55576a8b3f32cb79eeefdd5881ba813493c14be2939f3c' - '005381222cfef42ccc21151845b6d43d25c861f35c2192e5e23c2a14df7938f0' - 'b6b3f8f2c809dc7ef43bc26306516edf4a5d1e038343ad8c7a45f666011c2e8b' - '717167e9ca5563e04103871a3e489dd1cef77a83c5c6d20e7bda6dced7f3fc42' - '24151631c3e70306ae92ffb8fea38992a752cd0a76771a5e53445f56c2be1f00' - '7188e017a1efba4a87cb64a38b63ed2d8a469e2e74c3fd35b6538d5bc6e370e5') +sha256sums=('397920af33efc5b97f2e0b57e91923512ef89fc5b3c1d21dbfc8c4828ce0108a' + '7188e017a1efba4a87cb64a38b63ed2d8a469e2e74c3fd35b6538d5bc6e370e5' + '621cbe4120c2f83c39eff9c03aba62b4240c657aaacff6c6063968e597a94f88' + '382f4d6b59da0e3c0ccea985864bd0e1389d97bd6517f068f175a624615f192d' + '36a13e324c8d4001f60799b60e87255db4f5ae9f2a04c2396b2a154fa8c7eb4c' + 'a3aeeeafbeaf8fd0f0884a29e4066e5ce2af0f8d4945b51e420dfdaa4dbfe4b9' + '852be8186f71c46b7f7907a8cef3fd1936f3a288ffeeedba843d73cd2e65caaf' + 'db5a158f9545d554dfad95290aae15fc71f03550c3594e1dabdbc0cfbb0ced29' + 'a8a6eb37672dbe4cfcd6df4ccd755217ee5e433b36b67591a407edcbb262c0eb' + '380a25c2b7cfafb1b9ddff91a94ba8eb7db00fb6a37c5f6bdb1e12ffbdcf2076' + '354b523f924dd066520f6df3f61fb752a7bdfe63b6422d32cb3b860445040878' + 'ac85eca34438d4e38f195da6614663a10e7f3f659e5c9879670a1e9a46a8a1c1' + 'fa0010a847b7156b07aadc7fe976b675d8913df0fa4efdfe5a148a529ff41ec1' + '0581eeba3aab8d851a1af2bf7ac29479d36adf19f7db7f0210d6d5e3ca22b9d8' + 'ff8375e55445678ab17a3d1dff62908dd22d15609160acb670e0fe67198736ee' + 'effc7117a72e0f3cadce63135f18ad513516880e3a6b8121037f6dbfddfc1e46' + '8f515fc87a457462c2d412326907c58dbc4253de95630718c4d56610db24a6de' + '3f833597807e08a85ca5e1fc26a2872f1127a01bfe2336c85f2c78cc547f40c3' + 'e2e9b0439a0e6c9a054c2f35c8f454ec2a4100e7bca9505ea94cd1011dfe7ee3' + '4f4d34bf0b1d3a979988d1dab3cc34d43d267c3b1b3ea1debf3358424302752d' + '02d3058ffe6439033055834f1452edebca5df686d38c2d48bc62f290b11de1a9' + '5185d0763ac3ff351d86b4403421ba8bbb9dac477ceb2816054caf4eb62873a5' + '86e39c652691e6dac338d617d262d0413f7468d74d12305cf8a12806f5e07b5e' + 'e28cfe596fa3087172b00fcdc1f313e1050f97b433a6b4f322a291866b80fc95' + 'fce14bcae4019a1d82b66cf18ad80e2c131eafcb585c1e70843b1f2a7b46a059' + '91499de0d6b5541aae4b544a84af4f85ce25d8bea030dd61cff0f5af2950e26e' + '67e10d47d4fd13b6ca691e9e04aa73a230a7df95318251e232455f8ab5c1eec4' + 'dae01ea768c270bf7e04f909000156d785881116dd05c48f2d6c5c64992943af' + 'f6214537de4f5ab1bc1c9c287bcd9f4108f6bf444b8930a985759753a96241e6' + 'd332fa50c6b6de4cba8b849c18687a420da1448cfc1bbdaafa8e724976fc0ee0' + '8363c5a8baf8dbde51c94413cffc1f9b6da3e3881c98995b30f9264cbf587845' + '5df74f664abbba7302642b7a9791ce891a1a00df2848cb0ac243cf61ca2617dd' + '339d65c6309431bd871810be26eb28ac84468b0dc287d443a40e5116ea7e45c7' + '1e5d15016f9866db88bf0efebe2cabef93955a6a9c54efe254e2219a9938bcba' + '9e3c9dcecb70a1394c2d2ed36ac2161014f95456a7a28fb206ebe14d6e944e28' + '516327a3e0dddd923c20a23dffbfafbad83d9ae782477eb36650a14526e0237f' + '008613913e1d861093ffe980999c1999da8c415f6d6e1f2a630ad872e018048b' + '6a0798d4f3a832bd0a09a22896b59fa4bc69638d99230d81ff3bc45ff16cde82' + '6346ca038c76011ade842ed2fe629897cc53ee7c2517ede0a300d7c8bab13ab0' + 'cd2614a5d8fef3132e08a0037ba66eeec9acfab386df086de8637e39bbd93cef' + '5a7d072a9b3c731818288ee0fe51fdabe5dc257b885eeb5fac6f200bbfc8a63a' + 'a155c770a98ee6bb96cfa0a6f9a5ddb4dce993ea818b83532d90cf57b1615c09' + '4915b4b4ff6c293426671d6bc91c174cc2b2cd7d3d1099a67e9cfe53cd7320b9' + '0d3061a67c8ed855ec78c01f682c12632e36e473d42c3e7008f999dc13bbc5b0' + 'e0c2d8aaa24425aa9f1cfd576d8f0a67d2e39c7108edadc7f322f618cdf9f97e' + '18f30eea4c1efb0f2c7f608a7daa7491c021c15476a1df2323a4f48849b6f77d' + '8ce17fdb9665dcd384744527a1eb155e1d1ff137a0a2a75d275dca0230830645' + '8b34737a4018920ecd31ee40d3a0db1545478258e58028061935e50024ee6b6c' + 'e4060c8d2158d3b2dcf7f8c79eca7490d23ef4897fa8a24388321f77c340fd88' + 'd47c18f14276c6151176c9c7f0780d334a582adcf4b6c71145f328377960bb94' + '25002a2be534ef4b4dbcfbc5598832ef4b64aa0ac849c3b44d796b49e10a3906' + 'c6a731c103ef31589296f60b9e220fe70b0113b49696248c4e379bb3b39ddf03' + 'c5ccfdb8f8695f94f23e9ecd0304ec91b5f4f00f9d6f43426ede4e0038479f24' + '58f5f50ce9e8a6dd4b484f174ad174db397ac5b2b248b56db65acae2122ed805' + '077ce1a4e5fd69de839c5f1bfb24a3bb5d2d548fb4a51250097692626d7c5d6b' + '3b1659b05b3353938a84b9a9f23a1add6f0dc38bb1d81e58010651e07c719a95' + '17d44817baccadcfb23289c15ca23f19fa185aa2a7dd12c88524de8d888f3507' + '54031e5b3f02cc4b80ce6b1702d7c33c6e9251136e1410012c7faa861abffe84' + '3741637112ae6fa0bcc15d73e80810b5e5c6986b8e8a4333f8a08c30c5e21ddb' + '11314e843829ef3fd8058434311dd55eeb7dd512ec8730f28c5b8bc6e101a654' + 'b87f41523bbcb61a8076a46a83b61480a2da79b49c3af3d0310aff02fb3eff7d' + '12f619eb1bcc3dc3a05d3ac077d0970860a8b97ecbd95f735fc95436bc910c1d' + '22f256ab9b1f19aa6ad41ef2ef23bcc67b8d9a2fc24315bac39e5eff4a3d5ef0' + '453be8620a5b47567fd750bdc7226baa2a7bae84d280c082ceea6c822c0152d4' + '167fc8fe20a0122fa0a5dfd7adcf343ba71379732bd0f6ade5a958f4c4c07c84' + 'f99bc96d13d181c0e3604b0b6f3405450cb23504739812cd05d12bb4796d6a4d' + '4e1fed573d0b564faad7770fa1a79525864acb02dd3996bbd28813201d80e941' + 'dcbf48794825acdcfc00e08ae358f2dc51dc8dfde8fc3cf7e304c570b8c477d2' + '3a9876035372157298f0b340c86806a43c193c09a1f732cb116262a8baa6658b' + '4446250eb39ed7afd9d0c79da92f15586bf8dc8c2ba9dec2edaa5d92136e95e6' + '385935abdaedf42ae27e21e895707471a3171a73310d0b97218823d13a1cff52' + '2b890e0612c9aaa0243b3cc86219b47c8f6823af2c57d8f3f100dcc5f664d13e' + '02b98c859ffc4c0d47667e7fa4579699249eb9052b8a985d051630c33d2304ff' + '92c3ed2cbcc0c9bd28a0b669ec68e445be7c5245201bda1c06172712c54d1a17' + '72e51a8f9374766b9afc452a5fbf7646390e89d1ae9f1ec158e22aac6dedf1db' + '5891a8c56eb49b1a9d2c22ee895821c34086a341b4a7e7e57b9e78196dc346a4' + 'e02409488b5cbd9157b6c80abd78ea2972e49092949e902811dabbf56f3f6d0c' + 'adba48cb1daf77542162e4da61caf498c83b2de5abbc5545f68a8ac290fe7b4a' + 'bf1960038604a3ad0ab11bc47007f8d7a97941c3b7f44d4487e2d79d742ca870' + '836723f0d3ec3d10b5ddabd09f7dddc76eefa261b6105b544f9dae7f4416146e' + 'b64e7a874532fe0475d4b3c192fb215948c06392a7ad04fd47a28289cc809967' + 'b49ab150e95bd390101225ba6ac3983df2a5a0bbc47d506a88c9caeefbd4ed3f' + '79f1646fa548a9da9986ded4a51842751cdea7ec579d28e6cc5d86e4a5a89f27' + '233318923f5fd7dd4605c79bb2adfbcdd2e8cc7e242b1e080e59aed1f6b86a29' + 'ceba0f6e583570db571ee9c3fe64b74ea58a474d114847cadd3ad70386c7c199' + 'fb3bee9ba5e4f9b2e8b7e8ec2fb08e12d85542bae8b86e7a4c69f698f720253b' + 'b01320b3c9037bb1fed03c7b8002e7b6af52fc7bb85cdf84cfc96842c7c9657d' + 'e3c10b3eb07b41e804b6a500c848def6f72cb04d94d00657dab307e68e891536' + '5e8113ca39795b59a0144b68db88a197c43c3b907c3f7bf2a5e1c1dd3a41b19c' + '4130af022a9ec1717cac82e3d3d5a7144a9c17611ac4db5150f8adede4ed3276' + '24e9029d664255a96c0346f7e53316640be6a6480bd77fcd7532a2b88881b485' + '754d84bc288da89cdec4b1cf5d216195aaa2f3d4046043d8b487bdd2f5a4c837' + '2d6ce50423f65dded048f64eb0dafe62448ad4786add9295d90fcfa6f316412a' + 'b3ba2ac22cd4263419f3daf93334745bccd1c70c429812c95821ed1e2d649159' + 'a74c4203ccc6f858fa9ee2c203cad1bf5de2bd868650d18c65034897e29e2b5d' + 'fe6bb4725238cbd00b856ed757392bdd2f0e7adb5216ee7738654b7a74594810' + '6fcc769d47e71afd496eef16a6c77d0e1eff983a20b16a7fadb6f4cc1c8ee6d7' + '38217179bc520cc35ba03f4f049d06b2bb935d66e5cfb488e5fd08befda3b8e8' + '034a036cbdcbe33bb17a7951658da438ff7047f4f86fe8e5ebac5d84438ed0bd' + '703846000b96d426c50b400f5efbc8c2c877ce7c844f64ecdba86275035577b3' + 'ba079f6735555329997f7bd2e06140a1f4c32bf31e51c7a08f43b6fbf242829e' + '70d2d6d4b0ad50633069f14a13ac7474d97bc6443da51a1f4cdfe50d200c7c97' + '527284880bc4eaf45f657993cbb14b0c9e2355c696bf9da30ffa20fe0a527f72') diff --git a/mingw-w64-python3.9/README.md b/mingw-w64-python/README.md similarity index 100% rename from mingw-w64-python3.9/README.md rename to mingw-w64-python/README.md diff --git a/mingw-w64-python3.9/update-patches.sh b/mingw-w64-python/update-patches.sh similarity index 100% rename from mingw-w64-python3.9/update-patches.sh rename to mingw-w64-python/update-patches.sh diff --git a/mingw-w64-python3.9/0002-restore-setup-config.patch b/mingw-w64-python3.9/0002-restore-setup-config.patch deleted file mode 100644 index c268c922cf..0000000000 --- a/mingw-w64-python3.9/0002-restore-setup-config.patch +++ /dev/null @@ -1,82 +0,0 @@ -From 65c19d285901d1791ae1bc3628550c9c4db948c1 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?=D0=90=D0=BB=D0=B5=D0=BA=D1=81=D0=B5=D0=B9?= - -Date: Thu, 17 Jun 2021 18:51:12 +0530 -Subject: [PATCH 002/N] restore setup config - ---- - Makefile.pre.in | 4 ++++ - Modules/Setup.config.in | 5 +++++ - configure.ac | 4 ++-- - 3 files changed, 11 insertions(+), 2 deletions(-) - create mode 100644 Modules/Setup.config.in - -diff --git a/Makefile.pre.in b/Makefile.pre.in -index 2b68571..f738b3b 100644 ---- a/Makefile.pre.in -+++ b/Makefile.pre.in -@@ -714,10 +714,12 @@ oldsharedmods: $(SHAREDMODS) - Makefile Modules/config.c: Makefile.pre \ - $(srcdir)/Modules/config.c.in \ - $(MAKESETUP) \ -+ Modules/Setup.config \ - $(srcdir)/Modules/Setup \ - Modules/Setup.local - $(SHELL) $(MAKESETUP) -c $(srcdir)/Modules/config.c.in \ - -s Modules \ -+ Modules/Setup.config \ - Modules/Setup.local \ - $(srcdir)/Modules/Setup - @mv config.c Modules -@@ -1669,6 +1671,7 @@ libainstall: @DEF_MAKE_RULE@ python-config - $(INSTALL_DATA) Makefile $(DESTDIR)$(LIBPL)/Makefile - $(INSTALL_DATA) $(srcdir)/Modules/Setup $(DESTDIR)$(LIBPL)/Setup - $(INSTALL_DATA) Modules/Setup.local $(DESTDIR)$(LIBPL)/Setup.local -+ $(INSTALL_DATA) Modules/Setup.config $(DESTDIR)$(LIBPL)/Setup.config - $(INSTALL_DATA) Misc/python.pc $(DESTDIR)$(LIBPC)/python-$(VERSION).pc - $(INSTALL_DATA) Misc/python-embed.pc $(DESTDIR)$(LIBPC)/python-$(VERSION)-embed.pc - $(INSTALL_SCRIPT) $(srcdir)/Modules/makesetup $(DESTDIR)$(LIBPL)/makesetup -@@ -1895,6 +1898,7 @@ distclean: clobber - if test "$$file" != "$(srcdir)/Lib/test/data/README"; then rm "$$file"; fi; \ - done - -rm -f core Makefile Makefile.pre config.status Modules/Setup.local \ -+ Modules/Setup.config \ - Modules/ld_so_aix Modules/python.exp Misc/python.pc \ - Misc/python-embed.pc Misc/python-config.sh - -rm -f python*-gdb.py -diff --git a/Modules/Setup.config.in b/Modules/Setup.config.in -new file mode 100644 -index 0000000..5c1299d ---- /dev/null -+++ b/Modules/Setup.config.in -@@ -0,0 +1,5 @@ -+# This file is transmogrified into Setup.config by config.status. -+ -+# The purpose of this file is to conditionally enable certain modules -+# based on configure-time options. -+ -diff --git a/configure.ac b/configure.ac -index 8fe5fa5..6ae56e1 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -5844,7 +5844,7 @@ AC_DEFINE_UNQUOTED(PY_BUILTIN_HASHLIB_HASHES, "$default_hashlib_hashes") - ]) - - # generate output files --AC_CONFIG_FILES(Makefile.pre Misc/python.pc Misc/python-embed.pc Misc/python-config.sh) -+AC_CONFIG_FILES(Makefile.pre Modules/Setup.config Misc/python.pc Misc/python-embed.pc Misc/python-config.sh) - AC_CONFIG_FILES([Modules/ld_so_aix], [chmod +x Modules/ld_so_aix]) - AC_OUTPUT - -@@ -5856,7 +5856,7 @@ fi - - echo "creating Makefile" >&AS_MESSAGE_FD - $SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \ -- -s Modules \ -+ -s Modules Modules/Setup.config \ - Modules/Setup.local $srcdir/Modules/Setup - mv config.c Modules - --- -2.32.0 - diff --git a/mingw-w64-python3.9/PKGBUILD b/mingw-w64-python3.9/PKGBUILD deleted file mode 100644 index 65512fb827..0000000000 --- a/mingw-w64-python3.9/PKGBUILD +++ /dev/null @@ -1,544 +0,0 @@ -# Maintainer: Alexey Pavlov -# Maintainer: Ray Donnelly -# Contributor: Saul Ibarra Corretge -# Contributor: Frode Solheim - -# TODO :: subprocess.Popen .. specifically list2cmdline in subprocess.py -# needs a fix so it can handle running MSYS2 executables better. -# Arguments should not be quoted in the Windows fashion as-per: -# http://www.daviddeley.com/autohotkey/parameters/parameters.htm -# but instead how Cygwin expects them to be quoted. Checking for -# {cygwin,msys-2.0}.dll in the executable is the only way that I -# can think to do this at present. -# Any double quoted string will cause problems, e.g. -# -DGNOMELOCALEDIR=\"/mingw64/share/locale\" - -_primary_python="no" -_pybasever=3.9 -_realname=python - -if [[ "${_primary_python}" == "yes" ]]; then - pkgbase="mingw-w64-${_realname}" - pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}") - provides=("${MINGW_PACKAGE_PREFIX}-python3=${pkgver}") - conflicts=("${MINGW_PACKAGE_PREFIX}-python3" - "${MINGW_PACKAGE_PREFIX}-python2<2.7.16-7") - replaces=("${MINGW_PACKAGE_PREFIX}-python3") -else - pkgbase="mingw-w64-${_realname}${_pybasever}" - pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}${_pybasever}") -fi -pkgver=${_pybasever}.6 -pkgrel=3 -pkgdesc="A high-level scripting language (mingw-w64)" -arch=('any') -mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64' 'clang32' 'clangarm64') -license=('PSF') -url="https://www.python.org/" -depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs" - "${MINGW_PACKAGE_PREFIX}-expat" - "${MINGW_PACKAGE_PREFIX}-bzip2" - "${MINGW_PACKAGE_PREFIX}-libffi" - "${MINGW_PACKAGE_PREFIX}-mpdecimal" - "${MINGW_PACKAGE_PREFIX}-ncurses" - "${MINGW_PACKAGE_PREFIX}-openssl" - "${MINGW_PACKAGE_PREFIX}-sqlite3" - "${MINGW_PACKAGE_PREFIX}-tcl" - "${MINGW_PACKAGE_PREFIX}-tk" - "${MINGW_PACKAGE_PREFIX}-zlib" - "${MINGW_PACKAGE_PREFIX}-xz") -makedepends=( - "${MINGW_PACKAGE_PREFIX}-gcc" - "${MINGW_PACKAGE_PREFIX}-pkg-config" - "autoconf-archive" -) -options=('makeflags') # 'debug' '!strip') -source=("https://www.python.org/ftp/python/${pkgver%rc?}/Python-${pkgver}.tar.xz" - "smoketests.py" - 0001-make-_sysconfigdata.py-relocatable.patch - 0002-restore-setup-config.patch - 0003-MINGW-BASE-use-NT-thread-model.patch - 0004-MINGW-translate-gcc-internal-defines-to-python-platf.patch - 0005-MINGW-configure-MACHDEP-and-platform-for-build.patch - 0006-MINGW-preset-configure-defaults.patch - 0007-MINGW-configure-largefile-support-for-windows-builds.patch - 0008-MINGW-add-srcdir-PC-to-CPPFLAGS.patch - 0009-MINGW-init-system-calls.patch - 0010-MINGW-build-in-windows-modules-winreg.patch - 0011-MINGW-determine-if-pwdmodule-should-be-used.patch - 0012-MINGW-compiler-customize-mingw-cygwin-compilers.patch - 0013-MINGW-compiler-enable-new-dtags.patch - 0014-issue6672-v2-Add-Mingw-recognition-to-pyport.h-to-al.patch - 0015-MINGW-configure-for-shared-build.patch - 0016-MINGW-dynamic-loading-support.patch - 0017-MINGW-ignore-main-program-for-frozen-scripts.patch - 0018-MINGW-setup-_multiprocessing-module.patch - 0019-MINGW-setup-select-module.patch - 0020-MINGW-setup-_ctypes-module-with-system-libffi.patch - 0021-MINGW-defect-winsock2-and-setup-_socket-module.patch - 0022-MINGW-exclude-unix-only-modules.patch - 0023-MINGW-setup-msvcrt-and-_winapi-modules.patch - 0024-MINGW-build-extensions-with-GCC.patch - 0025-MINGW-use-Mingw32CCompiler-as-default-compiler-for-m.patch - 0026-MINGW-find-import-library.patch - 0027-MINGW-setup-_ssl-module.patch - 0028-MINGW-generalization-of-posix-build-in-sysconfig.py.patch - 0029-MINGW-support-stdcall-without-underscore.patch - 0030-use-replace-instead-rename-to-avoid-failure-on-windo.patch - 0031-MINGW-avoid-circular-dependency-from-time-module-dur.patch - 0032-MINGW-generalization-of-posix-build-in-distutils-sys.patch - 0033-MINGW-customize-site.patch - 0034-add-python-config-sh.patch - 0035-cross-darwin-feature.patch - 0036-py3k-mingw-ntthreads-vs-pthreads.patch - 0037-mingw-system-libffi.patch - 0038-msys-mingw-prefer-unix-sep-if-MSYSTEM.patch - 0039-mingw-use-posix-getpath.patch - 0040-mingw-add-ModuleFileName-dir-to-PATH.patch - 0041-mingw-add-BUILDIN_WIN32_MODULEs-time-msvcrt.patch - 0042-msys-cygwin-semi-native-build-sysconfig.patch - 0043-mingw-sysconfig-like-posix.patch - 0044-mingw-_winapi_as_builtin_for_Popen_in_cygwinccompile.patch - 0045-cross-dont-add-multiarch-paths-if-cross-compiling.patch - 0046-mingw-use-backslashes-in-compileall-py.patch - 0047-msys-convert_path-fix-and-root-hack.patch - 0048-allow-static-tcltk.patch - 0049-mingw-pdcurses_ISPAD.patch - 0050-grammar-fixes.patch - 0051-builddir-fixes.patch - 0052-msys-monkeypatch-os-system-via-sh-exe.patch - 0053-msys-replace-slashes-used-in-io-redirection.patch - 0054-mingw-install-layout-as-posix.patch - 0055-remove_path_max.default.patch - 0056-dont-link-with-gettext.patch - 0057-ctypes-python-dll.patch - 0058-gdbm-module-includes.patch - 0059-use-gnu_printf-in-format.patch - 0060-mingw-fix-ssl-dont-use-enum_certificates.patch - 0061-mingw-build-optimized-ext.patch - 0062-cygwinccompiler-dont-strip-modules-if-pydebug.patch - 0063-fix-using-dllhandle-and-winver-mingw.patch - 0064-mingw-add-LIBPL-to-library-dirs.patch - 0065-Add-AMD64-to-sys-config-so-msvccompiler-get_build_ve.patch - 0066-MINGW-link-with-additional-library.patch - 0067-install-msilib.patch - 0068-dont-include-system-ncurses-path.patch - 0069-fix-signal-module-build.patch - 0070-build-winconsoleio.patch - 0071-expose-sem_unlink.patch - 0072-cygpty-isatty.patch - 0073-disable-broken-gdbm-module.patch - 0074-link-win-resource-files-and-build-pythonw.patch - 0075-3.7-mpdec-mingw.patch - 0076-disable-readline.patch - 0077-fix-isselectable.patch - 0078-use-_wcsnicmp-instead-wcsncasecmp.patch - 0079-_xxsubinterpretersmodule.patch - 0080-sqlite3-module-defines.patch - 0081-configure-have-inet-pton.patch - 0082-fix-msvc9-import.patch - 0083-set-venv-activate-path-unix.patch - 0084-venv-creation-fixes.patch - 0085-pass-gen-profile-ldflags.patch - 0086-distutils-add-windmc-to-cygwinccompiler.patch - 0087-pkg-config-windows-must-link-ext-with-python-lib.patch - 0088-importlib-bootstrap-path-sep.patch - 0089-pathlib-path-sep.patch - 0090-warnings-fixes.patch - 0091-fix-build-testinternalcapi.patch - 0092-extend-MS_WINDOWS-flag.patch - 0093-clang-arm64.patch - 0094-MINGW-stack-reserve.patch - 0095-Add-support-for-Windows-7-Python-3.9.patch - 0097-Don-t-use-os.pathsep-to-find-EOF.patch - 0098-Fix-extension-suffix-for-c-extensions-on-mingw.patch - 0099-Change-the-get_platform-method-in-sysconfig-and-dist.patch - 0103-squash-Fixup-.rc-handling.patch - 0104-squash-Set-MS_DLL_ID.patch - 0107-squash-fix-srcdir-builddir.patch) - -# Helper macros to help make tasks easier # -apply_patch_with_msg() { - for _patch in "$@" - do - msg2 "Applying ${_patch}" - patch -Nbp1 -i "${srcdir}/${_patch}" - done -} - -prepare() { - cd "${srcdir}/Python-${pkgver}" - - apply_patch_with_msg 0001-make-_sysconfigdata.py-relocatable.patch \ - 0002-restore-setup-config.patch \ - 0003-MINGW-BASE-use-NT-thread-model.patch \ - 0004-MINGW-translate-gcc-internal-defines-to-python-platf.patch \ - 0005-MINGW-configure-MACHDEP-and-platform-for-build.patch \ - 0006-MINGW-preset-configure-defaults.patch \ - 0007-MINGW-configure-largefile-support-for-windows-builds.patch \ - 0008-MINGW-add-srcdir-PC-to-CPPFLAGS.patch \ - 0009-MINGW-init-system-calls.patch \ - 0010-MINGW-build-in-windows-modules-winreg.patch \ - 0011-MINGW-determine-if-pwdmodule-should-be-used.patch \ - 0012-MINGW-compiler-customize-mingw-cygwin-compilers.patch \ - 0013-MINGW-compiler-enable-new-dtags.patch \ - 0014-issue6672-v2-Add-Mingw-recognition-to-pyport.h-to-al.patch \ - 0015-MINGW-configure-for-shared-build.patch \ - 0016-MINGW-dynamic-loading-support.patch \ - 0017-MINGW-ignore-main-program-for-frozen-scripts.patch \ - 0018-MINGW-setup-_multiprocessing-module.patch \ - 0019-MINGW-setup-select-module.patch \ - 0020-MINGW-setup-_ctypes-module-with-system-libffi.patch \ - 0021-MINGW-defect-winsock2-and-setup-_socket-module.patch \ - 0022-MINGW-exclude-unix-only-modules.patch \ - 0023-MINGW-setup-msvcrt-and-_winapi-modules.patch \ - 0024-MINGW-build-extensions-with-GCC.patch \ - 0025-MINGW-use-Mingw32CCompiler-as-default-compiler-for-m.patch \ - 0026-MINGW-find-import-library.patch \ - 0027-MINGW-setup-_ssl-module.patch \ - 0028-MINGW-generalization-of-posix-build-in-sysconfig.py.patch \ - 0029-MINGW-support-stdcall-without-underscore.patch \ - 0030-use-replace-instead-rename-to-avoid-failure-on-windo.patch \ - 0031-MINGW-avoid-circular-dependency-from-time-module-dur.patch \ - 0032-MINGW-generalization-of-posix-build-in-distutils-sys.patch \ - 0033-MINGW-customize-site.patch \ - 0034-add-python-config-sh.patch \ - 0035-cross-darwin-feature.patch \ - 0036-py3k-mingw-ntthreads-vs-pthreads.patch \ - 0037-mingw-system-libffi.patch \ - 0038-msys-mingw-prefer-unix-sep-if-MSYSTEM.patch \ - 0039-mingw-use-posix-getpath.patch \ - 0040-mingw-add-ModuleFileName-dir-to-PATH.patch \ - 0041-mingw-add-BUILDIN_WIN32_MODULEs-time-msvcrt.patch \ - 0042-msys-cygwin-semi-native-build-sysconfig.patch \ - 0043-mingw-sysconfig-like-posix.patch \ - 0044-mingw-_winapi_as_builtin_for_Popen_in_cygwinccompile.patch \ - 0045-cross-dont-add-multiarch-paths-if-cross-compiling.patch \ - 0046-mingw-use-backslashes-in-compileall-py.patch \ - 0047-msys-convert_path-fix-and-root-hack.patch \ - 0048-allow-static-tcltk.patch \ - 0049-mingw-pdcurses_ISPAD.patch \ - 0050-grammar-fixes.patch \ - 0051-builddir-fixes.patch \ - 0052-msys-monkeypatch-os-system-via-sh-exe.patch \ - 0053-msys-replace-slashes-used-in-io-redirection.patch \ - 0054-mingw-install-layout-as-posix.patch \ - 0055-remove_path_max.default.patch \ - 0056-dont-link-with-gettext.patch \ - 0057-ctypes-python-dll.patch \ - 0058-gdbm-module-includes.patch \ - 0059-use-gnu_printf-in-format.patch \ - 0060-mingw-fix-ssl-dont-use-enum_certificates.patch \ - 0061-mingw-build-optimized-ext.patch \ - 0062-cygwinccompiler-dont-strip-modules-if-pydebug.patch \ - 0063-fix-using-dllhandle-and-winver-mingw.patch \ - 0064-mingw-add-LIBPL-to-library-dirs.patch \ - 0065-Add-AMD64-to-sys-config-so-msvccompiler-get_build_ve.patch \ - 0066-MINGW-link-with-additional-library.patch \ - 0067-install-msilib.patch \ - 0068-dont-include-system-ncurses-path.patch \ - 0069-fix-signal-module-build.patch \ - 0070-build-winconsoleio.patch \ - 0071-expose-sem_unlink.patch \ - 0072-cygpty-isatty.patch \ - 0073-disable-broken-gdbm-module.patch \ - 0074-link-win-resource-files-and-build-pythonw.patch \ - 0075-3.7-mpdec-mingw.patch \ - 0076-disable-readline.patch \ - 0077-fix-isselectable.patch \ - 0078-use-_wcsnicmp-instead-wcsncasecmp.patch \ - 0079-_xxsubinterpretersmodule.patch \ - 0080-sqlite3-module-defines.patch \ - 0081-configure-have-inet-pton.patch \ - 0082-fix-msvc9-import.patch \ - 0083-set-venv-activate-path-unix.patch \ - 0084-venv-creation-fixes.patch \ - 0085-pass-gen-profile-ldflags.patch \ - 0086-distutils-add-windmc-to-cygwinccompiler.patch \ - 0087-pkg-config-windows-must-link-ext-with-python-lib.patch \ - 0088-importlib-bootstrap-path-sep.patch \ - 0089-pathlib-path-sep.patch \ - 0090-warnings-fixes.patch \ - 0091-fix-build-testinternalcapi.patch \ - 0092-extend-MS_WINDOWS-flag.patch \ - 0093-clang-arm64.patch \ - 0094-MINGW-stack-reserve.patch \ - 0095-Add-support-for-Windows-7-Python-3.9.patch \ - 0097-Don-t-use-os.pathsep-to-find-EOF.patch \ - 0098-Fix-extension-suffix-for-c-extensions-on-mingw.patch \ - 0099-Change-the-get_platform-method-in-sysconfig-and-dist.patch \ - 0103-squash-Fixup-.rc-handling.patch \ - 0104-squash-Set-MS_DLL_ID.patch \ - 0107-squash-fix-srcdir-builddir.patch - - autoreconf -vfi -} - -check() { - cd "${srcdir}/build-${CARCH}" - - # Some basic tests to ensure nothing major or MSYS2 specific features are - # broken - ./python.exe "${srcdir}/smoketests.py" - MSYSTEM= ./python.exe "${srcdir}/smoketests.py" - - # make test EXTRATESTOPTS="-v" -} - -build() { - local PREFIX_WIN=$(cygpath -wm ${MINGW_PREFIX}) - - CFLAGS+=" -fwrapv -D__USE_MINGW_ANSI_STDIO=1 -D_WIN32_WINNT=0x0601" - CXXFLAGS+=" -fwrapv -D__USE_MINGW_ANSI_STDIO=1 -D_WIN32_WINNT=0x0601" - CPPFLAGS+=" -I${PREFIX_WIN}/include/ncurses " - - declare -a _extra_config - if check_option "debug" "n"; then - CFLAGS+=" -DNDEBUG " - CXXFLAGS+=" -DNDEBUG " - _extra_config+=("--enable-optimizations") - # FIXME: https://github.com/msys2-contrib/cpython-mingw/issues/10 - # _extra_config+=("--with-lto") - else - CFLAGS+=" -O0 -ggdb" - CXXFLAGS+=" -O0 -ggdb" - _extra_config+=("--with-pydebug") - fi - - # Workaround for conftest error on 64-bit builds - export ac_cv_working_tzset=no - - # Workaround for when dlfcn exists on Windows, which causes - # some conftests to succeed when they shouldn't (we don't use dlfcn). - export ac_cv_header_dlfcn_h=no - export ac_cv_lib_dl_dlopen=no - export ac_cv_have_decl_RTLD_GLOBAL=no - export ac_cv_have_decl_RTLD_LAZY=no - export ac_cv_have_decl_RTLD_LOCAL=no - export ac_cv_have_decl_RTLD_NOW=no - export ac_cv_have_decl_RTLD_DEEPBIND=no - export ac_cv_have_decl_RTLD_MEMBER=no - export ac_cv_have_decl_RTLD_NODELETE=no - export ac_cv_have_decl_RTLD_NOLOAD=no - - [[ -d "${srcdir}/build-${CARCH}" ]] && rm -rf "${srcdir}/build-${CARCH}" - mkdir -p "${srcdir}/build-${CARCH}" && cd "${srcdir}/build-${CARCH}" - - MSYSTEM=MINGW ../Python-${pkgver}/configure \ - --prefix=${MINGW_PREFIX} \ - --host=${MINGW_CHOST} \ - --build=${MINGW_CHOST} \ - --enable-shared \ - --with-nt-threads \ - --with-system-expat \ - --with-system-ffi \ - --with-system-libmpdec \ - --without-ensurepip \ - --without-c-locale-coercion \ - --enable-loadable-sqlite-extensions \ - "${_extra_config[@]}" \ - OPT="" - - # We patch importlib which is embedded in C headers, so regenerate them - make regen-importlib - - make - - # Add missing venvlauncher files (issue #7014) - # FIXME: build these from PC/launcher.c instead - cp python.exe venvlauncher.exe - cp pythonw.exe venvwlauncher.exe -} - -package() { - cd "${srcdir}/build-${CARCH}" - - local PREFIX_WIN=$(cygpath -wm ${MINGW_PREFIX}) - MSYSTEM=MINGW \ - MSYS2_ARG_CONV_EXCL="--prefix=;--install-scripts=;--install-platlib=" \ - make -j1 install DESTDIR="${pkgdir}" - if check_option "debug" "n"; then - VERABI=${_pybasever} - else - VERABI=${_pybasever}d - fi - - # gdb pretty printers for debugging Python itself; to use: - # python - # sys.path.append('C:/msys64/mingw64/share/gdb/python3') - # import python_gdb - # reload(python_gdb) - # end - if [[ "${_primary_python}" == "yes" ]]; then - [[ -d "${pkgdir}${MINGW_PREFIX}"/share/gdb/python3/ ]] || mkdir -p "${pkgdir}${MINGW_PREFIX}"/share/gdb/python3/ - cp -f python.exe-gdb.py "${pkgdir}${MINGW_PREFIX}"/share/gdb/python3/python_gdb.py - fi - - cp -f "${pkgdir}${MINGW_PREFIX}"/lib/python${_pybasever}/config-${VERABI}/libpython${VERABI}.dll.a "${pkgdir}${MINGW_PREFIX}"/lib/libpython${VERABI}.dll.a - - # Need for building boost python module - cp -f "${pkgdir}${MINGW_PREFIX}"/lib/python${_pybasever}/config-${VERABI}/libpython${VERABI}.dll.a "${pkgdir}${MINGW_PREFIX}"/lib/libpython${_pybasever}.dll.a - - # some useful "stuff" - install -dm755 "${pkgdir}${MINGW_PREFIX}"/lib/python${_pybasever}/Tools/{i18n,scripts} - install -m755 "${srcdir}/Python-${pkgver}"/Tools/i18n/{msgfmt,pygettext}.py "${pkgdir}${MINGW_PREFIX}"/lib/python${_pybasever}/Tools/i18n/ - install -m755 "${srcdir}/Python-${pkgver}"/Tools/scripts/{README,*py} "${pkgdir}${MINGW_PREFIX}"/lib/python${_pybasever}/Tools/scripts/ - - # clean up #!s - find "${pkgdir}${MINGW_PREFIX}"/lib/python${_pybasever}/ -name '*.py' | \ - xargs sed -i "s|#[ ]*![ ]*/usr/bin/env python$|#!/usr/bin/env python|" - - # clean-up reference to build directory - sed -i "s#${srcdir}/Python-${pkgver}:##" "${pkgdir}${MINGW_PREFIX}"/lib/python${_pybasever}/config-${VERABI}/Makefile - - for fscripts in 2to3 2to3-${_pybasever} idle3 idle${_pybasever} pydoc3 pydoc${_pybasever}; do - sed -i "s|$(cygpath -w ${MINGW_PREFIX} | sed 's|\\|\\\\|g')/bin/python${_pybasever}.exe|/usr/bin/env python${_pybasever}.exe|g" "${pkgdir}${MINGW_PREFIX}"/bin/${fscripts} - done - - if [[ "${_primary_python}" == "yes" ]]; then - # Default names are aliases for Python now - cp "${pkgdir}${MINGW_PREFIX}"/bin/python3.exe "${pkgdir}${MINGW_PREFIX}"/bin/python.exe - cp "${pkgdir}${MINGW_PREFIX}"/bin/python3w.exe "${pkgdir}${MINGW_PREFIX}"/bin/pythonw.exe - cp "${pkgdir}${MINGW_PREFIX}"/bin/python3-config "${pkgdir}${MINGW_PREFIX}"/bin/python-config - cp "${pkgdir}${MINGW_PREFIX}"/bin/idle3 "${pkgdir}${MINGW_PREFIX}"/bin/idle - cp "${pkgdir}${MINGW_PREFIX}"/bin/pydoc3 "${pkgdir}${MINGW_PREFIX}"/bin/pydoc - else - rm "${pkgdir}${MINGW_PREFIX}"/bin/python3.exe - rm "${pkgdir}${MINGW_PREFIX}"/bin/python3w.exe - rm "${pkgdir}${MINGW_PREFIX}"/bin/python3-config - rm "${pkgdir}${MINGW_PREFIX}"/bin/idle3 - rm "${pkgdir}${MINGW_PREFIX}"/bin/pydoc3 - rm "${pkgdir}${MINGW_PREFIX}"/bin/2to3 - rm "${pkgdir}${MINGW_PREFIX}"/lib/pkgconfig/python3-embed.pc - rm "${pkgdir}${MINGW_PREFIX}"/lib/pkgconfig/python3.pc - rm "${pkgdir}${MINGW_PREFIX}"/share/man/man1/python3.1 - fi - - sed -i "s|#!${pkgdir}${MINGW_PREFIX}/bin/python${VERABI}.exe|#!/usr/bin/env python${_pybasever}.exe|" "${pkgdir}${MINGW_PREFIX}"/lib/python${_pybasever}/config-${VERABI}/python-config.py - - # fix permissons - find ${pkgdir}${MINGW_PREFIX} -type f \( -name "*.dll" -o -name "*.exe" \) | xargs chmod 0755 - - # Fix up two instances of MSYS2 paths in python-config.sh in-case the final consumer of the results are native executables. - sed -e "s|${MINGW_PREFIX}|${PREFIX_WIN}|" \ - -i "${pkgdir}${MINGW_PREFIX}"/bin/python${VERABI}-config - if [[ "${_primary_python}" == "yes" ]]; then - sed -e "s|${MINGW_PREFIX}|${PREFIX_WIN}|" \ - -i "${pkgdir}${MINGW_PREFIX}"/bin/python3-config \ - -i "${pkgdir}${MINGW_PREFIX}"/bin/python-config - fi - - # replace paths in sysconfig - sed -i "s|${pkgdir}${MINGW_PREFIX}|${MINGW_PREFIX}|g" \ - "${pkgdir}${MINGW_PREFIX}"/lib/python${_pybasever}/lib-dynload/_sysconfigdata*.py \ - "${pkgdir}${MINGW_PREFIX}"/lib/python${_pybasever}/smtpd.py - - # install venv launchers - mkdir -p "${pkgdir}${MINGW_PREFIX}"/lib/python${_pybasever}/venv/scripts/nt - cp venvlauncher.exe "${pkgdir}${MINGW_PREFIX}"/lib/python${_pybasever}/venv/scripts/nt/python.exe - cp venvwlauncher.exe "${pkgdir}${MINGW_PREFIX}"/lib/python${_pybasever}/venv/scripts/nt/pythonw.exe -} - -sha256sums=('397920af33efc5b97f2e0b57e91923512ef89fc5b3c1d21dbfc8c4828ce0108a' - '7188e017a1efba4a87cb64a38b63ed2d8a469e2e74c3fd35b6538d5bc6e370e5' - '621cbe4120c2f83c39eff9c03aba62b4240c657aaacff6c6063968e597a94f88' - '382f4d6b59da0e3c0ccea985864bd0e1389d97bd6517f068f175a624615f192d' - '36a13e324c8d4001f60799b60e87255db4f5ae9f2a04c2396b2a154fa8c7eb4c' - 'a3aeeeafbeaf8fd0f0884a29e4066e5ce2af0f8d4945b51e420dfdaa4dbfe4b9' - '852be8186f71c46b7f7907a8cef3fd1936f3a288ffeeedba843d73cd2e65caaf' - 'db5a158f9545d554dfad95290aae15fc71f03550c3594e1dabdbc0cfbb0ced29' - 'a8a6eb37672dbe4cfcd6df4ccd755217ee5e433b36b67591a407edcbb262c0eb' - '380a25c2b7cfafb1b9ddff91a94ba8eb7db00fb6a37c5f6bdb1e12ffbdcf2076' - '354b523f924dd066520f6df3f61fb752a7bdfe63b6422d32cb3b860445040878' - 'ac85eca34438d4e38f195da6614663a10e7f3f659e5c9879670a1e9a46a8a1c1' - 'fa0010a847b7156b07aadc7fe976b675d8913df0fa4efdfe5a148a529ff41ec1' - '0581eeba3aab8d851a1af2bf7ac29479d36adf19f7db7f0210d6d5e3ca22b9d8' - 'ff8375e55445678ab17a3d1dff62908dd22d15609160acb670e0fe67198736ee' - 'effc7117a72e0f3cadce63135f18ad513516880e3a6b8121037f6dbfddfc1e46' - '8f515fc87a457462c2d412326907c58dbc4253de95630718c4d56610db24a6de' - '3f833597807e08a85ca5e1fc26a2872f1127a01bfe2336c85f2c78cc547f40c3' - 'e2e9b0439a0e6c9a054c2f35c8f454ec2a4100e7bca9505ea94cd1011dfe7ee3' - '4f4d34bf0b1d3a979988d1dab3cc34d43d267c3b1b3ea1debf3358424302752d' - '02d3058ffe6439033055834f1452edebca5df686d38c2d48bc62f290b11de1a9' - '5185d0763ac3ff351d86b4403421ba8bbb9dac477ceb2816054caf4eb62873a5' - '86e39c652691e6dac338d617d262d0413f7468d74d12305cf8a12806f5e07b5e' - 'e28cfe596fa3087172b00fcdc1f313e1050f97b433a6b4f322a291866b80fc95' - 'fce14bcae4019a1d82b66cf18ad80e2c131eafcb585c1e70843b1f2a7b46a059' - '91499de0d6b5541aae4b544a84af4f85ce25d8bea030dd61cff0f5af2950e26e' - '67e10d47d4fd13b6ca691e9e04aa73a230a7df95318251e232455f8ab5c1eec4' - 'dae01ea768c270bf7e04f909000156d785881116dd05c48f2d6c5c64992943af' - 'f6214537de4f5ab1bc1c9c287bcd9f4108f6bf444b8930a985759753a96241e6' - 'd332fa50c6b6de4cba8b849c18687a420da1448cfc1bbdaafa8e724976fc0ee0' - '8363c5a8baf8dbde51c94413cffc1f9b6da3e3881c98995b30f9264cbf587845' - '5df74f664abbba7302642b7a9791ce891a1a00df2848cb0ac243cf61ca2617dd' - '339d65c6309431bd871810be26eb28ac84468b0dc287d443a40e5116ea7e45c7' - '1e5d15016f9866db88bf0efebe2cabef93955a6a9c54efe254e2219a9938bcba' - '9e3c9dcecb70a1394c2d2ed36ac2161014f95456a7a28fb206ebe14d6e944e28' - '516327a3e0dddd923c20a23dffbfafbad83d9ae782477eb36650a14526e0237f' - '008613913e1d861093ffe980999c1999da8c415f6d6e1f2a630ad872e018048b' - '6a0798d4f3a832bd0a09a22896b59fa4bc69638d99230d81ff3bc45ff16cde82' - '6346ca038c76011ade842ed2fe629897cc53ee7c2517ede0a300d7c8bab13ab0' - 'cd2614a5d8fef3132e08a0037ba66eeec9acfab386df086de8637e39bbd93cef' - '5a7d072a9b3c731818288ee0fe51fdabe5dc257b885eeb5fac6f200bbfc8a63a' - 'a155c770a98ee6bb96cfa0a6f9a5ddb4dce993ea818b83532d90cf57b1615c09' - '4915b4b4ff6c293426671d6bc91c174cc2b2cd7d3d1099a67e9cfe53cd7320b9' - '0d3061a67c8ed855ec78c01f682c12632e36e473d42c3e7008f999dc13bbc5b0' - 'e0c2d8aaa24425aa9f1cfd576d8f0a67d2e39c7108edadc7f322f618cdf9f97e' - '18f30eea4c1efb0f2c7f608a7daa7491c021c15476a1df2323a4f48849b6f77d' - '8ce17fdb9665dcd384744527a1eb155e1d1ff137a0a2a75d275dca0230830645' - '8b34737a4018920ecd31ee40d3a0db1545478258e58028061935e50024ee6b6c' - 'e4060c8d2158d3b2dcf7f8c79eca7490d23ef4897fa8a24388321f77c340fd88' - 'd47c18f14276c6151176c9c7f0780d334a582adcf4b6c71145f328377960bb94' - '25002a2be534ef4b4dbcfbc5598832ef4b64aa0ac849c3b44d796b49e10a3906' - 'c6a731c103ef31589296f60b9e220fe70b0113b49696248c4e379bb3b39ddf03' - 'c5ccfdb8f8695f94f23e9ecd0304ec91b5f4f00f9d6f43426ede4e0038479f24' - '58f5f50ce9e8a6dd4b484f174ad174db397ac5b2b248b56db65acae2122ed805' - '077ce1a4e5fd69de839c5f1bfb24a3bb5d2d548fb4a51250097692626d7c5d6b' - '3b1659b05b3353938a84b9a9f23a1add6f0dc38bb1d81e58010651e07c719a95' - '17d44817baccadcfb23289c15ca23f19fa185aa2a7dd12c88524de8d888f3507' - '54031e5b3f02cc4b80ce6b1702d7c33c6e9251136e1410012c7faa861abffe84' - '3741637112ae6fa0bcc15d73e80810b5e5c6986b8e8a4333f8a08c30c5e21ddb' - '11314e843829ef3fd8058434311dd55eeb7dd512ec8730f28c5b8bc6e101a654' - 'b87f41523bbcb61a8076a46a83b61480a2da79b49c3af3d0310aff02fb3eff7d' - '12f619eb1bcc3dc3a05d3ac077d0970860a8b97ecbd95f735fc95436bc910c1d' - '22f256ab9b1f19aa6ad41ef2ef23bcc67b8d9a2fc24315bac39e5eff4a3d5ef0' - '453be8620a5b47567fd750bdc7226baa2a7bae84d280c082ceea6c822c0152d4' - '167fc8fe20a0122fa0a5dfd7adcf343ba71379732bd0f6ade5a958f4c4c07c84' - 'f99bc96d13d181c0e3604b0b6f3405450cb23504739812cd05d12bb4796d6a4d' - '4e1fed573d0b564faad7770fa1a79525864acb02dd3996bbd28813201d80e941' - 'dcbf48794825acdcfc00e08ae358f2dc51dc8dfde8fc3cf7e304c570b8c477d2' - '3a9876035372157298f0b340c86806a43c193c09a1f732cb116262a8baa6658b' - '4446250eb39ed7afd9d0c79da92f15586bf8dc8c2ba9dec2edaa5d92136e95e6' - '385935abdaedf42ae27e21e895707471a3171a73310d0b97218823d13a1cff52' - '2b890e0612c9aaa0243b3cc86219b47c8f6823af2c57d8f3f100dcc5f664d13e' - '02b98c859ffc4c0d47667e7fa4579699249eb9052b8a985d051630c33d2304ff' - '92c3ed2cbcc0c9bd28a0b669ec68e445be7c5245201bda1c06172712c54d1a17' - '72e51a8f9374766b9afc452a5fbf7646390e89d1ae9f1ec158e22aac6dedf1db' - '5891a8c56eb49b1a9d2c22ee895821c34086a341b4a7e7e57b9e78196dc346a4' - 'e02409488b5cbd9157b6c80abd78ea2972e49092949e902811dabbf56f3f6d0c' - 'adba48cb1daf77542162e4da61caf498c83b2de5abbc5545f68a8ac290fe7b4a' - 'bf1960038604a3ad0ab11bc47007f8d7a97941c3b7f44d4487e2d79d742ca870' - '836723f0d3ec3d10b5ddabd09f7dddc76eefa261b6105b544f9dae7f4416146e' - 'b64e7a874532fe0475d4b3c192fb215948c06392a7ad04fd47a28289cc809967' - 'b49ab150e95bd390101225ba6ac3983df2a5a0bbc47d506a88c9caeefbd4ed3f' - '79f1646fa548a9da9986ded4a51842751cdea7ec579d28e6cc5d86e4a5a89f27' - '233318923f5fd7dd4605c79bb2adfbcdd2e8cc7e242b1e080e59aed1f6b86a29' - 'ceba0f6e583570db571ee9c3fe64b74ea58a474d114847cadd3ad70386c7c199' - 'fb3bee9ba5e4f9b2e8b7e8ec2fb08e12d85542bae8b86e7a4c69f698f720253b' - 'b01320b3c9037bb1fed03c7b8002e7b6af52fc7bb85cdf84cfc96842c7c9657d' - 'e3c10b3eb07b41e804b6a500c848def6f72cb04d94d00657dab307e68e891536' - '5e8113ca39795b59a0144b68db88a197c43c3b907c3f7bf2a5e1c1dd3a41b19c' - '4130af022a9ec1717cac82e3d3d5a7144a9c17611ac4db5150f8adede4ed3276' - '24e9029d664255a96c0346f7e53316640be6a6480bd77fcd7532a2b88881b485' - '754d84bc288da89cdec4b1cf5d216195aaa2f3d4046043d8b487bdd2f5a4c837' - '2d6ce50423f65dded048f64eb0dafe62448ad4786add9295d90fcfa6f316412a' - 'b3ba2ac22cd4263419f3daf93334745bccd1c70c429812c95821ed1e2d649159' - 'a74c4203ccc6f858fa9ee2c203cad1bf5de2bd868650d18c65034897e29e2b5d' - 'fe6bb4725238cbd00b856ed757392bdd2f0e7adb5216ee7738654b7a74594810' - '6fcc769d47e71afd496eef16a6c77d0e1eff983a20b16a7fadb6f4cc1c8ee6d7' - '38217179bc520cc35ba03f4f049d06b2bb935d66e5cfb488e5fd08befda3b8e8' - '034a036cbdcbe33bb17a7951658da438ff7047f4f86fe8e5ebac5d84438ed0bd' - '703846000b96d426c50b400f5efbc8c2c877ce7c844f64ecdba86275035577b3' - 'ba079f6735555329997f7bd2e06140a1f4c32bf31e51c7a08f43b6fbf242829e' - '70d2d6d4b0ad50633069f14a13ac7474d97bc6443da51a1f4cdfe50d200c7c97' - '527284880bc4eaf45f657993cbb14b0c9e2355c696bf9da30ffa20fe0a527f72') diff --git a/mingw-w64-python3.9/smoketests.py b/mingw-w64-python3.9/smoketests.py deleted file mode 100644 index e9c607e918..0000000000 --- a/mingw-w64-python3.9/smoketests.py +++ /dev/null @@ -1,132 +0,0 @@ -#!/usr/bin/env python3 -# Copyright 2017 Christoph Reiter -# -# Permission is hereby granted, free of charge, to any person obtaining -# a copy of this software and associated documentation files (the -# "Software"), to deal in the Software without restriction, including -# without limitation the rights to use, copy, modify, merge, publish, -# distribute, sublicense, and/or sell copies of the Software, and to -# permit persons to whom the Software is furnished to do so, subject to -# the following conditions: -# -# The above copyright notice and this permission notice shall be included -# in all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -# CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -"""The goal of this test suite is collect tests for update regressions -and to test msys2 related modifications like for path handling. -Feel free to extend. -""" - -import os -import unittest - -if "MSYSTEM" in os.environ: - SEP = "/" -else: - SEP = "\\" - - -class Tests(unittest.TestCase): - - def test_sep(self): - self.assertEqual(os.sep, SEP) - - def test_module_file_path(self): - import asyncio - import zlib - self.assertEqual(zlib.__file__, os.path.normpath(zlib.__file__)) - self.assertEqual(asyncio.__file__, os.path.normpath(asyncio.__file__)) - - def test_importlib_frozen_path_sep(self): - import importlib._bootstrap_external - self.assertEqual(importlib._bootstrap_external.path_sep, SEP) - - def test_os_commonpath(self): - self.assertEqual( - os.path.commonpath( - [os.path.join("C:", os.sep, "foo", "bar"), - os.path.join("C:", os.sep, "foo")]), - os.path.join("C:", os.sep, "foo")) - - def test_pathlib(self): - import pathlib - - p = pathlib.Path("foo") / pathlib.Path("foo") - self.assertEqual(str(p), os.path.normpath(p)) - - def test_modules_import(self): - import sqlite3 - import ssl - import ctypes - - def test_socket_inet_ntop(self): - import socket - self.assertTrue(hasattr(socket, "inet_ntop")) - - def test_socket_inet_pton(self): - import socket - self.assertTrue(hasattr(socket, "inet_pton")) - - def test_multiprocessing_queue(self): - from multiprocessing import Queue - Queue(0) - - def test_socket_timout_normal_error(self): - import urllib.request - from urllib.error import URLError - - try: - urllib.request.urlopen( - 'http://localhost', timeout=0.0001).close() - except URLError: - pass - - def test_threads(self): - from concurrent.futures import ThreadPoolExecutor - - with ThreadPoolExecutor(1) as pool: - for res in pool.map(lambda *x: None, range(10000)): - pass - - def test_sysconfig(self): - import sysconfig - # This should be able to execute without exceptions - sysconfig.get_config_vars() - - def test_sqlite_enable_load_extension(self): - # Make sure --enable-loadable-sqlite-extensions is used - import sqlite3 - self.assertTrue(sqlite3.Connection.enable_load_extension) - - def test_venv_creation(self): - import tempfile - import venv - import subprocess - import shutil - with tempfile.TemporaryDirectory() as tmp: - builder = venv.EnvBuilder() - builder.create(tmp) - assert os.path.exists(os.path.join(tmp, "bin", "activate")) - assert os.path.exists(os.path.join(tmp, "bin", "python.exe")) - assert os.path.exists(os.path.join(tmp, "bin", "python3.exe")) - subprocess.check_call([shutil.which("bash.exe"), os.path.join(tmp, "bin", "activate")]) - - def test_has_mktime(self): - from time import mktime, gmtime - mktime(gmtime()) - - -def suite(): - return unittest.TestLoader().loadTestsFromName(__name__) - - -if __name__ == '__main__': - unittest.main(defaultTest='suite')