summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO284
-rw-r--r--0001-make-_sysconfigdata.py-relocatable.patch59
-rw-r--r--0002-restore-setup-config.patch82
-rw-r--r--0003-MINGW-BASE-use-NT-thread-model.patch234
-rw-r--r--0004-MINGW-translate-gcc-internal-defines-to-python-platf.patch44
-rw-r--r--0005-MINGW-configure-MACHDEP-and-platform-for-build.patch81
-rw-r--r--0006-MINGW-preset-configure-defaults.patch90
-rw-r--r--0007-MINGW-configure-largefile-support-for-windows-builds.patch43
-rw-r--r--0008-MINGW-add-srcdir-PC-to-CPPFLAGS.patch43
-rw-r--r--0009-MINGW-init-system-calls.patch124
-rw-r--r--0010-MINGW-build-in-windows-modules-winreg.patch79
-rw-r--r--0011-MINGW-determine-if-pwdmodule-should-be-used.patch65
-rw-r--r--0012-MINGW-compiler-customize-mingw-cygwin-compilers.patch54
-rw-r--r--0013-MINGW-compiler-enable-new-dtags.patch37
-rw-r--r--0014-issue6672-v2-Add-Mingw-recognition-to-pyport.h-to-al.patch82
-rw-r--r--0015-MINGW-configure-for-shared-build.patch69
-rw-r--r--0016-MINGW-dynamic-loading-support.patch103
-rw-r--r--0017-MINGW-ignore-main-program-for-frozen-scripts.patch52
-rw-r--r--0018-MINGW-setup-_multiprocessing-module.patch34
-rw-r--r--0019-MINGW-setup-select-module.patch60
-rw-r--r--0020-MINGW-setup-_ctypes-module-with-system-libffi.patch45
-rw-r--r--0021-MINGW-defect-winsock2-and-setup-_socket-module.patch167
-rw-r--r--0022-MINGW-exclude-unix-only-modules.patch94
-rw-r--r--0023-MINGW-setup-msvcrt-and-_winapi-modules.patch93
-rw-r--r--0024-MINGW-build-extensions-with-GCC.patch79
-rw-r--r--0025-MINGW-use-Mingw32CCompiler-as-default-compiler-for-m.patch72
-rw-r--r--0026-MINGW-find-import-library.patch29
-rw-r--r--0027-MINGW-setup-_ssl-module.patch30
-rw-r--r--0028-MINGW-generalization-of-posix-build-in-sysconfig.py.patch80
-rw-r--r--0029-MINGW-support-stdcall-without-underscore.patch54
-rw-r--r--0030-use-replace-instead-rename-to-avoid-failure-on-windo.patch31
-rw-r--r--0031-MINGW-avoid-circular-dependency-from-time-module-dur.patch37
-rw-r--r--0032-MINGW-generalization-of-posix-build-in-distutils-sys.patch94
-rw-r--r--0033-MINGW-customize-site.patch59
-rw-r--r--0034-add-python-config-sh.patch162
-rw-r--r--0035-cross-darwin-feature.patch138
-rw-r--r--0036-py3k-mingw-ntthreads-vs-pthreads.patch64
-rw-r--r--0037-mingw-system-libffi.patch30
-rw-r--r--0038-msys-mingw-prefer-unix-sep-if-MSYSTEM.patch397
-rw-r--r--0039-mingw-use-posix-getpath.patch505
-rw-r--r--0040-mingw-add-ModuleFileName-dir-to-PATH.patch58
-rw-r--r--0041-mingw-add-BUILDIN_WIN32_MODULEs-time-msvcrt.patch27
-rw-r--r--0042-msys-cygwin-semi-native-build-sysconfig.patch126
-rw-r--r--0043-mingw-sysconfig-like-posix.patch84
-rw-r--r--0044-mingw-_winapi_as_builtin_for_Popen_in_cygwinccompile.patch84
-rw-r--r--0045-cross-dont-add-multiarch-paths-if-cross-compiling.patch33
-rw-r--r--0046-mingw-use-backslashes-in-compileall-py.patch30
-rw-r--r--0047-msys-convert_path-fix-and-root-hack.patch117
-rw-r--r--0048-allow-static-tcltk.patch87
-rw-r--r--0049-mingw-pdcurses_ISPAD.patch35
-rw-r--r--0050-grammar-fixes.patch45
-rw-r--r--0051-builddir-fixes.patch70
-rw-r--r--0052-msys-monkeypatch-os-system-via-sh-exe.patch39
-rw-r--r--0053-msys-replace-slashes-used-in-io-redirection.patch73
-rw-r--r--0054-mingw-install-layout-as-posix.patch47
-rw-r--r--0055-remove_path_max.default.patch29
-rw-r--r--0056-dont-link-with-gettext.patch60
-rw-r--r--0057-ctypes-python-dll.patch33
-rw-r--r--0058-gdbm-module-includes.patch30
-rw-r--r--0059-use-gnu_printf-in-format.patch85
-rw-r--r--0060-mingw-fix-ssl-dont-use-enum_certificates.patch39
-rw-r--r--0061-mingw-build-optimized-ext.patch34
-rw-r--r--0062-cygwinccompiler-dont-strip-modules-if-pydebug.patch29
-rw-r--r--0063-fix-using-dllhandle-and-winver-mingw.patch39
-rw-r--r--0064-mingw-add-LIBPL-to-library-dirs.patch26
-rw-r--r--0065-Add-AMD64-to-sys-config-so-msvccompiler-get_build_ve.patch42
-rw-r--r--0066-MINGW-link-with-additional-library.patch33
-rw-r--r--0067-install-msilib.patch30
-rw-r--r--0068-dont-include-system-ncurses-path.patch36
-rw-r--r--0069-fix-signal-module-build.patch29
-rw-r--r--0070-build-winconsoleio.patch29
-rw-r--r--0071-expose-sem_unlink.patch29
-rw-r--r--0072-cygpty-isatty.patch461
-rw-r--r--0073-disable-broken-gdbm-module.patch29
-rw-r--r--0074-link-win-resource-files-and-build-pythonw.patch134
-rw-r--r--0075-3.7-mpdec-mingw.patch26
-rw-r--r--0076-disable-readline.patch32
-rw-r--r--0077-fix-isselectable.patch29
-rw-r--r--0078-use-_wcsnicmp-instead-wcsncasecmp.patch26
-rw-r--r--0079-_xxsubinterpretersmodule.patch26
-rw-r--r--0080-sqlite3-module-defines.patch28
-rw-r--r--0081-configure-have-inet-pton.patch35
-rw-r--r--0082-fix-msvc9-import.patch38
-rw-r--r--0083-set-venv-activate-path-unix.patch29
-rw-r--r--0084-venv-creation-fixes.patch71
-rw-r--r--0085-pass-gen-profile-ldflags.patch29
-rw-r--r--0086-distutils-add-windmc-to-cygwinccompiler.patch58
-rw-r--r--0087-pkg-config-windows-must-link-ext-with-python-lib.patch38
-rw-r--r--0088-importlib-bootstrap-path-sep.patch31
-rw-r--r--0089-pathlib-path-sep.patch25
-rw-r--r--0090-warnings-fixes.patch131
-rw-r--r--0091-fix-build-testinternalcapi.patch28
-rw-r--r--0092-extend-MS_WINDOWS-flag.patch25
-rw-r--r--0093-clang-arm64.patch63
-rw-r--r--0094-MINGW-stack-reserve.patch28
-rw-r--r--0095-Add-support-for-Windows-7-Python-3.9.patch176
-rw-r--r--0096-Add-CI-to-Build-and-Test.patch388
-rw-r--r--0097-Don-t-use-os.pathsep-to-find-EOF.patch27
-rw-r--r--0098-Fix-extension-suffix-for-c-extensions-on-mingw.patch181
-rw-r--r--0099-Change-the-get_platform-method-in-sysconfig-and-dist.patch93
-rw-r--r--0100-Add-a-test-to-build-C-Ext.patch108
-rw-r--r--0101-Add-some-platform-related-tests.patch45
-rw-r--r--0102-squash-CI-use-O2.patch30
-rw-r--r--0103-squash-Fixup-.rc-handling.patch69
-rw-r--r--0104-squash-Set-MS_DLL_ID.patch25
-rw-r--r--0105-squash-CI-Clean-up.patch115
-rw-r--r--0106-squash-CI-use-srcdir-builddir.patch69
-rw-r--r--0107-squash-fix-srcdir-builddir.patch41
-rw-r--r--0108-build-Cleanup-ncursesw-include-lookup-code.patch75
-rw-r--r--0109-tests-fix-test_bytes.patch27
-rw-r--r--0110-time-fix-strftime-not-raising-for-invalid-year-value.patch28
-rw-r--r--0111-winconsoleio-build-_testconsole-which-is-required-fo.patch30
-rw-r--r--0112-Adjust-Py_WINVER-for-our-Win-7-target.patch30
-rw-r--r--0113-ctypes-find_library-c-should-return-None-with-ucrt.patch41
-rw-r--r--0114-build-Disable-checks-for-dlopen-dlfcn.patch66
-rw-r--r--0115-Fix-install-location-of-the-import-library.patch25
-rw-r--r--0116-Set-MSYS2_ARG_CONV_EXCL-for-the-shared-Python-module.patch26
-rw-r--r--0117-build-Integrate-venvlauncher-build-installation-into.patch79
-rw-r--r--0118-Update-smoketests.patch70
-rw-r--r--0119-CI-clean-up-the-build-enforce-some-tests.patch247
-rw-r--r--0120-1-2-AC_RUN_IFELSE-replace.patch33
-rw-r--r--0121-Add-return-0-to-the-test-code.patch25
-rw-r--r--0122-2-2-AC_RUN_IFELSE-replace.patch53
-rw-r--r--0123-Make-sure-MACHDEP-matches-sys.platform.patch83
-rw-r--r--0124-CI-add-a-cross-build-job.patch77
-rw-r--r--0125-Revert-Adjust-Py_WINVER-for-our-Win-7-target.patch28
-rw-r--r--0126-Set-_WIN32_WINNT-version-in-configure.ac.patch28
-rw-r--r--0127-CI-cleanup.patch24
-rw-r--r--0128-Commit-regenerated-importlib.patch2394
-rw-r--r--0129-CI-clean-up.patch26
-rw-r--r--0130-configure.ac-default-to-with-nt-threads-with-mingw.patch56
-rw-r--r--0131-configure.ac-don-t-check-for-clock_-functions.patch36
-rw-r--r--0132-CI-clean-up.patch40
-rw-r--r--0133-smoketests-update.patch30
-rw-r--r--0134-expanduser-normpath-paths-coming-from-env-vars.patch35
-rw-r--r--0135-sysconfig-fix-platlib-purelib-paths.patch29
-rw-r--r--0136-smoketests-update.patch55
-rw-r--r--PKGBUILD582
-rw-r--r--patches.tar.xzbin45908 -> 0 bytes
139 files changed, 12553 insertions, 178 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 5a7a9d609158..ecff6c83e3f4 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,6 +1,6 @@
pkgbase = mingw-w64-python
pkgdesc = Next generation of the python high-level scripting language (mingw-w64)
- pkgver = 3.8.6
+ pkgver = 3.9.6
pkgrel = 1
url = https://www.python.org/
arch = any
@@ -25,15 +25,281 @@ pkgbase = mingw-w64-python
options = staticlibs
options = !buildflags
options = !strip
- source = https://www.python.org/ftp/python/3.8.6/Python-3.8.6.tar.xz
- source = patches.tar.xz
+ source = https://www.python.org/ftp/python/3.9.6/Python-3.9.6.tar.xz
+ source = 0001-make-_sysconfigdata.py-relocatable.patch
+ source = 0002-restore-setup-config.patch
+ source = 0003-MINGW-BASE-use-NT-thread-model.patch
+ source = 0004-MINGW-translate-gcc-internal-defines-to-python-platf.patch
+ source = 0005-MINGW-configure-MACHDEP-and-platform-for-build.patch
+ source = 0006-MINGW-preset-configure-defaults.patch
+ source = 0007-MINGW-configure-largefile-support-for-windows-builds.patch
+ source = 0008-MINGW-add-srcdir-PC-to-CPPFLAGS.patch
+ source = 0009-MINGW-init-system-calls.patch
+ source = 0010-MINGW-build-in-windows-modules-winreg.patch
+ source = 0011-MINGW-determine-if-pwdmodule-should-be-used.patch
+ source = 0012-MINGW-compiler-customize-mingw-cygwin-compilers.patch
+ source = 0013-MINGW-compiler-enable-new-dtags.patch
+ source = 0014-issue6672-v2-Add-Mingw-recognition-to-pyport.h-to-al.patch
+ source = 0015-MINGW-configure-for-shared-build.patch
+ source = 0016-MINGW-dynamic-loading-support.patch
+ source = 0017-MINGW-ignore-main-program-for-frozen-scripts.patch
+ source = 0018-MINGW-setup-_multiprocessing-module.patch
+ source = 0019-MINGW-setup-select-module.patch
+ source = 0020-MINGW-setup-_ctypes-module-with-system-libffi.patch
+ source = 0021-MINGW-defect-winsock2-and-setup-_socket-module.patch
+ source = 0022-MINGW-exclude-unix-only-modules.patch
+ source = 0023-MINGW-setup-msvcrt-and-_winapi-modules.patch
+ source = 0024-MINGW-build-extensions-with-GCC.patch
+ source = 0025-MINGW-use-Mingw32CCompiler-as-default-compiler-for-m.patch
+ source = 0026-MINGW-find-import-library.patch
+ source = 0027-MINGW-setup-_ssl-module.patch
+ source = 0028-MINGW-generalization-of-posix-build-in-sysconfig.py.patch
+ source = 0029-MINGW-support-stdcall-without-underscore.patch
+ source = 0030-use-replace-instead-rename-to-avoid-failure-on-windo.patch
+ source = 0031-MINGW-avoid-circular-dependency-from-time-module-dur.patch
+ source = 0032-MINGW-generalization-of-posix-build-in-distutils-sys.patch
+ source = 0033-MINGW-customize-site.patch
+ source = 0034-add-python-config-sh.patch
+ source = 0035-cross-darwin-feature.patch
+ source = 0036-py3k-mingw-ntthreads-vs-pthreads.patch
+ source = 0037-mingw-system-libffi.patch
+ source = 0038-msys-mingw-prefer-unix-sep-if-MSYSTEM.patch
+ source = 0039-mingw-use-posix-getpath.patch
+ source = 0040-mingw-add-ModuleFileName-dir-to-PATH.patch
+ source = 0041-mingw-add-BUILDIN_WIN32_MODULEs-time-msvcrt.patch
+ source = 0042-msys-cygwin-semi-native-build-sysconfig.patch
+ source = 0043-mingw-sysconfig-like-posix.patch
+ source = 0044-mingw-_winapi_as_builtin_for_Popen_in_cygwinccompile.patch
+ source = 0045-cross-dont-add-multiarch-paths-if-cross-compiling.patch
+ source = 0046-mingw-use-backslashes-in-compileall-py.patch
+ source = 0047-msys-convert_path-fix-and-root-hack.patch
+ source = 0048-allow-static-tcltk.patch
+ source = 0049-mingw-pdcurses_ISPAD.patch
+ source = 0050-grammar-fixes.patch
+ source = 0051-builddir-fixes.patch
+ source = 0052-msys-monkeypatch-os-system-via-sh-exe.patch
+ source = 0053-msys-replace-slashes-used-in-io-redirection.patch
+ source = 0054-mingw-install-layout-as-posix.patch
+ source = 0055-remove_path_max.default.patch
+ source = 0056-dont-link-with-gettext.patch
+ source = 0057-ctypes-python-dll.patch
+ source = 0058-gdbm-module-includes.patch
+ source = 0059-use-gnu_printf-in-format.patch
+ source = 0060-mingw-fix-ssl-dont-use-enum_certificates.patch
+ source = 0061-mingw-build-optimized-ext.patch
+ source = 0062-cygwinccompiler-dont-strip-modules-if-pydebug.patch
+ source = 0063-fix-using-dllhandle-and-winver-mingw.patch
+ source = 0064-mingw-add-LIBPL-to-library-dirs.patch
+ source = 0065-Add-AMD64-to-sys-config-so-msvccompiler-get_build_ve.patch
+ source = 0066-MINGW-link-with-additional-library.patch
+ source = 0067-install-msilib.patch
+ source = 0068-dont-include-system-ncurses-path.patch
+ source = 0069-fix-signal-module-build.patch
+ source = 0070-build-winconsoleio.patch
+ source = 0071-expose-sem_unlink.patch
+ source = 0072-cygpty-isatty.patch
+ source = 0073-disable-broken-gdbm-module.patch
+ source = 0074-link-win-resource-files-and-build-pythonw.patch
+ source = 0075-3.7-mpdec-mingw.patch
+ source = 0076-disable-readline.patch
+ source = 0077-fix-isselectable.patch
+ source = 0078-use-_wcsnicmp-instead-wcsncasecmp.patch
+ source = 0079-_xxsubinterpretersmodule.patch
+ source = 0080-sqlite3-module-defines.patch
+ source = 0081-configure-have-inet-pton.patch
+ source = 0082-fix-msvc9-import.patch
+ source = 0083-set-venv-activate-path-unix.patch
+ source = 0084-venv-creation-fixes.patch
+ source = 0085-pass-gen-profile-ldflags.patch
+ source = 0086-distutils-add-windmc-to-cygwinccompiler.patch
+ source = 0087-pkg-config-windows-must-link-ext-with-python-lib.patch
+ source = 0088-importlib-bootstrap-path-sep.patch
+ source = 0089-pathlib-path-sep.patch
+ source = 0090-warnings-fixes.patch
+ source = 0091-fix-build-testinternalcapi.patch
+ source = 0092-extend-MS_WINDOWS-flag.patch
+ source = 0093-clang-arm64.patch
+ source = 0094-MINGW-stack-reserve.patch
+ source = 0095-Add-support-for-Windows-7-Python-3.9.patch
+ source = 0096-Add-CI-to-Build-and-Test.patch
+ source = 0097-Don-t-use-os.pathsep-to-find-EOF.patch
+ source = 0098-Fix-extension-suffix-for-c-extensions-on-mingw.patch
+ source = 0099-Change-the-get_platform-method-in-sysconfig-and-dist.patch
+ source = 0100-Add-a-test-to-build-C-Ext.patch
+ source = 0101-Add-some-platform-related-tests.patch
+ source = 0102-squash-CI-use-O2.patch
+ source = 0103-squash-Fixup-.rc-handling.patch
+ source = 0104-squash-Set-MS_DLL_ID.patch
+ source = 0105-squash-CI-Clean-up.patch
+ source = 0106-squash-CI-use-srcdir-builddir.patch
+ source = 0107-squash-fix-srcdir-builddir.patch
+ source = 0108-build-Cleanup-ncursesw-include-lookup-code.patch
+ source = 0109-tests-fix-test_bytes.patch
+ source = 0110-time-fix-strftime-not-raising-for-invalid-year-value.patch
+ source = 0111-winconsoleio-build-_testconsole-which-is-required-fo.patch
+ source = 0112-Adjust-Py_WINVER-for-our-Win-7-target.patch
+ source = 0113-ctypes-find_library-c-should-return-None-with-ucrt.patch
+ source = 0114-build-Disable-checks-for-dlopen-dlfcn.patch
+ source = 0115-Fix-install-location-of-the-import-library.patch
+ source = 0116-Set-MSYS2_ARG_CONV_EXCL-for-the-shared-Python-module.patch
+ source = 0117-build-Integrate-venvlauncher-build-installation-into.patch
+ source = 0118-Update-smoketests.patch
+ source = 0119-CI-clean-up-the-build-enforce-some-tests.patch
+ source = 0120-1-2-AC_RUN_IFELSE-replace.patch
+ source = 0121-Add-return-0-to-the-test-code.patch
+ source = 0122-2-2-AC_RUN_IFELSE-replace.patch
+ source = 0123-Make-sure-MACHDEP-matches-sys.platform.patch
+ source = 0124-CI-add-a-cross-build-job.patch
+ source = 0125-Revert-Adjust-Py_WINVER-for-our-Win-7-target.patch
+ source = 0126-Set-_WIN32_WINNT-version-in-configure.ac.patch
+ source = 0127-CI-cleanup.patch
+ source = 0128-Commit-regenerated-importlib.patch
+ source = 0129-CI-clean-up.patch
+ source = 0130-configure.ac-default-to-with-nt-threads-with-mingw.patch
+ source = 0131-configure.ac-don-t-check-for-clock_-functions.patch
+ source = 0132-CI-clean-up.patch
+ source = 0133-smoketests-update.patch
+ source = 0134-expanduser-normpath-paths-coming-from-env-vars.patch
+ source = 0135-sysconfig-fix-platlib-purelib-paths.patch
+ source = 0136-smoketests-update.patch
source = wine-python.sh
- sha1sums = 6ee446eaacf901a3305565bd6569e2de135168e3
- sha1sums = fd5dea1f6f0a887cfdea90c40de3ff327a6b12da
- sha1sums = a024e7fd7eea7984a0d050164a4a015dea762da7
- sha512sums = 22faec84f6e172e1ac7c6bd6fd37e9b6ae4afc91cf5136aa8cac8ebbed8d18793f9196e8749b8ccc43447cb6c41cb450f65ea72dd363c06dfaeb14e0455f5560
- sha512sums = e6dc81c167c733cba70c6a39530c002d3fd5c753b5b9c707973da27b66b4cb5c3a186bed9834de269eec6e763c7731c3b7aec2bb8736b26686bd89de76127073
+ sha512sums = 01c529e3207738d8771caeb5ed6217e10745c21aa39832fe3185e1c87fdb6aedead97ce38dbb11e02d873654028bd8071c3f345c18452769520723284efe9dc1
+ sha512sums = 2f1e91391db0f50e7de5562b9166a83b326c9a6f875011d1c503080f43498a0368c50dab07a655fedcd452ba3f769ee695e3253d2fe541cb29884efdaa4993c2
+ sha512sums = f459f75f47ca756cb8bbe411762c733c5d02382d74d68e57b3a54d8eddf405cfa1e55c2ec45773788aba829e9a9548567557c0d2d306b941f2a530964a07e5a5
+ sha512sums = b06ede9530d27583a8d3538b042ed94fe6f29c16d2f1990d1b6763d7ba448ef721accce086529f84b6b5086ddc6aea1c7393b8e1aaa3a42942cd67619846739c
+ sha512sums = 1b2049a24a539ce4b7ae9d066c5624f42f05067b3a78753f583dd98f02e0455cc5f68d76e09ba3a9616719138533c08fbde598e7c83a93923d67dd018a45b763
+ sha512sums = 80bdd16b5142a244ab2ceaffb50ae3a1b7b93977def05b6dd244e101a1701f2cc01357e1e756c8c548192141247c20ef198789e6923ce5751062eda2ed44da62
+ sha512sums = 181ee229d2b64a6305ff00263b574f1331ba02613ab6a9ed502659a960c7beaee161cea003adef65dcacab4cbbb600668756ea1b87fff06401996f455f950573
+ sha512sums = 0b5e951bd433998a0ceac079aa40a67a0d0ba1679fae2663999eef1024fab5daad5ad67b8e091172aecf0761568b97ac804e51067d83db57b9ab6445562c0737
+ sha512sums = bed18d78b11615ada2063b6246fa501e63dfec5009dd5ee316a39ca6a927fc095762399ecac5c7fb043af4c9a008b145b61ffd7f02b41dbd58a1a9342d1bb202
+ sha512sums = 2981458b0e6448305f3da4e2b328e666f93495216fe72fe21572af1fb945d2da68318789b7c0d5888e7f255c10c041e98758fe17db58a50b269b81fa00e7591e
+ sha512sums = 78f54dc07100bc0cd7ecebb7b7976f17dc959a8c894e32e48a04419eddc04b290e7fc25ec3db2c6da730046d5e571bdf2e64c63dbb8569a7a14d36543d13515e
+ sha512sums = 18244172a9adf349710b8851eae7667926defacb21534ec085b280648effb402e997ca496a52377f8bc10124aa2f8e611f23399cabb719d7493033547b6ad671
+ sha512sums = 0d7354a0846c2c5e3975f7c757b4c3d30392bef511036416c09c43290ca4f34c506d50bb9e59bdbe0ab29b1757b62767b3cf095c5e5d5cf2eae15583674dcc55
+ sha512sums = 444cc70ed2a0ac37f82763ecdcf2024d480e6631583b64fbb34976a5b9fff814b61816f681ed4baf24094ddeb81dbffdc68b0342978a5b5f4eb0d37bb3f0d7f4
+ sha512sums = 16a290ba51c53e902f71b85e8b4bb4f65129b0dc61a571e71c8cf9352307700ddbd6ca9d891c74224ff56eff795face7d228fdf60db3015f3ff61c2e6ce80673
+ sha512sums = 8b99b6332e12d2f84c3f21d90b7ab946a03fba80cf0cee068bc1958a03514db431971ec7db158f5db37f676e6159e50d60fad07f7d6b303c2852922d4241163b
+ sha512sums = 014c379e92eecfe2e22888f039bcb5f26d9c23e33ce29e3905e6d3cec2792de71919a1f6517d528820c7babac163b94bffd684a0404673943335e7f9e61132b2
+ sha512sums = f4a97bd111607c7dda2b0b62dd93c137de89e49c1e2c782efca02a1c0536bdc20b9537c1f0464e383e0e1b29d76ad87470b8bb55ad93725d9075bee36dcadb1d
+ sha512sums = 78db3161f0810c823732302046338a341ee50601b3b6eb9a1eb72f13dc2789eb84c5d8e4c2d9812921b1b7c480c070e1dff5e1bb7236cd278689f200663a82c3
+ sha512sums = f1c5021498addfc076837d94f5ae240cf62a17c9a04f7ec8c9929a25a02fedc0f975f56155be3aa79aa111fb6c01e96b9cfb2a75a81add576884d13fb2b220e6
+ sha512sums = e90da0b8787fdeb9b0c9dc75134e18d23ddbcf0da667402ba80cd43956ee3dc5cc2ffb62a0ff980fe50bb8e7a617a018bc6ba93adffe8d70759a0020ff65749a
+ sha512sums = 32f8b63d344b9438df8794bd76a4d7e95ce25762c2eb1ca9e2b1eab084386936b09b6ad001d8affdac4d6600143ecb043870ec65c20251f05385e3ebcfd2fc67
+ sha512sums = 53ed9e2b211f025986e69da484c2583848822ada0dbfcde01f16202a15a5dde133a4df74d7f900642ad7893d79ece91ab75cb7ec921889dc0391fcbb336d6715
+ sha512sums = 8a7f0c3e7659210618d10d942ba5efab3aa403accc9d360458ad333d7f10656260145e9d0b2588f2cc26f1b2806960a688c565ecf4a9118fd4f071834fa33150
+ sha512sums = ac82ec4597561650f711bef98c94146da8caec5c8c0794d82f7707f6ce89d82dff2b55a91db2c1b778cde11de5cd7350ea57ef4ede2836fad1212ed190affea9
+ sha512sums = 081b954260767bcb49bc3f8f1f35af15d5b261f69cca6697d95ab57bb191622990ba672de54e09fc692777beb31682d49446e387cdd80b4cd280a6869caa53f2
+ sha512sums = 9cd710d2b4a2a029bb89473bfe8212cbf16368c795e45be7acfbb4efbd8a45fc01c90387c6e97a8490d4f04a0cfd34ee16aad094463d159b3aee18bc4da1da6b
+ sha512sums = 7dfd4a36f0ab554edfa6d1be2b1c5892bee41c368cc5e21e0d6126bdca040918068b63fcde07cefcf361d3afee79708ff6631c3f886d85e3b5b60b508a0e67ba
+ sha512sums = a8eede1f4a2844a98be1ff5c7e8eb74b36c8912af9c2381c80e8ec2c19136aed541f3dd4e22de7dd8270b1b11323d6b769b876aaf777f8095aaf431948fd3e73
+ sha512sums = 166ef0748798b284fbc1aee53fe31af8115ad5de47c47ba288deda43d8e578c3e72b14a4a80df17d13b8af8a59787e84e932910840977e60a80afee21fbddb67
+ sha512sums = 99f93ac8e1f1c36e09a4bf3aa556c9fa1dc6c4019ba255aded5552950ff769776c7218d1d65b58f09cee8ed56495f841f013f2c693edb079769a62336274605f
+ sha512sums = c12a277de36c04f80f40c9dbecdb4bf1fa55dcbc393d073083039bd0994e53f57dc3fdb8ee52e80a234ed5b6be25e8a02c06675f0d56cedc201d6b6d02fe67b8
+ sha512sums = 3b5c73ef484f69ad4280078e6e017a5331b9a7f7eb76e52d0883809b5927d63b59fc70233df1bb1253c597693646959dda87112240927840015a91a3c0e53e15
+ sha512sums = 064e14df2333bce7994711ec9631c3a7a5c1dde8b6a188ac7dbe446cc17789433dafbdd7ae6a1ac9f8475bcc7ba643e76c34218c4c53508ea0b070c6abb5b3d7
+ sha512sums = 6f61ccbda6d277a7efa787a2271e98404dd1c0e70f5ba92ca36c3a5d85d1be7d278a24f5e7ec911950218d90e2e93337453f474431e76759a02dea0a95433948
+ sha512sums = bcb1d53e89548b0d146f95fd9ec82680dd3ad0b8aba1db7f6c4b576de63c45a764e142370eaae45d798e198e459ef4fe771494701c944754c3729aca4b08a59b
+ sha512sums = 6eda961b04e1ea775cfeb9fd7451cb1e6521bade46b7671f7c035ac71b9aed6388db627a8b5a4d8945261a772fb0e4b852b5c9dee75f1508509cb1d71cb23145
+ sha512sums = d16762af58a1582d66773e47426f953189415d801af8d47a6968a8e4a87a219bee763292f4ef9bf302186d149fc763841c8f6f17f462ddcde28547cb9a6150d3
+ sha512sums = c2fbfb69a4344f764318ffcb096ad13efb6c00a5f75ee226e88cd2bb90fb0017d5bfdb3fa880f6db1fa522446f64c97c2157fd886f81886904eb233286fb5a71
+ sha512sums = cf28075e8e10ecd9867b7997f6707997c3180151d228809875b6432b44e610784d8647ff3f403196261e993de9184b5f71621e9504d4f54a8c5d52bacce4ceda
+ sha512sums = a8b43befb0ef4b700c1bb22808e4f7b142e2ad0c1ddb3786f7881395b3d34e38dd7d35136c22af5e2f4051fe0d79d97ec0418748ad61eabe97175047d742f39f
+ sha512sums = f0d72cbfc2e6d1b0c93528389b7576221b8a33feeecddfc0653df21b6887ea7ba4dc549044353243e90d0628537e4af6ef890703684aed69d32075889ebd0044
+ sha512sums = 77e8a08cbc638aa6353f564be5e4fb78ee97a4c2d51c741bcb89bcd95b9d029d97a9bfa251a11b9c84f9f75c41c8327890b8c7a041dd12453094d9a41f0fd1d9
+ sha512sums = b98f8dc0b71bd57be7dcd56b28c9534f4175f0407b0eab178e7642149422045a3242ea1257c4aa949e54dcee163529b50b997774507f09fe2ec17b5401d3f8ae
+ sha512sums = ce40ba66738c5bd1494b06c6b09dd3209afed003c097c5ed3be86cd11e3325364a866fd136679ffa9c84ffc69536f3481b88d05774e06460d56543c116735c79
+ sha512sums = 578f1c76f928a1f7a1946830f04b9ebe725b8df3d47d542d48fa1c53fd6a3b862208d481215a750113ae11f0c6762b0bbe382820e620187620410d7e8624f9da
+ sha512sums = 746e8a58e2f6552713334ef4550cb023dab177f5b53bc24cb51255e9a3d655c7734b9441e7396ec004a55d1bc2ce55c352ac394c58213964980334f4d85ad81a
+ sha512sums = a8c13e66d90fe8c75ce146890b38435de0e85984c64dce1e4f118c5fca63efaaafd23911dba1a3f0c8f5a826603573c29ad5ecdadfed2beb436afe67b5ad7272
+ sha512sums = c9ecce52a554955bc62f6baa5d9f2317bf7ffd486182f287eaac401b7216ed6ba00e1a28f7d47991c77abeb43b5fca3f7d33b2b95c4a41b4218bb2d84be275ef
+ sha512sums = d7c5cab9f259d68e75852b58a64c05249c152531a7f89170a22245d22e4b8aa10790f41dfb9aa3e3ca8e0d93bfb310c52d74eed33bc0e6abac6977d2b2565361
+ sha512sums = 43cd5f37bafa14a4b84d4941fced1d8b6ce93197b33bd674abd0a0ea846eb5c1bd0eda1807b1b4c5de392bfe592769eac7dbcd67fc1f453f72e6bbc2724c2ac0
+ sha512sums = b04d2bc12d36dd0a6846f1394e0f2fe5c33cd4fe1edb0fc946ea3dc3ea2654678a7e01de7c10b28f0fb91350b5a9369caf9d86b2f3bea7d6ff26345374106249
+ sha512sums = c421e9a8feba81910d99c8d9a65615d267ca7e4ba0e15a9c0fb8fbf989e923d56fddc2e2e81febf0f21eaa095d4d74ba7022bcfb8b7bba724b190ea4f14fd14c
+ sha512sums = 3b238801ee5c3262dc00dc78339ef3d1f8d0526265d2a1c772416cd0fdbbd75161996a7c8959c36a6711a5f88a4cdc215c374d2a5fa7380c0874e15acfb1d356
+ sha512sums = eda88a2aad8f7cbb47d936ce305c03313355a7e4f17ee3d4f476825d96793f3b362a58b4ec3867e6196097dfea02b577e169e1acd2cbdba241642602ec96233e
+ sha512sums = 19ccbc8ee9e7cfea54df995327e76b4a5777e061f12ebc01b8ce6383b615fd8a656c524ddfbfc0ed03b3b6eefec2c2783a9cb319471f0f59fb17dcc4a6a7d457
+ sha512sums = 5b8ba80290c1f0abf5185be70887bc919f4fd4b304af88de22603a001986054aba91467310532e9997b20887698a16c4939c5af6237f93603999bc8f29d7ae21
+ sha512sums = 7170a09d2e4f5393750f0b3aad92816c2b28fb79036b7fb97b90cd907ba63373e5c745cd246ff357e55274de633f2382242ae285ea3a4d4c6cf589e7dda1d849
+ sha512sums = 72a6c7978044534cdafc8a2ab0000ebc740426943728911084f216255925fcb045c1596190c391b23be23385bc821590314d48db73eeff019219e5b48c66068b
+ sha512sums = 5166bcc2954aed6ff6097e087fcaf6704d4e24237e80c7ae78f6d3c19fe1a74c64d4282797dd93f2b9656a7e6f01b515fe5e50c7382a2ba70d1f2c0f25de60b1
+ sha512sums = 2e3d828e7aa06596a9248ea39e7f2dd75f0fe438474fbacbc6515bf529197e2bab55846cb0023a8184c01329c4fb22a0a3cc76c9618281699efc40e6d58c93de
+ sha512sums = 91ea233217eb507dac62f5a23a33b89b8e042116bb83c4a5b23bcb88a6a80d6390a1bd5e8cc9c3d6432bfc8d9f8f60bf8876863b6e4b0941ad7e42c279a8e7fa
+ sha512sums = b4dd7bbff60416cf94b8d7341841ca9a5c330345c71202eedf2ea7a1d9500d232d678d334d00375d55041454de286c746b21a9181ad06c8991d4d59b503b437d
+ sha512sums = eac1bbc8d254d9e25265601e3604d66800d18c73669f8f0babc8fde516a1268ebea9b57c6daffff54d51c5133c82158347798437e032bed6823f47a3b669fcc0
+ sha512sums = 61a615eefb2202d194fb2295193f8794f8c5087a6156f5dc0ba6b2dc8bbe9d1a330b9ea760eb5981daf20553a5976365fa598ed38b25e5bbce83dc0827e22611
+ sha512sums = b87952f51881854f841191e58199813f93c5464239af42b284e28ad1701491f580720f70e82e4e6bd373446461850c36033c04466708244f34397c73924af929
+ sha512sums = f7a60f1bdcac0dd6933cf6a08ef049c058d782043fde3d5ce0437955d73e3468ffb2b1a6b7a4da1e4f7fe5354a0c8d96e757848bde234e9b9decde53dba4cd33
+ sha512sums = 48facfcdbcd8ad369c709f72fd6b61120112ea5de400eefc4aa8a2bfbbca2181828a4ea54773758b82bea46a349edbba8085065590ea3661f3266e387996cb25
+ sha512sums = ee04223922c59ceb235da46ab5b4b043d41df67f55151eafb177d412ed5b810366b76c755c1d1e9beb312e42e559e218af071f0b8f1d5fcdb8299047ee7ff9b0
+ sha512sums = c121a0873f1adf03e5ba80c23400f82cf9d9ff88e5925e3eca6e9749b56dc3ade2c042db5fe9a91d31995fe7d1a1ba0b89c0a71e11eaf603d8a5fc1fea525a68
+ sha512sums = de2020961d20072cfd05ff04ad05217002d65ff4e1a24e88379d1c9fdb73da968556b7d76920acb93ef752e9077b5798f90172ce7dfb56514b0f5aef09029d6e
+ sha512sums = 6d16c467992bbb320f1ba6c7866dfa6bc5030aece1c5e09e3c088636e0e9460da3b144017c09dc06d8aa82a37237e3cc5b918d861d267780a8e0e92a54c22b53
+ sha512sums = 63202ee776cade95088a53781022ee049e3ca983d1d2462ffc8170376b6170ad783f51de3936695b319ffb24d439085461f94b354b3616948b748e2f3c039c3e
+ sha512sums = 5c2990028fce9093b4c938606e765827b4b516bb585537043bafd5278a406e4bca2f94964fad0811137f8d63a853c5456ac69823cef49c2cee8062e82557c4d9
+ sha512sums = 75e4fbd7d35c7d4382c0f92ffcdc766d11821e429039cee3976a844ea4cb9b0dba7e18db987aa6c16cf12e2c4aec9752167b6d0ca29145f56fa685ecbae519d3
+ sha512sums = 2e8f8ad0c7abd63c1954d568e10816b47bb4c7a51c8238a247749f823e140447d859e2cc3c937cb1a5c29399a40a7a9f595e5a963c3b8b75e40ea905eb72ac9e
+ sha512sums = a621483763be5cdcb7541b92028563f63ae1e0094a69e04b06723eefdd5758b2e3fc4641418b33944abfa4d194115e1302573b2f6fd54582d3a017fa05281c2b
+ sha512sums = 4f061b1efe7b6beafec882893bfb2d39b3d84cee8a9fce8d1c0d57e7d9792c6f8ae121ed2e05f6f8156a36b3c6f4b4bc44453476b510a5b6a14119f40e0a05ba
+ sha512sums = 7f0e20f2faeffb95f4b4d2c6e8863a210bc5daffed8cd78ba1622b4b4ba390d7532b89dec5ad42514072541374905891c7b6d16ace61f2576947c167c582deaa
+ sha512sums = 35e1a070c7361b99e08cc7440098d0cebac085a4542fa20ee811294cbdb8542269ef78841e86e44daeb6fe35580e637b8dc3caac7fb7c114e73727fb27e7d633
+ sha512sums = e7f831c99ff8384bacd10a649e5fa6ee7926f06eeefb6fc6ee016187808cf246948dff17b005f52fd295035a79d0d50604b7c22992447917c39e724de5ed7208
+ sha512sums = 7af4894b4fe448c2ff58df17f6bebee3c058e99618bc678a9270d20e6b93b8b8d6f8e58c1478e52f77a0b6ebb5d4829e3cc1e9f6becf3cbcc48734cb53096329
+ sha512sums = 5ee924adca6ebc77562cf9353a7c810d4cb8f9c4e1a22eac7d4cf25975e9372d7e71b8a7bdba82692a66b7d17307ff5be7d10965310113737a5dde535446f667
+ sha512sums = 0676b2c4c8e5e076f44feb3cc62eee656376903cc18062dd8adaeaa33c5c5bbc678384796740286b3049aa1d2e543c445f1718fd30e9b7f49e6071d2532d9110
+ sha512sums = 3149f70d0a8b0d1992b057c6416e915fa387d9880ac7df46ee0613d9e02610ac07ab52d64a2548a259a2dcebd327b801e0362a5b27e3f7770a3ca6e508a8c106
+ sha512sums = 9d80879db19f8613d04e0ff15d2ea572c59eaf3c9a999350943b7db34afb985da2e7129468c56584f307ce291ebe7b86d2311bc0d786127f2e227f7c78287426
+ sha512sums = 25419951979253ab0d78711146285f7e5c85683d7bcafd474c752530fc3d380e920d22f2faf0571059388a011a890c2214d91fe0bcb31ae6f0ce131e1bcdab50
+ sha512sums = f9109a1973a99082c19a55b061cf08a483890db92bb2232d90f9b08ef56c9dc5afa084088b31a04ca30e85c32c9793e21c9757106d822f81b62574c3c9f0a8d6
+ sha512sums = b02d032b27d85b820bb2cb11f409f4e57d15e8f32603ed10f0691c6fe71d496b18cea96456e2595e0b0a41e45c798504b079842745082b392bc6e23313ac0738
+ sha512sums = 6f4f7aff59113cb17f07f4af062d9388af490f6bb1fb4ddbbfebc58ff390113b575b08ff6a7267092345bb5a335749fb2f763b0979d8cee5e3a0c905f06f433e
+ sha512sums = f66dfe7cc661d46509003af8aadf0357272554cc5d0a6f102fd59cf1f3888ea38e5d37a40acb5345677120a6393ed054bdaa97fdc27fa6a5b3b683bf462d2791
+ sha512sums = 4dd44f7136f9b7dd4ff32853ab6780a0f7fc99731f8c67ba67bcefc01d17473d59f0f1760fe71832ffe0307b4b2eeb3493b4edb507fc1ed419c47dcd08f65b56
+ sha512sums = a7a41122ea5af5148bba296b6fa20e59443ede8a18cf6218a31c1d3ebf09859d10172f3dd95b4080458d0de1dd3a1cd1b1564cb54527e388818a9c7d4c3f3b2a
+ sha512sums = e8c9ad4bf41530f6015113e42f0fedb05b746f6920ffb73c26620b6db298fb4bb7bf64baff52e2d054b2ea4d1efb39a164c3973b0aaf82a7abb23a5df09a9a75
+ sha512sums = 55b695b99f837449338884cdd64185a68bc8e80c8315548c7aff35ee81dac858cece895cecc1a206edd9eb50b003052dcaf84b1e6b49b7f44669d09e365f58d8
+ sha512sums = 06bbce5be2330ef8e1a3723b227c84edceca7cb421e80484b66053022ac0ac2b7ef3be634bb037bca4f969866c0c910253bfa347b93bc652e3655df6a6b84945
+ sha512sums = 05e6eefb297cfdc8562388305a8bd8ac095a2566fe26bd47b92e43d2c65ceea48ce36cd5bc091a7a2748d3e8a71010bb7f8d9598fa76a15e3a940eca82f2bab2
+ sha512sums = 826b307d3f51b4c9fad52dc51475ec283523a58f5e4ed599d1ff2db7ad2fed6bd7601dfaee6a84939fc40bdea2918c7a0375d5557b4d31cd2af78c750df203e8
+ sha512sums = ac201bfd778e8206446cd2084e9971bae3133b8a86fad8b1ec0391e4435f54d464300e8d693153ab3f490e053725d00edf8f24848ede0511f28a041a166f8694
+ sha512sums = c8f086c3ddaa8761ff84b165bda8f72796580b79064e74c53c133273c5f8e4eb0ce426174a3395bf402e6a0bb4f481e3ced82ed07fd8de1c30f06890fad1b85b
+ sha512sums = 4e8bf98ec7ee79766aca2ddb65973fe48916a84943b6531683dc0e8964c7fe93afbe022b5188e11e22645482d91ce64250e183ba82ccf23f68e5776b5ace01ad
+ sha512sums = 6d174ea91cde2d45078a639e99921056e88f9bd5bc5ec0e037b62655cb4cc798fa55c392b789e6c8ef5ffe914eecdc0b3a1d2878d619ba430b5781a634b305fc
+ sha512sums = fc6583dabdf7558879e5c9a2c2da86d91bcfa39583aeb9dc3de9fe70f69f2945ab9b149f13f024b2103bf9b3da7ac87e679167d3deabe87213da839760b73e31
+ sha512sums = 09413a07437cbe8e5929a23b0317f315e1807750abeba0c809e50ff14953db445d69a88b263efcde267a16db79add7870632e5f70411c98c22af97255678238f
+ sha512sums = e8902aa546ead9a05cba7b5725351af6336f97588b8c73b00cc7bcbd79d5b0358e9d731a8e2b1164d289569cd093bd198f21fe923c51cdd66e15f7341d3e2c43
+ sha512sums = bc3b8bcb596335205b925af5df58625095b896b74504c203c1efdc5fa7ce7e2b0f48241064758f10625a8d340328f34ac0aa6efd4f062afba76897e3449955d7
+ sha512sums = d30dcaa9a11cdd0b3908d209432409e6d46ecd9f8c83d10ba2c016b5fbd8cc74b14d97b20e236149ef6cc8b7c449ff573f65f63e33a72f13c23593a2773d39d8
+ sha512sums = 953f26172c0e0b5dc63fe3e1f4938cdf1f753be8e0b907e3f8934e76ab09dd705c28297da7b049ab01b2b0a939ab522d465408f8fea6b0bfa997972259a2c113
+ sha512sums = e14329c3f63edb2547a92063e4fcfe6622431ac1e0bbcdab68a4523f5faa30d817574e786085b08791f0d2ebcd5198f7d29f4f8c5748f0a87b8798e7dd5bb974
+ sha512sums = f5a1f28ea40fcb422fdeed18d284ecaab69a45569eda1415d976433e6f50fc0f6e1dfb8b0ae4f074cdd6ccf53d6b0999798190e0a953a13d0d93a5c65a3ebfa8
+ sha512sums = 5246234f40c23cd3bf3d132692b6ebd25e5a2af1aafa59c34c99c8b93baa61c3dcfef3ab2dfc53c52c2d6962bb10616dea42514d88e341c5c48be0cd9b66aad4
+ sha512sums = 5020931d834735c3c998ff12f9b4fb876cf175b2405b6a8198ac237960fb68f81a7008bd1862721cffc72e06dd91f76636e68792946bc0a3e7f0cb7e4303a8c9
+ sha512sums = d8bd4a4499805d967d334e80732c1c674f7b7d4420a821b5bdbbf096c9160c081d843e7c7349a64233d3da5bb27fdb3e2fdda11570f2c1c4e08e6e773325516d
+ sha512sums = 4fd4e90a56ea415f6dbd17b1833e2fc3bf4679d9e158109d9695382b0548fce8de37346c411de074c4075f49752ce36cbad9abf0f17c5a282f7ea1b07f2af6c5
+ sha512sums = 96c0b3e4ef20ef29dba1d099e7b5152c3593c746aa05d2bc11b2694f63627d810602fdb90d6e4f769dc847606d565cf9317f3cb36ff74ff1fd1de71316127c01
+ sha512sums = 02df218e0232fb31cbb41ad0da855e8b09b142bfeeb6a6fa73d36b14d4024483b173f39d027e84db8597ec1d647a348902c54e98a80873dd49b0c0319fd3b181
+ sha512sums = c453f43af49a3ada8017ff9c295dbaa3c7360c508fa792d9f110f7913c5642cb0adb5b6d82c04ac4faa31dd93ff43e7d9ec5015adf4008a158626b07cb4e502b
+ sha512sums = 4f262b536d0751b643e879808121aaa95d1300ea47c6e7e6c0727d392902704eb943242307845030434fdde2b868c29f3728acb76222d3d98ccfdd0ad509766c
+ sha512sums = e123b44352e247cd4c82a01c36c8a356fb2a395c98a853ac4d5451e2018468092cba969db76bb2f7832397365c75a6cdb6dbb4f0e2b39c273ffb3b39874a657f
+ sha512sums = 649b42db20470c194b15b03c56e73b6170b8d2d30624135e2949fc9c0fcb96dc8b55dc676559514ca9badd662e900558c274d1c8c6382833ec53ac1cb7a486df
+ sha512sums = ccd84813417ef7d9230a794a4e0eb778a236f6d465a999143429d25b0ad65546faf983f2b52cc192204453c25bcfff7fe33816b1cca0e0b81f52892e6038aa5e
+ sha512sums = 8fe2a5536d144e70b3858561dc19407eb1672aa905eea724f0f8140097659e7c016928b500810c0e5f0eda2d7a1286bb5ffe4501eb9734e26438c6225655b5e7
+ sha512sums = 1ee6f2c2e3d17876fdd28d4a4e311eba9d45f145a1b36b0a84ebf1a1f1ce90807bb76b7449cbe8de21aa045b43c0b4e4f8968f160d74dd74963f7930b47f9c81
+ sha512sums = e49bca267236c7b543c0839d9ac751c23e82947f9df6de9d758c1727d48e9ff8843c2a2f4f94101fb19e33acc6457f72fa9a59f3f4e39e5ec10feb6093732409
+ sha512sums = 6fbc925a94e7343688f38ed2d226e17cbfac82b9cd604d15272e51adc6f1133b9804b53f24921315696031fe9fcd34264242d7808955b714c0ae9025999dd338
+ sha512sums = a9a9422062e42b4ae14d0f7edc641d6014e1c574e537c804f52a61efd7843ef1214a2a462ec1da14f9ed2c03c12607d416d62a4b4873310005f6589a48568527
+ sha512sums = d5b5d32201bafdab4aa82ef5920c9e514b3e52f2d7d05385ebbb0101ebbce382ce8c55522a687d4c896cc4665437b4634da9ed0180661a797c644850d47b019c
+ sha512sums = ec8bbff8278e0eff0f708dfaf6fcfc303dcd99dab7fd343312f593d2e8d8794901578e5a13150a21cef02841db76b486c48c01a126b8717e812d77b094e62d43
+ sha512sums = 6d0be15d5feea6a8e46e892b9b5db2af47d0970c829a6895486c49a0a1aee88adebad54c2ac84dbdb78a80ab05270b7f2744064260c3b96fcab8d7629f0c55f9
+ sha512sums = f6cbed91352c29d618f529cb5ab79ff0acfd236e755641aaece309695e7dac05f4c6beb49b6e54921fc6eb21b22495459cd6e8a84e344e5a7ec1b6314bf1251a
+ sha512sums = 7cada3319b02a338c5f32eabe99be0f9ea35412759614f31ac77d310d6848a6b938143744d40d07721241d438d01781b456bda1781bfb37d4839a540b600458c
+ sha512sums = 64d9a43b1ff38813d567f1c2a5ac48ed72907e1438e76188bdfc22bc463eff887f34f5d1ad524aab77d61e358e5b87ed6f05bd9e9e46d66c03cb7e3c0c980ca4
+ sha512sums = 40852c5f7a2e0cff440ac61cc8d1dd53d3c4641abcf12ba8c87d5a804161c00c7820cdfdf4d3853a145915e0bd2a428a8c868d58bff2377f38c979bd8eb99a55
+ sha512sums = 79cd9bfb6984ae69560c71dc886adc272688871d95a9bb01da2b154671240b1fcd5e837396796d75a9487803d88cf7af484f932f3fb56402f5a2c7dc3d8e463e
+ sha512sums = b4e6018ac6b546bfbc1b788e20192615eb2f184b209b85e2209cf5976f74cd15c9a63c727455d1ca0e6e1cadc36a908b3e4a1a7efb5b0e453e1f562b4bb9a5e4
+ sha512sums = aecf9e0a168e58db338c0ca12830c42d279b77962735b69c1b2f7cd056e7d2cfafff565e3bd5fd3dca26fd30b3d4f83760a6f191155f7c2a8592934b882a6ec0
+ sha512sums = a2d924fb4c87da54b79549a2d77116c2f29fde7b5ecab059dacc83e0deeaf2e78325cf7d7d97047c85bc66afc672c95da2b83504bc12b0aa1500678af460852b
sha512sums = d0fb7f0e1a3d98a170ebea301226ad8caa7ffab9fc0bee224abc31c22875c892b43d3468dffbdd15eb71ca1b5260e039d0fceb21ecc92341b9bb6949d7e9be6a
pkgname = mingw-w64-python
-
diff --git a/0001-make-_sysconfigdata.py-relocatable.patch b/0001-make-_sysconfigdata.py-relocatable.patch
new file mode 100644
index 000000000000..119d5ccdd53c
--- /dev/null
+++ b/0001-make-_sysconfigdata.py-relocatable.patch
@@ -0,0 +1,59 @@
+From 601fde65f126300e8fd67ec491cbbbf4ecda0571 Mon Sep 17 00:00:00 2001
+From: Ray Donnelly <mingw.android@gmail.com>
+Date: Thu, 17 Jun 2021 18:51:10 +0530
+Subject: [PATCH 001/N] make _sysconfigdata.py relocatable
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Co-authored-by: Алексей <alexey.pawlow@gmail.com>
+Co-authored-by: lovetox <8661218+lovetox@users.noreply.github.com>
+---
+ Lib/sysconfig.py | 19 +++++++++++++++++++
+ 1 file changed, 19 insertions(+)
+
+diff --git a/Lib/sysconfig.py b/Lib/sysconfig.py
+index e3f79bf..505d538 100644
+--- a/Lib/sysconfig.py
++++ b/Lib/sysconfig.py
+@@ -2,6 +2,7 @@
+
+ import os
+ import sys
++import textwrap
+ from os.path import pardir, realpath
+
+ __all__ = [
+@@ -413,11 +414,29 @@ def _generate_posix_vars():
+ 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:
+--
+2.32.0
+
diff --git a/0002-restore-setup-config.patch b/0002-restore-setup-config.patch
new file mode 100644
index 000000000000..c268c922cf92
--- /dev/null
+++ b/0002-restore-setup-config.patch
@@ -0,0 +1,82 @@
+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?=
+ <alexey.pawlow@gmail.com>
+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/0003-MINGW-BASE-use-NT-thread-model.patch b/0003-MINGW-BASE-use-NT-thread-model.patch
new file mode 100644
index 000000000000..6f354d35383e
--- /dev/null
+++ b/0003-MINGW-BASE-use-NT-thread-model.patch
@@ -0,0 +1,234 @@
+From 51eb50d174eed9942b5edb3f227e1866d9eee092 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?=
+ <alexey.pawlow@gmail.com>
+Date: Thu, 17 Jun 2021 18:51:12 +0530
+Subject: [PATCH 003/N] MINGW BASE use NT thread model
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Co-authored-by: Алексей <alexey.pawlow@gmail.com>
+Co-authored-by: Christoph Reiter <reiter.christoph@gmail.com>
+---
+ Modules/_multiprocessing/multiprocessing.h | 3 +
+ configure.ac | 94 +++++++++++++++++++++-
+ pyconfig.h.in | 3 +
+ 3 files changed, 98 insertions(+), 2 deletions(-)
+
+diff --git a/Modules/_multiprocessing/multiprocessing.h b/Modules/_multiprocessing/multiprocessing.h
+index fe78135..344b76e 100644
+--- a/Modules/_multiprocessing/multiprocessing.h
++++ b/Modules/_multiprocessing/multiprocessing.h
+@@ -21,6 +21,9 @@
+ # endif
+ # define SEM_HANDLE HANDLE
+ # define SEM_VALUE_MAX LONG_MAX
++# if defined(HAVE_SEM_OPEN) && defined(_POSIX_THREADS)
++# include <semaphore.h>
++# endif
+ #else
+ # include <fcntl.h> /* O_CREAT and O_EXCL */
+ # if defined(HAVE_SEM_OPEN) && !defined(POSIX_SEMAPHORES_NOT_ENABLED)
+diff --git a/configure.ac b/configure.ac
+index 6ae56e1..005fc8f 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -2040,6 +2040,46 @@ then
+ 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).
+@@ -2158,6 +2198,8 @@ CC="$ac_save_cc"])
+ 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
+@@ -2178,6 +2220,10 @@ elif test "$ac_cv_pthread" = "yes"
+ 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
+@@ -2210,8 +2256,8 @@ dnl AC_MSG_RESULT($cpp_type)
+ 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 \
+@@ -2225,6 +2271,14 @@ sys/endian.h sys/sysmacros.h linux/memfd.h linux/wait.h sys/memfd.h sys/mman.h)
+ 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
+@@ -2422,6 +2476,10 @@ fi
+
+ 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.h>]], [[pthread_t x; x = *(pthread_t*)0;]])
+ ],[have_pthread_t=yes],[])
+@@ -2452,6 +2510,7 @@ if test "$ac_cv_sizeof_pthread_key_t" -eq "$ac_cv_sizeof_int" ; then
+ else
+ AC_MSG_RESULT(no)
+ fi
++fi
+ CC="$ac_save_cc"
+
+ AC_SUBST(OTHER_LIBTOOL_OPT)
+@@ -2897,10 +2956,15 @@ void *x = uuid_enc_be
+ [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,
+@@ -3232,6 +3296,11 @@ then
+ 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"
+@@ -3692,6 +3761,15 @@ else
+ 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 \
+@@ -4613,6 +4691,10 @@ AC_CHECK_DECLS([isinf, isnan, isfinite], [], [], [[#include <math.h>]])
+ # 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([[
+@@ -4646,6 +4728,14 @@ fi
+
+ # 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 <unistd.h>
+diff --git a/pyconfig.h.in b/pyconfig.h.in
+index 6358e56..5f63cae 100644
+--- a/pyconfig.h.in
++++ b/pyconfig.h.in
+@@ -1359,6 +1359,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
+
+--
+2.32.0
+
diff --git a/0004-MINGW-translate-gcc-internal-defines-to-python-platf.patch b/0004-MINGW-translate-gcc-internal-defines-to-python-platf.patch
new file mode 100644
index 000000000000..bf0b6159c7ae
--- /dev/null
+++ b/0004-MINGW-translate-gcc-internal-defines-to-python-platf.patch
@@ -0,0 +1,44 @@
+From 42ac5c820eafdec381202e36f73ce50b588ce8a7 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?=
+ <alexey.pawlow@gmail.com>
+Date: Thu, 17 Jun 2021 18:51:13 +0530
+Subject: [PATCH 004/N] MINGW translate gcc internal defines to python platf
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Co-authored-by: Алексей <alexey.pawlow@gmail.com>
+Co-authored-by: Christoph Reiter <reiter.christoph@gmail.com>
+---
+ Include/pyport.h | 15 +++++++++++++++
+ 1 file changed, 15 insertions(+)
+
+diff --git a/Include/pyport.h b/Include/pyport.h
+index 4bd4eb4..475c2a8 100644
+--- a/Include/pyport.h
++++ b/Include/pyport.h
+@@ -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.
+--
+2.32.0
+
diff --git a/0005-MINGW-configure-MACHDEP-and-platform-for-build.patch b/0005-MINGW-configure-MACHDEP-and-platform-for-build.patch
new file mode 100644
index 000000000000..1d90fd3be106
--- /dev/null
+++ b/0005-MINGW-configure-MACHDEP-and-platform-for-build.patch
@@ -0,0 +1,81 @@
+From fa68425708485de2cea225d6c3ff58bff6965ab5 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?=
+ <alexey.pawlow@gmail.com>
+Date: Thu, 17 Jun 2021 18:51:14 +0530
+Subject: [PATCH 005/N] MINGW configure MACHDEP and platform for build
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Co-authored-by: Алексей <alexey.pawlow@gmail.com>
+---
+ Python/getplatform.c | 6 ++++++
+ configure.ac | 22 ++++++++++++++++++++++
+ 2 files changed, 28 insertions(+)
+
+diff --git a/Python/getplatform.c b/Python/getplatform.c
+index 81a0f7a..636b0a8 100644
+--- a/Python/getplatform.c
++++ b/Python/getplatform.c
+@@ -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/configure.ac b/configure.ac
+index 005fc8f..ecdf22d 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -383,6 +383,17 @@ AC_DEFINE_UNQUOTED(_PYTHONFRAMEWORK, "${PYTHONFRAMEWORK}", [framework name])
+ # 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
+@@ -452,12 +463,23 @@ if test "$cross_compiling" = yes; then
+ *-*-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
+--
+2.32.0
+
diff --git a/0006-MINGW-preset-configure-defaults.patch b/0006-MINGW-preset-configure-defaults.patch
new file mode 100644
index 000000000000..144c4f12488a
--- /dev/null
+++ b/0006-MINGW-preset-configure-defaults.patch
@@ -0,0 +1,90 @@
+From 7c50215fdb389f4c094e15411732fe218b4fa261 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?=
+ <alexey.pawlow@gmail.com>
+Date: Thu, 17 Jun 2021 18:51:15 +0530
+Subject: [PATCH 006/N] MINGW preset configure defaults
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Co-authored-by: Алексей <alexey.pawlow@gmail.com>
+Co-authored-by: Christoph Reiter <reiter.christoph@gmail.com>
+---
+ Misc/config_mingw | 12 ++++++++++++
+ Misc/cross_mingw32 | 11 +++++++++++
+ configure.ac | 22 ++++++++++++++++++++++
+ 3 files changed, 45 insertions(+)
+ create mode 100644 Misc/config_mingw
+ create mode 100644 Misc/cross_mingw32
+
+diff --git a/Misc/config_mingw b/Misc/config_mingw
+new file mode 100644
+index 0000000..513065d
+--- /dev/null
++++ b/Misc/config_mingw
+@@ -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 --git a/Misc/cross_mingw32 b/Misc/cross_mingw32
+new file mode 100644
+index 0000000..03fde9e
+--- /dev/null
++++ b/Misc/cross_mingw32
+@@ -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/configure.ac b/configure.ac
+index ecdf22d..6058002 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -920,6 +920,28 @@ if test x$MULTIARCH != x; then
+ 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"
+--
+2.32.0
+
diff --git a/0007-MINGW-configure-largefile-support-for-windows-builds.patch b/0007-MINGW-configure-largefile-support-for-windows-builds.patch
new file mode 100644
index 000000000000..c74382900645
--- /dev/null
+++ b/0007-MINGW-configure-largefile-support-for-windows-builds.patch
@@ -0,0 +1,43 @@
+From c4ec9b26b76ebaa442ed3ae3fa10442869e66038 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?=
+ <alexey.pawlow@gmail.com>
+Date: Thu, 17 Jun 2021 18:51:16 +0530
+Subject: [PATCH 007/N] MINGW configure largefile support for windows builds
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Co-authored-by: Алексей <alexey.pawlow@gmail.com>
+Co-authored-by: Christoph Reiter <reiter.christoph@gmail.com>
+---
+ configure.ac | 12 ++++++++++++
+ 1 file changed, 12 insertions(+)
+
+diff --git a/configure.ac b/configure.ac
+index 6058002..4c964ae 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -2487,8 +2487,20 @@ AC_CHECK_SIZEOF(off_t, [], [
+ ])
+
+ 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
+--
+2.32.0
+
diff --git a/0008-MINGW-add-srcdir-PC-to-CPPFLAGS.patch b/0008-MINGW-add-srcdir-PC-to-CPPFLAGS.patch
new file mode 100644
index 000000000000..8a3d7b5e5c38
--- /dev/null
+++ b/0008-MINGW-add-srcdir-PC-to-CPPFLAGS.patch
@@ -0,0 +1,43 @@
+From 8dbbd779f9d2b7d01bc143deb70f3e522978f0b8 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?=
+ <alexey.pawlow@gmail.com>
+Date: Thu, 17 Jun 2021 18:51:18 +0530
+Subject: [PATCH 008/N] MINGW add srcdir PC to CPPFLAGS
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Co-authored-by: Алексей <alexey.pawlow@gmail.com>
+---
+ configure.ac | 13 +++++++++++++
+ 1 file changed, 13 insertions(+)
+
+diff --git a/configure.ac b/configure.ac
+index 4c964ae..f335c48 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -5642,8 +5642,21 @@ do
+ 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 Parser/pegen 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
+--
+2.32.0
+
diff --git a/0009-MINGW-init-system-calls.patch b/0009-MINGW-init-system-calls.patch
new file mode 100644
index 000000000000..c7a18c9280b3
--- /dev/null
+++ b/0009-MINGW-init-system-calls.patch
@@ -0,0 +1,124 @@
+From c6e239410fcc24e73eb239b391b5670f7ec41c2f 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?=
+ <alexey.pawlow@gmail.com>
+Date: Thu, 17 Jun 2021 18:51:19 +0530
+Subject: [PATCH 009/N] MINGW init system calls
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Co-authored-by: Алексей <alexey.pawlow@gmail.com>
+---
+ Modules/Setup | 1 -
+ Modules/Setup.config.in | 3 +++
+ Modules/posixmodule.c | 29 +++++++++++++++++++++++++----
+ configure.ac | 8 ++++++++
+ 4 files changed, 36 insertions(+), 5 deletions(-)
+
+diff --git a/Modules/Setup b/Modules/Setup
+index 02cfb67..6b6926d 100644
+--- a/Modules/Setup
++++ b/Modules/Setup
+@@ -101,7 +101,6 @@ PYTHONPATH=$(COREPYTHONPATH)
+ # 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 --git a/Modules/Setup.config.in b/Modules/Setup.config.in
+index 5c1299d..9b364fe 100644
+--- a/Modules/Setup.config.in
++++ b/Modules/Setup.config.in
+@@ -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/Modules/posixmodule.c b/Modules/posixmodule.c
+index c984e2e..3f3e1f3 100644
+--- a/Modules/posixmodule.c
++++ b/Modules/posixmodule.c
+@@ -310,6 +310,27 @@ corresponding Unix manual entries for more information on calls.");
+ # 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 <windows.h>
++# include <winioctl.h>
++# ifndef _MAX_ENV
++# define _MAX_ENV 32767
++# endif
+ # else
+ /* Unix functions that the configure script doesn't check for */
+ # ifndef __VXWORKS__
+@@ -410,7 +431,7 @@ extern char *ctermid_r(char *);
+ # endif
+ #endif
+
+-#ifdef _MSC_VER
++#ifdef MS_WINDOWS
+ # ifdef HAVE_DIRECT_H
+ # include <direct.h>
+ # endif
+@@ -432,7 +453,7 @@ extern char *ctermid_r(char *);
+ # include <shellapi.h> // ShellExecute()
+ # include <lmcons.h> // UNLEN
+ # define HAVE_SYMLINK
+-#endif /* _MSC_VER */
++#endif /* MS_WINDOWS */
+
+ #ifndef MAXPATHLEN
+ # if defined(PATH_MAX) && PATH_MAX > 1024
+@@ -1521,9 +1542,9 @@ win32_get_reparse_tag(HANDLE reparse_point_handle, ULONG *reparse_tag)
+ ** man environ(7).
+ */
+ #include <crt_externs.h>
+-#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 --git a/configure.ac b/configure.ac
+index f335c48..19c3ec2 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -601,6 +601,14 @@ then
+ 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
+--
+2.32.0
+
diff --git a/0010-MINGW-build-in-windows-modules-winreg.patch b/0010-MINGW-build-in-windows-modules-winreg.patch
new file mode 100644
index 000000000000..63e63c3c0a1b
--- /dev/null
+++ b/0010-MINGW-build-in-windows-modules-winreg.patch
@@ -0,0 +1,79 @@
+From d00c155c97977adb8109f0764efb1100d6079800 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?=
+ <alexey.pawlow@gmail.com>
+Date: Thu, 17 Jun 2021 18:51:20 +0530
+Subject: [PATCH 010/N] MINGW build in windows modules winreg
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Co-authored-by: Алексей <alexey.pawlow@gmail.com>
+Co-authored-by: Christoph Reiter <reiter.christoph@gmail.com>
+---
+ Modules/Setup.config.in | 3 +++
+ PC/winreg.c | 19 +++++++++++++++++++
+ configure.ac | 7 +++++++
+ 3 files changed, 29 insertions(+)
+
+diff --git a/Modules/Setup.config.in b/Modules/Setup.config.in
+index 9b364fe..612cabd 100644
+--- a/Modules/Setup.config.in
++++ b/Modules/Setup.config.in
+@@ -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 --git a/PC/winreg.c b/PC/winreg.c
+index fd1ccb7..b6f1a8f 100644
+--- a/PC/winreg.c
++++ b/PC/winreg.c
+@@ -17,6 +17,25 @@
+ #include "structmember.h" // PyMemberDef
+ #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/configure.ac b/configure.ac
+index 19c3ec2..e307fe3 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -3326,6 +3326,13 @@ else
+ 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,
+--
+2.32.0
+
diff --git a/0011-MINGW-determine-if-pwdmodule-should-be-used.patch b/0011-MINGW-determine-if-pwdmodule-should-be-used.patch
new file mode 100644
index 000000000000..58ff71c09b20
--- /dev/null
+++ b/0011-MINGW-determine-if-pwdmodule-should-be-used.patch
@@ -0,0 +1,65 @@
+From 40d6aaa0260b733a5bb004fd90287148e09a249c 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?=
+ <alexey.pawlow@gmail.com>
+Date: Thu, 17 Jun 2021 18:51:21 +0530
+Subject: [PATCH 011/N] MINGW determine if pwdmodule should be used
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Co-authored-by: Алексей <alexey.pawlow@gmail.com>
+Co-authored-by: Christoph Reiter <reiter.christoph@gmail.com>
+---
+ Modules/Setup | 2 --
+ Modules/Setup.config.in | 3 +++
+ configure.ac | 7 +++++++
+ 3 files changed, 10 insertions(+), 2 deletions(-)
+
+diff --git a/Modules/Setup b/Modules/Setup
+index 6b6926d..2bafdd0 100644
+--- a/Modules/Setup
++++ b/Modules/Setup
+@@ -102,8 +102,6 @@ PYTHONPATH=$(COREPYTHONPATH)
+ # 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 --git a/Modules/Setup.config.in b/Modules/Setup.config.in
+index 612cabd..d071a74 100644
+--- a/Modules/Setup.config.in
++++ b/Modules/Setup.config.in
+@@ -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/configure.ac b/configure.ac
+index e307fe3..52b3120 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -3333,6 +3333,13 @@ case $host in
+ *-*-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,
+--
+2.32.0
+
diff --git a/0012-MINGW-compiler-customize-mingw-cygwin-compilers.patch b/0012-MINGW-compiler-customize-mingw-cygwin-compilers.patch
new file mode 100644
index 000000000000..b5fd650acb68
--- /dev/null
+++ b/0012-MINGW-compiler-customize-mingw-cygwin-compilers.patch
@@ -0,0 +1,54 @@
+From 2f233ca6cfa1122c784219e130e50ce9d0276777 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?=
+ <alexey.pawlow@gmail.com>
+Date: Thu, 17 Jun 2021 18:51:21 +0530
+Subject: [PATCH 012/N] MINGW compiler customize mingw cygwin compilers
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Co-authored-by: Алексей <alexey.pawlow@gmail.com>
+---
+ Lib/distutils/sysconfig.py | 19 +++++++++++++++++--
+ 1 file changed, 17 insertions(+), 2 deletions(-)
+
+diff --git a/Lib/distutils/sysconfig.py b/Lib/distutils/sysconfig.py
+index 37feae5..bbe8e3c 100644
+--- a/Lib/distutils/sysconfig.py
++++ b/Lib/distutils/sysconfig.py
+@@ -176,7 +176,23 @@ def customize_compiler(compiler):
+ 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.
+@@ -186,7 +202,6 @@ def customize_compiler(compiler):
+ # 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
+--
+2.32.0
+
diff --git a/0013-MINGW-compiler-enable-new-dtags.patch b/0013-MINGW-compiler-enable-new-dtags.patch
new file mode 100644
index 000000000000..5e46bbea97c9
--- /dev/null
+++ b/0013-MINGW-compiler-enable-new-dtags.patch
@@ -0,0 +1,37 @@
+From d96bd363de3b94dccbe4e685796c5fd482fac63d 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?=
+ <alexey.pawlow@gmail.com>
+Date: Thu, 17 Jun 2021 18:51:22 +0530
+Subject: [PATCH 013/N] MINGW compiler enable new dtags
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Co-authored-by: Алексей <alexey.pawlow@gmail.com>
+---
+ Lib/distutils/unixccompiler.py | 8 ++++++--
+ 1 file changed, 6 insertions(+), 2 deletions(-)
+
+diff --git a/Lib/distutils/unixccompiler.py b/Lib/distutils/unixccompiler.py
+index f0792de..60776bc 100644
+--- a/Lib/distutils/unixccompiler.py
++++ b/Lib/distutils/unixccompiler.py
+@@ -248,9 +248,13 @@ class UnixCCompiler(CCompiler):
+ # -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:
+--
+2.32.0
+
diff --git a/0014-issue6672-v2-Add-Mingw-recognition-to-pyport.h-to-al.patch b/0014-issue6672-v2-Add-Mingw-recognition-to-pyport.h-to-al.patch
new file mode 100644
index 000000000000..b5e8cb1bcaea
--- /dev/null
+++ b/0014-issue6672-v2-Add-Mingw-recognition-to-pyport.h-to-al.patch
@@ -0,0 +1,82 @@
+From 5cf0ca1ebaec17df425a2b2829f6520e355f81cc 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?=
+ <alexey.pawlow@gmail.com>
+Date: Thu, 17 Jun 2021 18:51:23 +0530
+Subject: [PATCH 014/N] issue6672 v2 Add Mingw recognition to pyport.h to al
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Co-authored-by: Алексей <alexey.pawlow@gmail.com>
+---
+ Include/pyport.h | 20 +++++++++++---------
+ setup.py | 3 +++
+ 2 files changed, 14 insertions(+), 9 deletions(-)
+
+diff --git a/Include/pyport.h b/Include/pyport.h
+index 475c2a8..a05fa3a 100644
+--- a/Include/pyport.h
++++ b/Include/pyport.h
+@@ -664,12 +664,12 @@ extern char * _getpty(int *, int, mode_t, int);
+ */
+
+ /*
+- 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
+
+@@ -682,21 +682,23 @@ extern char * _getpty(int *, int, mode_t, int);
+ # define PyAPI_FUNC(RTYPE) Py_EXPORTED_SYMBOL RTYPE
+ # define PyAPI_DATA(RTYPE) extern Py_EXPORTED_SYMBOL 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 Py_EXPORTED_SYMBOL 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) Py_IMPORTED_SYMBOL RTYPE
+-# endif /* !__CYGWIN__ */
++# endif /* __CYGWIN__ || __MINGW32__*/
+ # define PyAPI_DATA(RTYPE) extern Py_IMPORTED_SYMBOL RTYPE
+ /* module init functions outside the core must be exported */
+ # if defined(__cplusplus)
+diff --git a/setup.py b/setup.py
+index 04eb6b2..b483dd3 100644
+--- a/setup.py
++++ b/setup.py
+@@ -444,6 +444,9 @@ class PyBuildExt(build_ext):
+ def build_extensions(self):
+ self.set_srcdir()
+
++ if MS_WINDOWS:
++ self.compiler.define_macro("Py_BUILD_CORE_MODULE")
++
+ # Detect which modules should be compiled
+ self.detect_modules()
+
+--
+2.32.0
+
diff --git a/0015-MINGW-configure-for-shared-build.patch b/0015-MINGW-configure-for-shared-build.patch
new file mode 100644
index 000000000000..de3942af82ed
--- /dev/null
+++ b/0015-MINGW-configure-for-shared-build.patch
@@ -0,0 +1,69 @@
+From 914f08e27ac82a95ce0ddedfbb15d53415406050 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?=
+ <alexey.pawlow@gmail.com>
+Date: Thu, 17 Jun 2021 18:51:24 +0530
+Subject: [PATCH 015/N] MINGW configure for shared build
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Co-authored-by: Алексей <alexey.pawlow@gmail.com>
+---
+ configure.ac | 20 +++++++++++++++++++-
+ 1 file changed, 19 insertions(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index 52b3120..592b61a 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -1240,6 +1240,13 @@ if test $enable_shared = "yes"; then
+ ;;
+
+ 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
+@@ -1248,6 +1255,10 @@ else # shared is disabled
+ LDLIBRARY='libpython$(LDVERSION).dll.a'
+ ;;
+ esac
++ case $host in
++ *-*-mingw*)
++ LDLIBRARY='libpython$(LDVERSION).a';;
++ esac
+ fi
+
+ if test "$cross_compiling" = yes; then
+@@ -2843,6 +2854,12 @@ then
+ 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}
+@@ -5670,7 +5687,8 @@ case $host in
+ 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
+
+--
+2.32.0
+
diff --git a/0016-MINGW-dynamic-loading-support.patch b/0016-MINGW-dynamic-loading-support.patch
new file mode 100644
index 000000000000..c87ab362f002
--- /dev/null
+++ b/0016-MINGW-dynamic-loading-support.patch
@@ -0,0 +1,103 @@
+From ae8ad2a897af02bb36b723276f7382c5dd240447 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?=
+ <alexey.pawlow@gmail.com>
+Date: Thu, 17 Jun 2021 18:51:25 +0530
+Subject: [PATCH 016/N] MINGW dynamic loading support
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Co-authored-by: Алексей <alexey.pawlow@gmail.com>
+---
+ Makefile.pre.in | 6 ++++++
+ Python/dynload_win.c | 9 +++++++--
+ configure.ac | 15 +++++++++++++++
+ 3 files changed, 28 insertions(+), 2 deletions(-)
+
+diff --git a/Makefile.pre.in b/Makefile.pre.in
+index f738b3b..9f2475d 100644
+--- a/Makefile.pre.in
++++ b/Makefile.pre.in
+@@ -823,6 +823,12 @@ Python/dynload_hpux.o: $(srcdir)/Python/dynload_hpux.c Makefile
+ -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 --git a/Python/dynload_win.c b/Python/dynload_win.c
+index 81787e5..9d7690e 100644
+--- a/Python/dynload_win.c
++++ b/Python/dynload_win.c
+@@ -27,6 +27,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
+@@ -192,8 +198,7 @@ _Py_COMP_DIAG_POP
+ 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
+
+ /* restore old error mode settings */
+diff --git a/configure.ac b/configure.ac
+index 592b61a..dfe55ad 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -2718,6 +2718,9 @@ if test -z "$SHLIB_SUFFIX"; then
+ CYGWIN*) SHLIB_SUFFIX=.dll;;
+ *) SHLIB_SUFFIX=.so;;
+ esac
++ case $host_os in
++ mingw*) SHLIB_SUFFIX=.dll;;
++ esac
+ fi
+ AC_MSG_RESULT($SHLIB_SUFFIX)
+
+@@ -3831,6 +3834,12 @@ then
+ 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"
+@@ -5667,6 +5676,12 @@ case "$ac_cv_computed_gotos" in yes*)
+ AC_DEFINE(HAVE_COMPUTED_GOTOS, 1,
+ [Define if the C compiler supports computed gotos.])
+ 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
+
+ case $ac_sys_system in
+ AIX*)
+--
+2.32.0
+
diff --git a/0017-MINGW-ignore-main-program-for-frozen-scripts.patch b/0017-MINGW-ignore-main-program-for-frozen-scripts.patch
new file mode 100644
index 000000000000..cc205a5a78f0
--- /dev/null
+++ b/0017-MINGW-ignore-main-program-for-frozen-scripts.patch
@@ -0,0 +1,52 @@
+From 5230e91dc7c783925a609e8fec18955546a0cbe7 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?=
+ <alexey.pawlow@gmail.com>
+Date: Thu, 17 Jun 2021 18:51:26 +0530
+Subject: [PATCH 017/N] MINGW ignore main program for frozen scripts
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Co-authored-by: Алексей <alexey.pawlow@gmail.com>
+---
+ Makefile.pre.in | 2 +-
+ configure.ac | 10 ++++++++++
+ 2 files changed, 11 insertions(+), 1 deletion(-)
+
+diff --git a/Makefile.pre.in b/Makefile.pre.in
+index 9f2475d..223a266 100644
+--- a/Makefile.pre.in
++++ b/Makefile.pre.in
+@@ -352,7 +352,7 @@ PYTHON_OBJS= \
+ 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/configure.ac b/configure.ac
+index dfe55ad..ccc558e 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -5707,6 +5707,16 @@ case $host in
+ ;;
+ 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 Parser/pegen Objects Python Modules Modules/_io Programs"
+ case $host in
+--
+2.32.0
+
diff --git a/0018-MINGW-setup-_multiprocessing-module.patch b/0018-MINGW-setup-_multiprocessing-module.patch
new file mode 100644
index 000000000000..6020e8f26682
--- /dev/null
+++ b/0018-MINGW-setup-_multiprocessing-module.patch
@@ -0,0 +1,34 @@
+From ad9ea63b35c8eb32a43f69530ebc798b5ac12553 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?=
+ <alexey.pawlow@gmail.com>
+Date: Thu, 17 Jun 2021 18:51:26 +0530
+Subject: [PATCH 018/N] MINGW setup _multiprocessing module
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Co-authored-by: Алексей <alexey.pawlow@gmail.com>
+---
+ setup.py | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+diff --git a/setup.py b/setup.py
+index b483dd3..1f96ad4 100644
+--- a/setup.py
++++ b/setup.py
+@@ -1761,7 +1761,12 @@ class PyBuildExt(build_ext):
+ 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):
+--
+2.32.0
+
diff --git a/0019-MINGW-setup-select-module.patch b/0019-MINGW-setup-select-module.patch
new file mode 100644
index 000000000000..188314388008
--- /dev/null
+++ b/0019-MINGW-setup-select-module.patch
@@ -0,0 +1,60 @@
+From d8df9cbea83b1d7c1cd27cd1ab52feb6b6a882f7 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?=
+ <alexey.pawlow@gmail.com>
+Date: Thu, 17 Jun 2021 18:51:29 +0530
+Subject: [PATCH 019/N] MINGW setup select module
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Co-authored-by: Алексей <alexey.pawlow@gmail.com>
+---
+ Modules/selectmodule.c | 6 +++---
+ setup.py | 6 +++++-
+ 2 files changed, 8 insertions(+), 4 deletions(-)
+
+diff --git a/Modules/selectmodule.c b/Modules/selectmodule.c
+index fb71e91..ad3990c 100644
+--- a/Modules/selectmodule.c
++++ b/Modules/selectmodule.c
+@@ -155,9 +155,9 @@ seq2set(PyObject *seq, fd_set *set, pylist fd2obj[FD_SETSIZE + 1])
+ 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()");
+@@ -165,7 +165,7 @@ seq2set(PyObject *seq, fd_set *set, pylist fd2obj[FD_SETSIZE + 1])
+ }
+ 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 --git a/setup.py b/setup.py
+index 1f96ad4..a6145c4 100644
+--- a/setup.py
++++ b/setup.py
+@@ -903,7 +903,11 @@ class PyBuildExt(build_ext):
+ 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']))
+--
+2.32.0
+
diff --git a/0020-MINGW-setup-_ctypes-module-with-system-libffi.patch b/0020-MINGW-setup-_ctypes-module-with-system-libffi.patch
new file mode 100644
index 000000000000..3006e0ebd88d
--- /dev/null
+++ b/0020-MINGW-setup-_ctypes-module-with-system-libffi.patch
@@ -0,0 +1,45 @@
+From 63b12b21aae2268da35cd557e526b241a65198c2 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?=
+ <alexey.pawlow@gmail.com>
+Date: Thu, 17 Jun 2021 18:51:30 +0530
+Subject: [PATCH 020/N] MINGW setup _ctypes module with system libffi
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Co-authored-by: Алексей <alexey.pawlow@gmail.com>
+Co-authored-by: Christoph Reiter <reiter.christoph@gmail.com>
+---
+ setup.py | 7 ++++++-
+ 1 file changed, 6 insertions(+), 1 deletion(-)
+
+diff --git a/setup.py b/setup.py
+index a6145c4..e36ef5d 100644
+--- a/setup.py
++++ b/setup.py
+@@ -2149,9 +2149,12 @@ class PyBuildExt(build_ext):
+ 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 = sysconfig.get_config_var("LIBFFI_INCLUDEDIR")
+ ffi_lib = None
+@@ -2196,6 +2199,8 @@ class PyBuildExt(build_ext):
+
+ ext.include_dirs.append(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'):
+--
+2.32.0
+
diff --git a/0021-MINGW-defect-winsock2-and-setup-_socket-module.patch b/0021-MINGW-defect-winsock2-and-setup-_socket-module.patch
new file mode 100644
index 000000000000..f7240eeba2c2
--- /dev/null
+++ b/0021-MINGW-defect-winsock2-and-setup-_socket-module.patch
@@ -0,0 +1,167 @@
+From 9b48dc123e5baf45c7e2180d46b13ae3aaeead8b 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?=
+ <alexey.pawlow@gmail.com>
+Date: Thu, 17 Jun 2021 18:51:30 +0530
+Subject: [PATCH 021/N] MINGW defect winsock2 and setup _socket module
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Co-authored-by: Алексей <alexey.pawlow@gmail.com>
+---
+ Misc/config_mingw | 3 +++
+ Modules/socketmodule.c | 8 ++++++--
+ configure.ac | 28 +++++++++++++++++++++++-----
+ pyconfig.h.in | 7 +++++--
+ setup.py | 2 ++
+ 5 files changed, 39 insertions(+), 9 deletions(-)
+
+diff --git a/Misc/config_mingw b/Misc/config_mingw
+index 513065d..9be43fd 100644
+--- a/Misc/config_mingw
++++ b/Misc/config_mingw
+@@ -10,3 +10,6 @@ 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
++
++# force detection of winsock2 functionality - require wxp or newer
++ac_cv_func_getpeername=yes
+diff --git a/Modules/socketmodule.c b/Modules/socketmodule.c
+index 8953185..d15bb4f 100644
+--- a/Modules/socketmodule.c
++++ b/Modules/socketmodule.c
+@@ -305,7 +305,7 @@ http://cvsweb.netbsd.org/bsdweb.cgi/src/lib/libc/net/getaddrinfo.c.diff?r1=1.82&
+ # 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
+@@ -336,7 +336,7 @@ http://cvsweb.netbsd.org/bsdweb.cgi/src/lib/libc/net/getaddrinfo.c.diff?r1=1.82&
+ #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 <versionhelpers.h>
+@@ -429,6 +429,10 @@ remove_unusable_flags(PyObject *m)
+ /* 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 --git a/configure.ac b/configure.ac
+index ccc558e..fc287de 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -4442,21 +4442,36 @@ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+ ],[])
+ 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 <netdb.h>]], [[struct addrinfo a]])],
++AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
++#ifdef HAVE_WS2TCPIP_H
++# include <ws2tcpip.h>
++#else
++# include <netdb.h>
++#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 <sys/types.h>
+-# include <sys/socket.h>]], [[struct sockaddr_storage s]])],
++#ifdef HAVE_WS2TCPIP_H
++#include <ws2tcpip.h>
++#endif
++#ifdef HAVE_SYS_TYPES_H
++#include <sys/types.h>
++#endif
++#ifdef HAVE_SYS_SOCKET_H
++#include <sys/socket.h>
++#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)
+@@ -5597,7 +5612,10 @@ fi
+
+ AC_CHECK_TYPE(socklen_t,,
+ AC_DEFINE(socklen_t,int,
+- [Define to `int' if <sys/socket.h> does not define.]),[
++ [Define to `int' if <sys/socket.h> or <ws2tcpip.h> does not define.]),[
++#ifdef HAVE_WS2TCPIP_H
++#include <ws2tcpip.h>
++#endif
+ #ifdef HAVE_SYS_TYPES_H
+ #include <sys/types.h>
+ #endif
+diff --git a/pyconfig.h.in b/pyconfig.h.in
+index 5f63cae..b69a7c7 100644
+--- a/pyconfig.h.in
++++ b/pyconfig.h.in
+@@ -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. */
+@@ -1342,6 +1342,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 <ws2tcpip.h> header file. */
++#undef HAVE_WS2TCPIP_H
++
+ /* Define if the zlib library has inflateCopy */
+ #undef HAVE_ZLIB_COPY
+
+@@ -1658,7 +1661,7 @@
+ /* Define to `unsigned int' if <sys/types.h> does not define. */
+ #undef size_t
+
+-/* Define to `int' if <sys/socket.h> does not define. */
++/* Define to `int' if <sys/socket.h> or <ws2tcpip.h> does not define. */
+ #undef socklen_t
+
+ /* Define to `int' if <sys/types.h> doesn't define. */
+diff --git a/setup.py b/setup.py
+index e36ef5d..b29d23b 100644
+--- a/setup.py
++++ b/setup.py
+@@ -1140,6 +1140,8 @@ class PyBuildExt(build_ext):
+ if MACOS:
+ # Issue #35569: Expose RFC 3542 socket options.
+ kwargs['extra_compile_args'] = ['-D__APPLE_USE_RFC_3542']
++ if MS_WINDOWS:
++ kwargs['libraries'] = ['ws2_32', 'iphlpapi']
+
+ self.add(Extension('_socket', ['socketmodule.c'], **kwargs))
+ elif self.compiler.find_library_file(self.lib_dirs, 'net'):
+--
+2.32.0
+
diff --git a/0022-MINGW-exclude-unix-only-modules.patch b/0022-MINGW-exclude-unix-only-modules.patch
new file mode 100644
index 000000000000..f69bb3c4b8e5
--- /dev/null
+++ b/0022-MINGW-exclude-unix-only-modules.patch
@@ -0,0 +1,94 @@
+From 44e8fbcb587f72cbfb477128f50524cb3c1ad021 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?=
+ <alexey.pawlow@gmail.com>
+Date: Thu, 17 Jun 2021 18:51:31 +0530
+Subject: [PATCH 022/N] MINGW exclude unix only modules
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Co-authored-by: Алексей <alexey.pawlow@gmail.com>
+---
+ setup.py | 41 +++++++++++++++++++++++++++++------------
+ 1 file changed, 29 insertions(+), 12 deletions(-)
+
+diff --git a/setup.py b/setup.py
+index b29d23b..5280ea0 100644
+--- a/setup.py
++++ b/setup.py
+@@ -886,13 +886,21 @@ class PyBuildExt(build_ext):
+ 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)):
+@@ -917,7 +925,10 @@ class PyBuildExt(build_ext):
+
+ # 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']))
+@@ -943,7 +954,10 @@ class PyBuildExt(build_ext):
+ 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
+@@ -1125,13 +1139,16 @@ class PyBuildExt(build_ext):
+ # 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)
+--
+2.32.0
+
diff --git a/0023-MINGW-setup-msvcrt-and-_winapi-modules.patch b/0023-MINGW-setup-msvcrt-and-_winapi-modules.patch
new file mode 100644
index 000000000000..01567a20eafa
--- /dev/null
+++ b/0023-MINGW-setup-msvcrt-and-_winapi-modules.patch
@@ -0,0 +1,93 @@
+From 78ba60f537dc443ef5bc912e650e688619b9e798 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?=
+ <alexey.pawlow@gmail.com>
+Date: Thu, 17 Jun 2021 18:51:33 +0530
+Subject: [PATCH 023/N] MINGW setup msvcrt and _winapi modules
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Co-authored-by: Алексей <alexey.pawlow@gmail.com>
+---
+ Modules/_winapi.c | 2 ++
+ PC/msvcrtmodule.c | 2 ++
+ Python/dynamic_annotations.c | 2 +-
+ setup.py | 21 +++++++++++++++++++++
+ 4 files changed, 26 insertions(+), 1 deletion(-)
+
+diff --git a/Modules/_winapi.c b/Modules/_winapi.c
+index e1672c4..ba318a1 100644
+--- a/Modules/_winapi.c
++++ b/Modules/_winapi.c
+@@ -39,7 +39,9 @@
+
+ #define WINDOWS_LEAN_AND_MEAN
+ #include "windows.h"
++#if defined(Py_DEBUG)
+ #include <crtdbg.h>
++#endif
+ #include "winreparse.h"
+
+ #if defined(MS_WIN32) && !defined(MS_WIN64)
+diff --git a/PC/msvcrtmodule.c b/PC/msvcrtmodule.c
+index faceb03..28e1957 100644
+--- a/PC/msvcrtmodule.c
++++ b/PC/msvcrtmodule.c
+@@ -21,7 +21,9 @@
+ #include <io.h>
+ #include <conio.h>
+ #include <sys/locking.h>
++#ifdef _DEBUG
+ #include <crtdbg.h>
++#endif
+ #include <windows.h>
+
+ #ifdef _MSC_VER
+diff --git a/Python/dynamic_annotations.c b/Python/dynamic_annotations.c
+index 7febaa0..70d5b3d 100644
+--- a/Python/dynamic_annotations.c
++++ b/Python/dynamic_annotations.c
+@@ -27,7 +27,7 @@
+ * Author: Kostya Serebryany
+ */
+
+-#ifdef _MSC_VER
++#ifdef MS_WINDOWS
+ # include <windows.h>
+ #endif
+
+diff --git a/setup.py b/setup.py
+index 5280ea0..736b0f0 100644
+--- a/setup.py
++++ b/setup.py
+@@ -1599,6 +1599,27 @@ class PyBuildExt(build_ext):
+ '-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:
+--
+2.32.0
+
diff --git a/0024-MINGW-build-extensions-with-GCC.patch b/0024-MINGW-build-extensions-with-GCC.patch
new file mode 100644
index 000000000000..6dc1bd101099
--- /dev/null
+++ b/0024-MINGW-build-extensions-with-GCC.patch
@@ -0,0 +1,79 @@
+From 386008948b544e74ebe06620dc41a6a555195170 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?=
+ <alexey.pawlow@gmail.com>
+Date: Thu, 17 Jun 2021 18:51:34 +0530
+Subject: [PATCH 024/N] MINGW build extensions with GCC
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Co-authored-by: Алексей <alexey.pawlow@gmail.com>
+---
+ Lib/distutils/command/build_ext.py | 16 +++++++++++++++-
+ Lib/distutils/util.py | 2 ++
+ Lib/sysconfig.py | 2 ++
+ 3 files changed, 19 insertions(+), 1 deletion(-)
+
+diff --git a/Lib/distutils/command/build_ext.py b/Lib/distutils/command/build_ext.py
+index 1a9bd12..1c9d471 100644
+--- a/Lib/distutils/command/build_ext.py
++++ b/Lib/distutils/command/build_ext.py
+@@ -186,7 +186,7 @@ class build_ext(Command):
+ # 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.
+@@ -712,6 +712,20 @@ class build_ext(Command):
+ # 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 --git a/Lib/distutils/util.py b/Lib/distutils/util.py
+index 4b002ec..7b2e1e0 100644
+--- a/Lib/distutils/util.py
++++ b/Lib/distutils/util.py
+@@ -36,6 +36,8 @@ def get_host_platform():
+
+ """
+ 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/Lib/sysconfig.py b/Lib/sysconfig.py
+index 505d538..aa49d80 100644
+--- a/Lib/sysconfig.py
++++ b/Lib/sysconfig.py
+@@ -656,6 +656,8 @@ def get_platform():
+
+ """
+ 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():
+--
+2.32.0
+
diff --git a/0025-MINGW-use-Mingw32CCompiler-as-default-compiler-for-m.patch b/0025-MINGW-use-Mingw32CCompiler-as-default-compiler-for-m.patch
new file mode 100644
index 000000000000..ca5bc2582283
--- /dev/null
+++ b/0025-MINGW-use-Mingw32CCompiler-as-default-compiler-for-m.patch
@@ -0,0 +1,72 @@
+From 88fba0fa0fcc87ea40fbd329f5e21ab6ebbe6f29 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?=
+ <alexey.pawlow@gmail.com>
+Date: Thu, 17 Jun 2021 18:51:35 +0530
+Subject: [PATCH 025/N] MINGW use Mingw32CCompiler as default compiler for m
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Co-authored-by: Алексей <alexey.pawlow@gmail.com>
+---
+ Lib/distutils/ccompiler.py | 4 +++-
+ Lib/distutils/cygwinccompiler.py | 11 ++++++++---
+ 2 files changed, 11 insertions(+), 4 deletions(-)
+
+diff --git a/Lib/distutils/ccompiler.py b/Lib/distutils/ccompiler.py
+index b5ef143..24eafc6 100644
+--- a/Lib/distutils/ccompiler.py
++++ b/Lib/distutils/ccompiler.py
+@@ -9,7 +9,7 @@ from distutils.spawn import spawn
+ from distutils.file_util import move_file
+ from distutils.dir_util import mkpath
+ from distutils.dep_util import 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 @@ def get_default_compiler(osname=None, platform=None):
+ 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 --git a/Lib/distutils/cygwinccompiler.py b/Lib/distutils/cygwinccompiler.py
+index 66c12dd..1960ef8 100644
+--- a/Lib/distutils/cygwinccompiler.py
++++ b/Lib/distutils/cygwinccompiler.py
+@@ -253,11 +253,16 @@ class CygwinCCompiler(UnixCCompiler):
+ 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'):
+@@ -313,7 +318,7 @@ class Mingw32CCompiler(CygwinCCompiler):
+
+ # 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
+--
+2.32.0
+
diff --git a/0026-MINGW-find-import-library.patch b/0026-MINGW-find-import-library.patch
new file mode 100644
index 000000000000..7987c37ba74a
--- /dev/null
+++ b/0026-MINGW-find-import-library.patch
@@ -0,0 +1,29 @@
+From 193124357e5d484853f54fdc1ecc1e131bfc3794 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?=
+ <alexey.pawlow@gmail.com>
+Date: Thu, 17 Jun 2021 18:51:36 +0530
+Subject: [PATCH 026/N] MINGW find import library
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Co-authored-by: Алексей <alexey.pawlow@gmail.com>
+---
+ Lib/distutils/cygwinccompiler.py | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/Lib/distutils/cygwinccompiler.py b/Lib/distutils/cygwinccompiler.py
+index 1960ef8..39ad631 100644
+--- a/Lib/distutils/cygwinccompiler.py
++++ b/Lib/distutils/cygwinccompiler.py
+@@ -91,6 +91,7 @@ class CygwinCCompiler(UnixCCompiler):
+ 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"
+--
+2.32.0
+
diff --git a/0027-MINGW-setup-_ssl-module.patch b/0027-MINGW-setup-_ssl-module.patch
new file mode 100644
index 000000000000..b2a040251170
--- /dev/null
+++ b/0027-MINGW-setup-_ssl-module.patch
@@ -0,0 +1,30 @@
+From be2b7c5a9e045188cece8694358871525686d77c 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?=
+ <alexey.pawlow@gmail.com>
+Date: Thu, 17 Jun 2021 18:51:37 +0530
+Subject: [PATCH 027/N] MINGW setup _ssl module
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Co-authored-by: Алексей <alexey.pawlow@gmail.com>
+---
+ setup.py | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/setup.py b/setup.py
+index 736b0f0..143a1c9 100644
+--- a/setup.py
++++ b/setup.py
+@@ -2381,6 +2381,8 @@ class PyBuildExt(build_ext):
+ 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'])
+--
+2.32.0
+
diff --git a/0028-MINGW-generalization-of-posix-build-in-sysconfig.py.patch b/0028-MINGW-generalization-of-posix-build-in-sysconfig.py.patch
new file mode 100644
index 000000000000..95509fdd383d
--- /dev/null
+++ b/0028-MINGW-generalization-of-posix-build-in-sysconfig.py.patch
@@ -0,0 +1,80 @@
+From b29739b0545771c80eadc505b6f661b0678ed0cf 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?=
+ <alexey.pawlow@gmail.com>
+Date: Thu, 17 Jun 2021 18:51:38 +0530
+Subject: [PATCH 028/N] MINGW generalization of posix build in sysconfig.py
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Co-authored-by: Алексей <alexey.pawlow@gmail.com>
+---
+ Lib/sysconfig.py | 15 +++++++++------
+ 1 file changed, 9 insertions(+), 6 deletions(-)
+
+diff --git a/Lib/sysconfig.py b/Lib/sysconfig.py
+index aa49d80..d4298f7 100644
+--- a/Lib/sysconfig.py
++++ b/Lib/sysconfig.py
+@@ -100,6 +100,9 @@ _BASE_EXEC_PREFIX = os.path.normpath(sys.base_exec_prefix)
+ _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:
+@@ -183,7 +186,7 @@ def _expand_vars(scheme, vars):
+
+
+ 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
+@@ -199,7 +202,7 @@ def _getuserbase():
+ 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")
+
+@@ -504,7 +507,7 @@ def parse_config_h(fp, vars=None):
+ 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
+@@ -576,10 +579,10 @@ def get_config_vars(*args):
+ # 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)
+ _CONFIG_VARS['TZPATH'] = ''
+- if os.name == 'posix':
++ if _POSIX_BUILD:
+ _init_posix(_CONFIG_VARS)
+ # For backward compatibility, see issue19555
+ SO = _CONFIG_VARS.get('EXT_SUFFIX')
+@@ -592,7 +595,7 @@ def get_config_vars(*args):
+
+ # 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
+--
+2.32.0
+
diff --git a/0029-MINGW-support-stdcall-without-underscore.patch b/0029-MINGW-support-stdcall-without-underscore.patch
new file mode 100644
index 000000000000..8275227ab444
--- /dev/null
+++ b/0029-MINGW-support-stdcall-without-underscore.patch
@@ -0,0 +1,54 @@
+From 8353a7f30f7dc0a33111f43ad2ce7acfa6de0a32 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?=
+ <alexey.pawlow@gmail.com>
+Date: Thu, 17 Jun 2021 18:51:39 +0530
+Subject: [PATCH 029/N] MINGW support stdcall without underscore
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Co-authored-by: Алексей <alexey.pawlow@gmail.com>
+---
+ Modules/_ctypes/_ctypes.c | 19 +++++++++++++++++++
+ 1 file changed, 19 insertions(+)
+
+diff --git a/Modules/_ctypes/_ctypes.c b/Modules/_ctypes/_ctypes.c
+index ceae67e..b9cf96b 100644
+--- a/Modules/_ctypes/_ctypes.c
++++ b/Modules/_ctypes/_ctypes.c
+@@ -3406,6 +3406,18 @@ static PPROC FindAddress(void *handle, const char *name, PyObject *type)
+ 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
+@@ -3413,6 +3425,13 @@ static PPROC FindAddress(void *handle, const char *name, PyObject *type)
+ 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;
+ }
+ return NULL;
+ #endif
+--
+2.32.0
+
diff --git a/0030-use-replace-instead-rename-to-avoid-failure-on-windo.patch b/0030-use-replace-instead-rename-to-avoid-failure-on-windo.patch
new file mode 100644
index 000000000000..c8af1f19f26e
--- /dev/null
+++ b/0030-use-replace-instead-rename-to-avoid-failure-on-windo.patch
@@ -0,0 +1,31 @@
+From 8ce7dcc50395d138e1ec6b303c46a89ae7b98c24 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?=
+ <alexey.pawlow@gmail.com>
+Date: Thu, 17 Jun 2021 18:51:40 +0530
+Subject: [PATCH 030/N] use replace instead rename to avoid failure on windo
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Co-authored-by: Алексей <alexey.pawlow@gmail.com>
+Co-authored-by: Christoph Reiter <reiter.christoph@gmail.com>
+---
+ setup.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/setup.py b/setup.py
+index 143a1c9..23e7689 100644
+--- a/setup.py
++++ b/setup.py
+@@ -2602,7 +2602,7 @@ class PyBuildScripts(build_scripts):
+ 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)
+--
+2.32.0
+
diff --git a/0031-MINGW-avoid-circular-dependency-from-time-module-dur.patch b/0031-MINGW-avoid-circular-dependency-from-time-module-dur.patch
new file mode 100644
index 000000000000..fb2fc5ebe831
--- /dev/null
+++ b/0031-MINGW-avoid-circular-dependency-from-time-module-dur.patch
@@ -0,0 +1,37 @@
+From 4ffbd9b3c17b527f172d805010b5e20679165833 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?=
+ <alexey.pawlow@gmail.com>
+Date: Thu, 17 Jun 2021 18:51:41 +0530
+Subject: [PATCH 031/N] MINGW avoid circular dependency from time module dur
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Co-authored-by: Алексей <alexey.pawlow@gmail.com>
+---
+ Lib/distutils/cygwinccompiler.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/Lib/distutils/cygwinccompiler.py b/Lib/distutils/cygwinccompiler.py
+index 39ad631..5b281e2 100644
+--- a/Lib/distutils/cygwinccompiler.py
++++ b/Lib/distutils/cygwinccompiler.py
+@@ -48,7 +48,6 @@ cygwin in no-cygwin mode).
+ import os
+ import sys
+ import copy
+-from subprocess import Popen, PIPE, check_output
+ import re
+
+ from distutils.unixccompiler import UnixCCompiler
+@@ -383,6 +382,7 @@ def _find_exe_version(cmd):
+ 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()
+--
+2.32.0
+
diff --git a/0032-MINGW-generalization-of-posix-build-in-distutils-sys.patch b/0032-MINGW-generalization-of-posix-build-in-distutils-sys.patch
new file mode 100644
index 000000000000..6993dfc41501
--- /dev/null
+++ b/0032-MINGW-generalization-of-posix-build-in-distutils-sys.patch
@@ -0,0 +1,94 @@
+From 2b69618ed982a6f174a7bc666b08c90eee83c268 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?=
+ <alexey.pawlow@gmail.com>
+Date: Thu, 17 Jun 2021 18:51:41 +0530
+Subject: [PATCH 032/N] MINGW generalization of posix build in distutils sys
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Co-authored-by: Алексей <alexey.pawlow@gmail.com>
+---
+ Lib/distutils/sysconfig.py | 24 +++++++++++++++++++-----
+ 1 file changed, 19 insertions(+), 5 deletions(-)
+
+diff --git a/Lib/distutils/sysconfig.py b/Lib/distutils/sysconfig.py
+index bbe8e3c..80d3523 100644
+--- a/Lib/distutils/sysconfig.py
++++ b/Lib/distutils/sysconfig.py
+@@ -64,6 +64,17 @@ def _python_build():
+ 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.
+@@ -97,7 +108,7 @@ def get_python_inc(plat_specific=0, prefix=None):
+ """
+ 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
+@@ -144,7 +155,7 @@ def get_python_lib(plat_specific=0, standard_lib=0, prefix=None):
+ else:
+ prefix = plat_specific and EXEC_PREFIX or PREFIX
+
+- if os.name == "posix":
++ if posix_build:
+ if plat_specific or standard_lib:
+ # Platform-specific modules (any module from a non-pure-Python
+ # module distribution) or standard Python library modules.
+@@ -261,7 +272,7 @@ def customize_compiler(compiler):
+ 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
+@@ -467,6 +478,9 @@ def _init_posix():
+
+
+ def _init_nt():
++ if posix_build:
++ _init_posix()
++ return
+ """Initialize the module as appropriate for NT"""
+ g = {}
+ # set basic install directories
+@@ -516,7 +530,7 @@ def get_config_vars(*args):
+
+ # 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
+@@ -535,7 +549,7 @@ def get_config_vars(*args):
+ # 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()):
+--
+2.32.0
+
diff --git a/0033-MINGW-customize-site.patch b/0033-MINGW-customize-site.patch
new file mode 100644
index 000000000000..bf0282aaabda
--- /dev/null
+++ b/0033-MINGW-customize-site.patch
@@ -0,0 +1,59 @@
+From 8baa74769c98ae5a10f2766806f282d8a5980cf3 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?=
+ <alexey.pawlow@gmail.com>
+Date: Thu, 17 Jun 2021 18:51:42 +0530
+Subject: [PATCH 033/N] MINGW customize site
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Co-authored-by: Алексей <alexey.pawlow@gmail.com>
+Co-authored-by: Christoph Reiter <reiter.christoph@gmail.com>
+---
+ Lib/site.py | 9 ++++++---
+ 1 file changed, 6 insertions(+), 3 deletions(-)
+
+diff --git a/Lib/site.py b/Lib/site.py
+index 9e617af..b344f03 100644
+--- a/Lib/site.py
++++ b/Lib/site.py
+@@ -251,7 +251,8 @@ def _getuserbase():
+ 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 _getuserbase():
+ 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,6 +331,7 @@ def getsitepackages(prefixes=None):
+ if prefixes is None:
+ prefixes = PREFIXES
+
++ from sysconfig import _POSIX_BUILD
+ for prefix in prefixes:
+ if not prefix or prefix in seen:
+ continue
+@@ -338,7 +341,7 @@ def getsitepackages(prefixes=None):
+ if sys.platlibdir != "lib":
+ libdirs.append("lib")
+
+- if os.sep == '/':
++ if _POSIX_BUILD:
+ for libdir in libdirs:
+ path = os.path.join(prefix, libdir,
+ "python%d.%d" % sys.version_info[:2],
+--
+2.32.0
+
diff --git a/0034-add-python-config-sh.patch b/0034-add-python-config-sh.patch
new file mode 100644
index 000000000000..3f8d14a3ed95
--- /dev/null
+++ b/0034-add-python-config-sh.patch
@@ -0,0 +1,162 @@
+From b650a9cb9202cbb9acedc6cc043c622bf815ab1d 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?=
+ <alexey.pawlow@gmail.com>
+Date: Thu, 17 Jun 2021 18:51:43 +0530
+Subject: [PATCH 034/N] add python config sh
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Co-authored-by: Алексей <alexey.pawlow@gmail.com>
+Co-authored-by: Christoph Reiter <reiter.christoph@gmail.com>
+---
+ Misc/python-config.sh.in | 62 +++++++++++++++++++++++++---------------
+ 1 file changed, 39 insertions(+), 23 deletions(-)
+
+diff --git a/Misc/python-config.sh.in b/Misc/python-config.sh.in
+index 2602fe2..e0e048a 100644
+--- a/Misc/python-config.sh.in
++++ b/Misc/python-config.sh.in
+@@ -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 @@ LIBM="@LIBM@"
+ 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 @@ for ARG in $*
+ do
+ case $ARG in
+ --help)
+- exit_with_usage 0
++ exit_with_usage
+ ;;
+ --embed)
+ PY_EMBED=1
+@@ -69,7 +85,7 @@ do
+ --prefix|--exec-prefix|--includes|--libs|--cflags|--ldflags|--extension-suffix|--abiflags|--configdir)
+ ;;
+ *)
+- exit_with_usage 1
++ exit_with_usage
+ ;;
+ esac
+ done
+@@ -80,37 +96,37 @@ fi
+
+ 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
+--
+2.32.0
+
diff --git a/0035-cross-darwin-feature.patch b/0035-cross-darwin-feature.patch
new file mode 100644
index 000000000000..b3efb781a140
--- /dev/null
+++ b/0035-cross-darwin-feature.patch
@@ -0,0 +1,138 @@
+From a75a88113ad8b46cb82be6a75de750d2407bf2fa 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?=
+ <alexey.pawlow@gmail.com>
+Date: Thu, 17 Jun 2021 18:51:44 +0530
+Subject: [PATCH 035/N] cross darwin feature
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Co-authored-by: Алексей <alexey.pawlow@gmail.com>
+---
+ configure.ac | 54 +++++++++++++++++++++++++++++++++++++++++++++++-----
+ 1 file changed, 49 insertions(+), 5 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index fc287de..453b80f 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -398,6 +398,7 @@ if test -z "$MACHDEP"
+ 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.
+@@ -411,6 +412,27 @@ then
+ *-*-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
+ ;;
+@@ -419,7 +441,6 @@ then
+ 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" \
+@@ -466,6 +487,9 @@ if test "$cross_compiling" = yes; then
+ *-*-mingw*)
+ _host_cpu=
+ ;;
++ *-*-darwin*)
++ _host_cpu=
++ ;;
+ *)
+ # for now, limit cross builds to known configurations
+ MACHDEP="unknown"
+@@ -1662,6 +1686,26 @@ AC_SUBST(BASECFLAGS)
+ 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 macOS
+ UNIVERSAL_ARCH_FLAGS=
+ AC_SUBST(UNIVERSAL_ARCH_FLAGS)
+@@ -2040,7 +2084,7 @@ yes)
+ ;;
+ 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"
+@@ -2606,7 +2650,7 @@ case $ac_sys_system/$ac_sys_release in
+ 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)';;
+@@ -2631,7 +2675,7 @@ case $ac_sys_system/$ac_sys_release in
+ ]])],[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"
+ ;;
+@@ -2643,7 +2687,7 @@ case $ac_sys_system/$ac_sys_release in
+ ;;
+ esac
+ else
+- case `/usr/bin/arch` in
++ case $($ARCH_PROG) in
+ i386)
+ MACOSX_DEFAULT_ARCH="x86_64"
+ ;;
+--
+2.32.0
+
diff --git a/0036-py3k-mingw-ntthreads-vs-pthreads.patch b/0036-py3k-mingw-ntthreads-vs-pthreads.patch
new file mode 100644
index 000000000000..ec8870b6b8eb
--- /dev/null
+++ b/0036-py3k-mingw-ntthreads-vs-pthreads.patch
@@ -0,0 +1,64 @@
+From cef46d4d01202b0297badf3d715928e3b7406357 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?=
+ <alexey.pawlow@gmail.com>
+Date: Thu, 17 Jun 2021 18:51:45 +0530
+Subject: [PATCH 036/N] py3k mingw ntthreads vs pthreads
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Co-authored-by: Алексей <alexey.pawlow@gmail.com>
+Co-authored-by: Christoph Reiter <reiter.christoph@gmail.com>
+---
+ Include/internal/pycore_condvar.h | 10 ++++++++++
+ Include/pythread.h | 6 ++++++
+ 2 files changed, 16 insertions(+)
+
+diff --git a/Include/internal/pycore_condvar.h b/Include/internal/pycore_condvar.h
+index 8b89d70..dd98245 100644
+--- a/Include/internal/pycore_condvar.h
++++ b/Include/internal/pycore_condvar.h
+@@ -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 <windows.h>
++/* 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 --git a/Include/pythread.h b/Include/pythread.h
+index bb9d864..f1e52c6 100644
+--- a/Include/pythread.h
++++ b/Include/pythread.h
+@@ -8,6 +8,12 @@ typedef void *PyThread_type_lock;
+ 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 {
+--
+2.32.0
+
diff --git a/0037-mingw-system-libffi.patch b/0037-mingw-system-libffi.patch
new file mode 100644
index 000000000000..2a2c2330f69e
--- /dev/null
+++ b/0037-mingw-system-libffi.patch
@@ -0,0 +1,30 @@
+From db3e4998d4ab6a11e3e263a848ebd332f25d77c6 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?=
+ <alexey.pawlow@gmail.com>
+Date: Thu, 17 Jun 2021 18:51:45 +0530
+Subject: [PATCH 037/N] mingw system libffi
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Co-authored-by: Алексей <alexey.pawlow@gmail.com>
+---
+ setup.py | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/setup.py b/setup.py
+index 23e7689..72f1281 100644
+--- a/setup.py
++++ b/setup.py
+@@ -2241,6 +2241,8 @@ class PyBuildExt(build_ext):
+ ext.libraries.append(ffi_lib)
+ if MS_WINDOWS:
+ ext.libraries.extend(['ole32', 'oleaut32', 'uuid'])
++ ext.export_symbols.extend(['DllGetClassObject PRIVATE',
++ 'DllCanUnloadNow PRIVATE'])
+ self.use_system_libffi = True
+
+ if sysconfig.get_config_var('HAVE_LIBDL'):
+--
+2.32.0
+
diff --git a/0038-msys-mingw-prefer-unix-sep-if-MSYSTEM.patch b/0038-msys-mingw-prefer-unix-sep-if-MSYSTEM.patch
new file mode 100644
index 000000000000..cfe1e8cc17b2
--- /dev/null
+++ b/0038-msys-mingw-prefer-unix-sep-if-MSYSTEM.patch
@@ -0,0 +1,397 @@
+From 8264c28205f988c0e7147f4f82c68511bb5ec611 Mon Sep 17 00:00:00 2001
+From: Ray Donnelly <mingw.android@gmail.com>
+Date: Thu, 17 Jun 2021 18:51:46 +0530
+Subject: [PATCH 038/N] msys mingw prefer unix sep if MSYSTEM
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Co-authored-by: Алексей <alexey.pawlow@gmail.com>
+Co-authored-by: Christoph Reiter <reiter.christoph@gmail.com>
+---
+ Include/pylifecycle.h | 6 +++
+ Lib/ntpath.py | 79 +++++++++++++++++-------------
+ Modules/posixmodule.c | 2 +
+ Python/initconfig.c | 4 +-
+ Python/pathconfig.c | 109 ++++++++++++++++++++++++++++++++++++++++++
+ Python/traceback.c | 2 +-
+ 6 files changed, 165 insertions(+), 37 deletions(-)
+
+diff --git a/Include/pylifecycle.h b/Include/pylifecycle.h
+index 783fcb4..4eec669 100644
+--- a/Include/pylifecycle.h
++++ b/Include/pylifecycle.h
+@@ -21,6 +21,12 @@ PyAPI_FUNC(int) Py_IsInitialized(void);
+ 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 --git a/Lib/ntpath.py b/Lib/ntpath.py
+index 6f77177..77f5614 100644
+--- a/Lib/ntpath.py
++++ b/Lib/ntpath.py
+@@ -11,9 +11,7 @@ module as os.path.
+ curdir = '.'
+ pardir = '..'
+ extsep = '.'
+-sep = '\\'
+ pathsep = ';'
+-altsep = '/'
+ defpath = '.;C:\\bin'
+ devnull = 'nul'
+
+@@ -23,6 +21,15 @@ import stat
+ 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 @@ __all__ = ["normcase","isabs","join","splitdrive","split","splitext",
+
+ 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 '\\/'
++ return altsep
++
++def _get_colon(path):
++ if isinstance(path, bytes):
++ return b':'
++ else:
++ 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 @@ def normcase(s):
+ 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.
+@@ -76,14 +101,9 @@ def isabs(s):
+ # 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.
+@@ -142,14 +162,9 @@ def splitdrive(p):
+ """
+ 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:
+@@ -203,9 +218,9 @@ def split(p):
+ 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__
+
+
+@@ -450,15 +465,13 @@ def expandvars(path):
+ 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 = ('\\\\.\\', '\\\\?\\')
+@@ -668,6 +681,7 @@ else:
+ # strip the prefix anyway.
+ if ex.winerror == initial_winerror:
+ path = spath
++ path = normpath(path)
+ return path
+
+
+@@ -678,12 +692,11 @@ supports_unicode_filenames = (hasattr(sys, "getwindowsversion") and
+ 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 = '..'
+
+@@ -738,13 +751,11 @@ def commonpath(paths):
+ 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 --git a/Modules/posixmodule.c b/Modules/posixmodule.c
+index 3f3e1f3..1e61545 100644
+--- a/Modules/posixmodule.c
++++ b/Modules/posixmodule.c
+@@ -3759,6 +3759,7 @@ posix_getcwd(int use_bytes)
+ return PyErr_SetFromWindowsErr(0);
+ }
+
++ Py_NormalizeSepsW(wbuf2);
+ PyObject *resobj = PyUnicode_FromWideChar(wbuf2, len);
+ if (wbuf2 != wbuf) {
+ PyMem_RawFree(wbuf2);
+@@ -4322,6 +4323,7 @@ os__getfinalpathname_impl(PyObject *module, path_t *path)
+ 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 --git a/Python/initconfig.c b/Python/initconfig.c
+index 3caed38..d8f0005 100644
+--- a/Python/initconfig.c
++++ b/Python/initconfig.c
+@@ -136,7 +136,7 @@ static const char usage_6[] =
+ "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 "<prefix>\\python{major}{minor}"
+ #else
+ # define PYTHONHOMEHELP "<prefix>/lib/pythonX.X"
+@@ -1187,7 +1187,7 @@ config_init_program_name(PyConfig *config)
+ }
+
+ /* 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 --git a/Python/pathconfig.c b/Python/pathconfig.c
+index 9a30221..267ee4d 100644
+--- a/Python/pathconfig.c
++++ b/Python/pathconfig.c
+@@ -15,6 +15,114 @@
+ extern "C" {
+ #endif
+
++#ifdef __MINGW32__
++#define wcstok wcstok_s
++#include <windows.h>
++#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;
+
+@@ -541,6 +649,7 @@ _Py_SetProgramFullPath(const wchar_t *program_full_path)
+ if (_Py_path_config.program_full_path == NULL) {
+ path_out_of_memory(__func__);
+ }
++ Py_NormalizeSepsW(_Py_path_config.program_name);
+ }
+
+
+diff --git a/Python/traceback.c b/Python/traceback.c
+index a9a9dd9..e8d2786 100644
+--- a/Python/traceback.c
++++ b/Python/traceback.c
+@@ -314,7 +314,7 @@ _Py_FindSourceFile(PyObject *filename, char* namebuf, size_t namelen, PyObject *
+ 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
+--
+2.32.0
+
diff --git a/0039-mingw-use-posix-getpath.patch b/0039-mingw-use-posix-getpath.patch
new file mode 100644
index 000000000000..608e6aa64867
--- /dev/null
+++ b/0039-mingw-use-posix-getpath.patch
@@ -0,0 +1,505 @@
+From afe9fc7a1ffad8f5054050ecdc79203359c55d60 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?=
+ <alexey.pawlow@gmail.com>
+Date: Thu, 17 Jun 2021 18:51:47 +0530
+Subject: [PATCH 039/N] mingw use posix getpath
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Co-authored-by: Алексей <alexey.pawlow@gmail.com>
+Co-authored-by: Christoph Reiter <reiter.christoph@gmail.com>
+---
+ Include/cpython/fileutils.h | 3 +-
+ Include/pylifecycle.h | 2 +-
+ Modules/getpath.c | 131 +++++++++++++++++++++++++++++++++---
+ Modules/posixmodule.c | 2 +-
+ Python/dynload_win.c | 2 +
+ Python/fileutils.c | 22 +++++-
+ 6 files changed, 146 insertions(+), 16 deletions(-)
+
+diff --git a/Include/cpython/fileutils.h b/Include/cpython/fileutils.h
+index e79d03e..c222833 100644
+--- a/Include/cpython/fileutils.h
++++ b/Include/cpython/fileutils.h
+@@ -136,9 +136,8 @@ PyAPI_FUNC(wchar_t*) _Py_wrealpath(
+ size_t resolved_path_len);
+ #endif
+
+-#ifndef MS_WINDOWS
+ PyAPI_FUNC(int) _Py_isabs(const wchar_t *path);
+-#endif
++PyAPI_FUNC(int) _Py_issep(const wchar_t ch);
+
+ PyAPI_FUNC(int) _Py_abspath(const wchar_t *path, wchar_t **abspath_p);
+
+diff --git a/Include/pylifecycle.h b/Include/pylifecycle.h
+index 4eec669..b34f110 100644
+--- a/Include/pylifecycle.h
++++ b/Include/pylifecycle.h
+@@ -55,7 +55,7 @@ PyAPI_FUNC(wchar_t *) Py_GetPrefix(void);
+ 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 --git a/Modules/getpath.c b/Modules/getpath.c
+index 728ecad..3010182 100644
+--- a/Modules/getpath.c
++++ b/Modules/getpath.c
+@@ -13,6 +13,11 @@
+ # include <mach-o/dyld.h>
+ #endif
+
++#ifdef MS_WINDOWS
++#include <windows.h>
++#include <shlwapi.h>
++#endif
++
+ /* Search in some common locations for the associated Python libraries.
+ *
+ * Two directories must be found, the platform independent directory
+@@ -129,6 +134,7 @@ typedef struct {
+ wchar_t *prefix_macro; /* PREFIX macro */
+ wchar_t *exec_prefix_macro; /* EXEC_PREFIX macro */
+ wchar_t *vpath_macro; /* VPATH macro */
++ wchar_t *dll_path; /* DLL Path */
+
+ wchar_t *lib_python; /* <platlibdir> / "pythonX.Y" */
+
+@@ -146,7 +152,7 @@ typedef struct {
+ } PyCalculatePath;
+
+ static const wchar_t delimiter[2] = {DELIM, '\0'};
+-static const wchar_t separator[2] = {SEP, '\0'};
++static wchar_t separator[2] = {SEP, '\0'};
+
+
+ /* Get file status. Encode the path to the locale encoding. */
+@@ -170,7 +176,7 @@ static void
+ reduce(wchar_t *dir)
+ {
+ size_t i = wcslen(dir);
+- while (i > 0 && dir[i] != SEP) {
++ while (i > 0 && !_Py_issep(dir[i])) {
+ --i;
+ }
+ dir[i] = '\0';
+@@ -224,6 +230,9 @@ isdir(const wchar_t *filename)
+ return 1;
+ }
+
++/*
++x86_64-w64-mingw32-gcc -c -Wno-unused-result -Wsign-compare -DNDEBUG -march=x86-64 -mtune=generic -O2 -pipe -fwrapv -D__USE_MINGW_ANSI_STDIO=1 -D_WIN32_WINNT=0x0601 -DNDEBUG -DMS_DLL_ID="\"3.9\"" -flto -fuse-linker-plugin -ffat-lto-objects -flto-partition=none -g -std=c99 -Wextra -Wno-unused-result -Wno-unused-parameter -Wno-missing-field-initializers -Wstrict-prototypes -Werror=implicit-function-declaration -fvisibility=hidden -fprofile-generate -I../Python-3.9.4/Include/internal -IObjects -IInclude -IPython -I. -I../Python-3.9.4/Include -I../Python-3.9.4/PC -D__USE_MINGW_ANSI_STDIO=1 -IC:/msys64/mingw64/include/ncurses -I. -DPy_BUILD_CORE -DPYTHONPATH='""' -DPREFIX='"/mingw64"' -DEXEC_PREFIX='"/mingw64"' -DVERSION='"3.9"' -DVPATH='"../Python-3.9.4"' -o Modules/getpath.o ../Python-3.9.4/Modules/getpath.c
++*/
+
+ /* Add a path component, by appending stuff to buffer.
+ buflen: 'buffer' length in characters including trailing NUL.
+@@ -242,8 +251,8 @@ joinpath(wchar_t *path, const wchar_t *path2, size_t path_len)
+ return PATHLEN_ERR();
+ }
+
+- if (n > 0 && path[n-1] != SEP) {
+- path[n++] = SEP;
++ if (n > 0 && !_Py_issep(path[n-1])) {
++ path[n++] = Py_GetSepW(path);
+ }
+ }
+ else {
+@@ -285,7 +294,7 @@ joinpath2(const wchar_t *path, const wchar_t *path2)
+ }
+
+ size_t len = wcslen(path);
+- int add_sep = (len > 0 && path[len - 1] != SEP);
++ int add_sep = (len > 0 && !_Py_issep(path[len - 1]));
+ len += add_sep;
+ len += wcslen(path2);
+
+@@ -334,7 +343,7 @@ copy_absolute(wchar_t *abs_path, const wchar_t *path, size_t abs_path_len)
+ }
+ return _PyStatus_OK();
+ }
+- if (path[0] == '.' && path[1] == SEP) {
++ if (path[0] == '.' && _Py_issep(path[1])) {
+ path += 2;
+ }
+ PyStatus status = joinpath(abs_path, path, abs_path_len);
+@@ -478,6 +487,7 @@ search_for_prefix(PyCalculatePath *calculate, _PyPathConfig *pathconfig,
+ return _PyStatus_NO_MEMORY();
+ }
+
++ Py_NormalizeSepsW(path);
+ int is_build_dir = isfile(path);
+ PyMem_RawFree(path);
+
+@@ -502,6 +512,7 @@ search_for_prefix(PyCalculatePath *calculate, _PyPathConfig *pathconfig,
+ }
+
+ int module;
++ Py_NormalizeSepsW(prefix);
+ status = ismodule(prefix, &module);
+ if (_PyStatus_EXCEPTION(status)) {
+ return status;
+@@ -528,6 +539,7 @@ search_for_prefix(PyCalculatePath *calculate, _PyPathConfig *pathconfig,
+ }
+
+ int module;
++ Py_NormalizeSepsW(prefix);
+ status = ismodule(prefix, &module);
+ if (_PyStatus_EXCEPTION(status)) {
+ return status;
+@@ -551,6 +563,7 @@ search_for_prefix(PyCalculatePath *calculate, _PyPathConfig *pathconfig,
+ }
+
+ int module;
++ Py_NormalizeSepsW(prefix);
+ status = ismodule(prefix, &module);
+ if (_PyStatus_EXCEPTION(status)) {
+ return status;
+@@ -610,6 +623,11 @@ calculate_set_prefix(PyCalculatePath *calculate, _PyPathConfig *pathconfig)
+ * return the compiled-in defaults instead.
+ */
+ if (calculate->prefix_found > 0) {
++#ifdef MS_WINDOWS
++ wchar_t drive_root[3];
++ memset(drive_root, 0, sizeof(drive_root));
++ wcsncpy(drive_root, calculate->prefix, 3);
++#endif
+ wchar_t *prefix = _PyMem_RawWcsdup(calculate->prefix);
+ if (prefix == NULL) {
+ return _PyStatus_NO_MEMORY();
+@@ -625,7 +643,11 @@ calculate_set_prefix(PyCalculatePath *calculate, _PyPathConfig *pathconfig)
+
+ /* The prefix is the root directory, but reduce() chopped
+ off the "/". */
++#ifdef MS_WINDOWS
++ pathconfig->prefix = _PyMem_RawWcsdup(drive_root);
++#else
+ pathconfig->prefix = _PyMem_RawWcsdup(separator);
++#endif
+ if (pathconfig->prefix == NULL) {
+ return _PyStatus_NO_MEMORY();
+ }
+@@ -682,6 +704,7 @@ calculate_pybuilddir(const wchar_t *argv0_path,
+ return PATHLEN_ERR();
+ }
+ status = joinpath(exec_prefix, pybuilddir, exec_prefix_len);
++ Py_NormalizeSepsW(exec_prefix);
+ PyMem_RawFree(pybuilddir);
+ if (_PyStatus_EXCEPTION(status)) {
+ return status;
+@@ -730,6 +753,7 @@ search_for_exec_prefix(PyCalculatePath *calculate, _PyPathConfig *pathconfig,
+
+ /* Check for pybuilddir.txt */
+ assert(*found == 0);
++ Py_NormalizeSepsW(exec_prefix);
+ status = calculate_pybuilddir(calculate->argv0_path,
+ exec_prefix, exec_prefix_len, found);
+ if (_PyStatus_EXCEPTION(status)) {
+@@ -804,6 +828,7 @@ calculate_exec_prefix(PyCalculatePath *calculate, _PyPathConfig *pathconfig)
+ return status;
+ }
+
++ Py_NormalizeSepsW(exec_prefix);
+ if (!calculate->exec_prefix_found) {
+ if (calculate->warnings) {
+ fprintf(stderr,
+@@ -836,6 +861,47 @@ calculate_exec_prefix(PyCalculatePath *calculate, _PyPathConfig *pathconfig)
+ }
+
+
++#ifdef MS_WINDOWS
++wchar_t *
++GetWindowsModulePaths(void)
++{
++ 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);
++ }
++
++ return _PyMem_RawWcsdup(program_full_path);
++}
++
++
++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_set_exec_prefix(PyCalculatePath *calculate,
+ _PyPathConfig *pathconfig)
+@@ -846,6 +912,12 @@ calculate_set_exec_prefix(PyCalculatePath *calculate,
+ return _PyStatus_NO_MEMORY();
+ }
+
++#ifdef MS_WINDOWS
++ wchar_t drive_root[3];
++ memset(drive_root, 0, sizeof(drive_root));
++ wcsncpy(drive_root, calculate->exec_prefix, 3);
++#endif
++
+ reduce(exec_prefix);
+ reduce(exec_prefix);
+ reduce(exec_prefix);
+@@ -859,7 +931,11 @@ calculate_set_exec_prefix(PyCalculatePath *calculate,
+
+ /* The exec_prefix is the root directory, but reduce() chopped
+ off the "/". */
++#ifdef MS_WINDOWS
++ pathconfig->exec_prefix = _PyMem_RawWcsdup(drive_root);
++#else
+ pathconfig->exec_prefix = _PyMem_RawWcsdup(separator);
++#endif
+ if (pathconfig->exec_prefix == NULL) {
+ return _PyStatus_NO_MEMORY();
+ }
+@@ -964,13 +1040,22 @@ calculate_program_impl(PyCalculatePath *calculate, _PyPathConfig *pathconfig)
+ * 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))) {
+ pathconfig->program_full_path = _PyMem_RawWcsdup(pathconfig->program_name);
+ if (pathconfig->program_full_path == NULL) {
+ return _PyStatus_NO_MEMORY();
+ }
+ return _PyStatus_OK();
+ }
++#ifdef MS_WINDOWS
++ else if(pathconfig->program_full_path == NULL) {
++ pathconfig->program_full_path = GetWindowsModulePaths();
++ if (pathconfig->program_full_path == NULL) {
++ return _PyStatus_NO_MEMORY();
++ }
++ return _PyStatus_OK();
++ }
++#endif /* MS_WINDOWS */
+
+ #ifdef __APPLE__
+ wchar_t *abs_path = NULL;
+@@ -1007,7 +1092,7 @@ calculate_program_impl(PyCalculatePath *calculate, _PyPathConfig *pathconfig)
+
+
+ /* Calculate pathconfig->program_full_path */
+-static PyStatus
++PyStatus
+ calculate_program(PyCalculatePath *calculate, _PyPathConfig *pathconfig)
+ {
+ PyStatus status;
+@@ -1173,7 +1258,7 @@ done:
+ #endif
+
+
+-static PyStatus
++PyStatus
+ calculate_argv0_path(PyCalculatePath *calculate,
+ _PyPathConfig *pathconfig)
+ {
+@@ -1191,10 +1276,12 @@ calculate_argv0_path(PyCalculatePath *calculate,
+ }
+ #endif
+
++#if defined(HAVE_READLINK)
+ status = resolve_symlinks(&calculate->argv0_path);
+ if (_PyStatus_EXCEPTION(status)) {
+ return status;
+ }
++#endif
+
+ reduce(calculate->argv0_path);
+
+@@ -1329,6 +1416,8 @@ calculate_zip_path(PyCalculatePath *calculate)
+ calculate->zip_path[len - 6] = VERSION[0];
+ calculate->zip_path[len - 5] = VERSION[2];
+
++ Py_NormalizeSepsW(calculate->zip_path);
++
+ res = _PyStatus_OK();
+
+ done:
+@@ -1368,7 +1457,14 @@ calculate_module_search_path(PyCalculatePath *calculate,
+ }
+
+ bufsz += wcslen(calculate->zip_path) + 1;
++/* TODO :: The MS_WINDOWS bit may be unnecessary. */
++#ifdef MS_WINDOWS
++ if (_Py_isabs(calculate->exec_prefix)) {
++ bufsz += wcslen(calculate->exec_prefix) + 1;
++ }
++#else
+ bufsz += wcslen(calculate->exec_prefix) + 1;
++#endif
+
+ /* Allocate the buffer */
+ wchar_t *buf = PyMem_RawMalloc(bufsz * sizeof(wchar_t));
+@@ -1396,7 +1492,7 @@ calculate_module_search_path(PyCalculatePath *calculate,
+
+ if (!_Py_isabs(defpath)) {
+ wcscat(buf, calculate->prefix);
+- if (prefixsz >= 2 && calculate->prefix[prefixsz - 2] != SEP &&
++ if (prefixsz >= 2 && !_Py_issep(calculate->prefix[prefixsz - 2]) &&
+ defpath[0] != (delim ? DELIM : L'\0'))
+ {
+ /* not empty */
+@@ -1418,8 +1514,15 @@ calculate_module_search_path(PyCalculatePath *calculate,
+ }
+ wcscat(buf, delimiter);
+
++#ifdef MS_WINDOWS
++ if (_Py_isabs(calculate->exec_prefix)) {
++ wcscat(buf, calculate->exec_prefix);
++ wcscat(buf, delimiter);
++ }
++#else
+ /* Finally, on goes the directory for dynamic-load modules */
+ wcscat(buf, calculate->exec_prefix);
++#endif
+
+ pathconfig->module_search_path = buf;
+ return _PyStatus_OK();
+@@ -1448,14 +1551,17 @@ calculate_init(PyCalculatePath *calculate, const PyConfig *config)
+ if (!calculate->pythonpath_macro) {
+ return DECODE_LOCALE_ERR("PYTHONPATH macro", len);
+ }
++ Py_NormalizeSepsW(calculate->pythonpath_macro);
+ calculate->prefix_macro = Py_DecodeLocale(PREFIX, &len);
+ if (!calculate->prefix_macro) {
+ return DECODE_LOCALE_ERR("PREFIX macro", len);
+ }
++ Py_NormalizeSepsW(calculate->prefix_macro);
+ calculate->exec_prefix_macro = Py_DecodeLocale(EXEC_PREFIX, &len);
+ if (!calculate->exec_prefix_macro) {
+ return DECODE_LOCALE_ERR("EXEC_PREFIX macro", len);
+ }
++ Py_NormalizeSepsW(calculate->exec_prefix_macro);
+ calculate->vpath_macro = Py_DecodeLocale(VPATH, &len);
+ if (!calculate->vpath_macro) {
+ return DECODE_LOCALE_ERR("VPATH macro", len);
+@@ -1466,6 +1572,7 @@ calculate_init(PyCalculatePath *calculate, const PyConfig *config)
+ if (!pyversion) {
+ return DECODE_LOCALE_ERR("VERSION macro", len);
+ }
++
+ calculate->lib_python = joinpath2(config->platlibdir, pyversion);
+ PyMem_RawFree(pyversion);
+ if (calculate->lib_python == NULL) {
+@@ -1482,6 +1589,7 @@ calculate_free(PyCalculatePath *calculate)
+ PyMem_RawFree(calculate->pythonpath_macro);
+ PyMem_RawFree(calculate->prefix_macro);
+ PyMem_RawFree(calculate->exec_prefix_macro);
++ PyMem_RawFree(calculate->dll_path);
+ PyMem_RawFree(calculate->vpath_macro);
+ PyMem_RawFree(calculate->lib_python);
+ PyMem_RawFree(calculate->path_env);
+@@ -1497,6 +1605,8 @@ calculate_path(PyCalculatePath *calculate, _PyPathConfig *pathconfig)
+ {
+ PyStatus status;
+
++ calculate->dll_path = _Py_GetDLLPath();
++
+ if (pathconfig->program_full_path == NULL) {
+ status = calculate_program(calculate, pathconfig);
+ if (_PyStatus_EXCEPTION(status)) {
+@@ -1597,6 +1707,7 @@ _PyPathConfig_Calculate(_PyPathConfig *pathconfig, const PyConfig *config)
+ {
+ PyStatus status;
+ PyCalculatePath calculate;
++ separator[0] = Py_GetSepW(NULL);
+ memset(&calculate, 0, sizeof(calculate));
+
+ status = calculate_init(&calculate, config);
+diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c
+index 1e61545..40fc270 100644
+--- a/Modules/posixmodule.c
++++ b/Modules/posixmodule.c
+@@ -4049,7 +4049,7 @@ _listdir_windows_no_opendir(path_t *path, PyObject *list)
+ 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 --git a/Python/dynload_win.c b/Python/dynload_win.c
+index 9d7690e..bd34310 100644
+--- a/Python/dynload_win.c
++++ b/Python/dynload_win.c
+@@ -174,7 +174,9 @@ dl_funcptr _PyImport_FindSharedFuncptrWindows(const char *prefix,
+ char funcname[258], *import_python;
+ const wchar_t *wpathname;
+
++#if defined(_MSC_VER)
+ _Py_CheckPython3();
++#endif
+
+ _Py_COMP_DIAG_PUSH
+ _Py_COMP_DIAG_IGNORE_DEPR_DECLS
+diff --git a/Python/fileutils.c b/Python/fileutils.c
+index 45ea204..d5f8b79 100644
+--- a/Python/fileutils.c
++++ b/Python/fileutils.c
+@@ -1924,13 +1924,31 @@ _Py_wrealpath(const wchar_t *path,
+ #endif
+
+
+-#ifndef MS_WINDOWS
+ int
+ _Py_isabs(const wchar_t *path)
+ {
+- return (path[0] == SEP);
++#ifdef MS_WINDOWS
++ size_t i = wcslen(path);
++ if (i >= 3) {
++ if (iswalpha(path[0]) && path[1] == L':' && _Py_issep(path[2])) {
++ return 1;
++ }
++ }
++ return 0;
++#else
++ return _Py_issep(path[0]);
++#endif
+ }
++
++int
++_Py_issep(const wchar_t ch)
++{
++#ifdef MS_WINDOWS
++ return ch == SEP || ch == ALTSEP;
++#else
++ return ch == SEP;
+ #endif
++}
+
+
+ /* Get an absolute path.
+--
+2.32.0
+
diff --git a/0040-mingw-add-ModuleFileName-dir-to-PATH.patch b/0040-mingw-add-ModuleFileName-dir-to-PATH.patch
new file mode 100644
index 000000000000..c04ca93b169c
--- /dev/null
+++ b/0040-mingw-add-ModuleFileName-dir-to-PATH.patch
@@ -0,0 +1,58 @@
+From a8c10ce1867cef6470abf110d26cfc47ed4c5e5a Mon Sep 17 00:00:00 2001
+From: Ray Donnelly <mingw.android@gmail.com>
+Date: Thu, 17 Jun 2021 18:51:48 +0530
+Subject: [PATCH 040/N] mingw add ModuleFileName dir to PATH
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Co-authored-by: Алексей <alexey.pawlow@gmail.com>
+Co-authored-by: Christoph Reiter <reiter.christoph@gmail.com>
+---
+ Modules/getpath.c | 30 ++++++++++++++++++++++++++++++
+ 1 file changed, 30 insertions(+)
+
+diff --git a/Modules/getpath.c b/Modules/getpath.c
+index 3010182..c52e0df 100644
+--- a/Modules/getpath.c
++++ b/Modules/getpath.c
+@@ -1641,6 +1641,36 @@ calculate_path(PyCalculatePath *calculate, _PyPathConfig *pathconfig)
+ 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)
+ {
+--
+2.32.0
+
diff --git a/0041-mingw-add-BUILDIN_WIN32_MODULEs-time-msvcrt.patch b/0041-mingw-add-BUILDIN_WIN32_MODULEs-time-msvcrt.patch
new file mode 100644
index 000000000000..a16cf46bfc37
--- /dev/null
+++ b/0041-mingw-add-BUILDIN_WIN32_MODULEs-time-msvcrt.patch
@@ -0,0 +1,27 @@
+From 6bd3b909a390939df82bdecf650f75509b752bd2 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?=
+ <alexey.pawlow@gmail.com>
+Date: Thu, 17 Jun 2021 18:51:49 +0530
+Subject: [PATCH 041/N] mingw add BUILDIN_WIN32_MODULEs time msvcrt
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Co-authored-by: Алексей <alexey.pawlow@gmail.com>
+---
+ Modules/Setup.config.in | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/Modules/Setup.config.in b/Modules/Setup.config.in
+index d071a74..825ce5d 100644
+--- a/Modules/Setup.config.in
++++ b/Modules/Setup.config.in
+@@ -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
+
+--
+2.32.0
+
diff --git a/0042-msys-cygwin-semi-native-build-sysconfig.patch b/0042-msys-cygwin-semi-native-build-sysconfig.patch
new file mode 100644
index 000000000000..010c212942a3
--- /dev/null
+++ b/0042-msys-cygwin-semi-native-build-sysconfig.patch
@@ -0,0 +1,126 @@
+From ae4be49d5a7fbdcbc2c82aa1359e7ead2c393854 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?=
+ <alexey.pawlow@gmail.com>
+Date: Thu, 17 Jun 2021 18:51:50 +0530
+Subject: [PATCH 042/N] msys cygwin semi native build sysconfig
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Co-authored-by: Алексей <alexey.pawlow@gmail.com>
+---
+ Lib/sysconfig.py | 8 +++++++
+ Makefile.pre.in | 7 ++++++
+ configure.ac | 59 ++++++++++++++++++++++++++++++++++++++++++++++++
+ 3 files changed, 74 insertions(+)
+
+diff --git a/Lib/sysconfig.py b/Lib/sysconfig.py
+index d4298f7..5d336d8 100644
+--- a/Lib/sysconfig.py
++++ b/Lib/sysconfig.py
+@@ -337,6 +337,14 @@ def _parse_makefile(filename, vars=None):
+ 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 --git a/Makefile.pre.in b/Makefile.pre.in
+index 223a266..5271dd8 100644
+--- a/Makefile.pre.in
++++ b/Makefile.pre.in
+@@ -137,6 +137,13 @@ exec_prefix= @exec_prefix@
+ # 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/configure.ac b/configure.ac
+index 453b80f..4586602 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -625,6 +625,65 @@ then
+ 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
+--
+2.32.0
+
diff --git a/0043-mingw-sysconfig-like-posix.patch b/0043-mingw-sysconfig-like-posix.patch
new file mode 100644
index 000000000000..71703067e972
--- /dev/null
+++ b/0043-mingw-sysconfig-like-posix.patch
@@ -0,0 +1,84 @@
+From 893ba3a5e55dc3e07bac6407075e3461a24f979f 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?=
+ <alexey.pawlow@gmail.com>
+Date: Thu, 17 Jun 2021 18:51:50 +0530
+Subject: [PATCH 043/N] mingw sysconfig like posix
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Co-authored-by: Алексей <alexey.pawlow@gmail.com>
+---
+ Lib/distutils/command/build_ext.py | 3 ++-
+ Lib/sysconfig.py | 28 ++++++++++++++--------------
+ 2 files changed, 16 insertions(+), 15 deletions(-)
+
+diff --git a/Lib/distutils/command/build_ext.py b/Lib/distutils/command/build_ext.py
+index 1c9d471..1dbdfe0 100644
+--- a/Lib/distutils/command/build_ext.py
++++ b/Lib/distutils/command/build_ext.py
+@@ -221,9 +221,10 @@ class build_ext(Command):
+ 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 --git a/Lib/sysconfig.py b/Lib/sysconfig.py
+index 5d336d8..c0695e2 100644
+--- a/Lib/sysconfig.py
++++ b/Lib/sysconfig.py
+@@ -48,23 +48,23 @@ _INSTALL_SCHEMES = {
+ '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': {
+@@ -470,7 +470,7 @@ def _init_non_posix(vars):
+ vars['INCLUDEPY'] = get_path('include')
+ vars['EXT_SUFFIX'] = _imp.extension_suffixes()[0]
+ vars['EXE'] = '.exe'
+- vars['VERSION'] = _PY_VERSION_SHORT_NO_DOT
++ vars['VERSION'] = _PY_VERSION_SHORT
+ vars['BINDIR'] = os.path.dirname(_safe_realpath(sys.executable))
+
+ #
+--
+2.32.0
+
diff --git a/0044-mingw-_winapi_as_builtin_for_Popen_in_cygwinccompile.patch b/0044-mingw-_winapi_as_builtin_for_Popen_in_cygwinccompile.patch
new file mode 100644
index 000000000000..5f109c9cdc03
--- /dev/null
+++ b/0044-mingw-_winapi_as_builtin_for_Popen_in_cygwinccompile.patch
@@ -0,0 +1,84 @@
+From c4507430c95893ad2be0a1796f8dc7a7962ef789 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?=
+ <alexey.pawlow@gmail.com>
+Date: Thu, 17 Jun 2021 18:51:51 +0530
+Subject: [PATCH 044/N] mingw _winapi_as_builtin_for_Popen_in_cygwinccompiler
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Co-authored-by: Алексей <alexey.pawlow@gmail.com>
+Co-authored-by: Christoph Reiter <reiter.christoph@gmail.com>
+---
+ Lib/distutils/cygwinccompiler.py | 14 ++++++++++++--
+ Modules/Setup.config.in | 1 +
+ setup.py | 4 +++-
+ 3 files changed, 16 insertions(+), 3 deletions(-)
+
+diff --git a/Lib/distutils/cygwinccompiler.py b/Lib/distutils/cygwinccompiler.py
+index 5b281e2..f90af3b 100644
+--- a/Lib/distutils/cygwinccompiler.py
++++ b/Lib/distutils/cygwinccompiler.py
+@@ -56,6 +56,7 @@ from distutils.errors import (DistutilsExecError, CCompilerError,
+ CompileError, UnknownFileError)
+ 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
+@@ -371,7 +372,7 @@ def check_config_h():
+ 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.
+@@ -400,7 +401,16 @@ def get_versions():
+
+ 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 --git a/Modules/Setup.config.in b/Modules/Setup.config.in
+index 825ce5d..b4e7ff7 100644
+--- a/Modules/Setup.config.in
++++ b/Modules/Setup.config.in
+@@ -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 --git a/setup.py b/setup.py
+index 72f1281..36af6e9 100644
+--- a/setup.py
++++ b/setup.py
+@@ -1607,7 +1607,9 @@ class PyBuildExt(build_ext):
+ 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']],
+--
+2.32.0
+
diff --git a/0045-cross-dont-add-multiarch-paths-if-cross-compiling.patch b/0045-cross-dont-add-multiarch-paths-if-cross-compiling.patch
new file mode 100644
index 000000000000..e65d5bb1aa37
--- /dev/null
+++ b/0045-cross-dont-add-multiarch-paths-if-cross-compiling.patch
@@ -0,0 +1,33 @@
+From c919ed9405978c2261712b8e8e860b12f7001057 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?=
+ <alexey.pawlow@gmail.com>
+Date: Thu, 17 Jun 2021 18:51:52 +0530
+Subject: [PATCH 045/N] cross dont add multiarch paths if cross compiling
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Co-authored-by: Алексей <alexey.pawlow@gmail.com>
+---
+ setup.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/setup.py b/setup.py
+index 36af6e9..55c7382 100644
+--- a/setup.py
++++ b/setup.py
+@@ -734,10 +734,10 @@ class PyBuildExt(build_ext):
+ 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):
+--
+2.32.0
+
diff --git a/0046-mingw-use-backslashes-in-compileall-py.patch b/0046-mingw-use-backslashes-in-compileall-py.patch
new file mode 100644
index 000000000000..f7a383a0b58f
--- /dev/null
+++ b/0046-mingw-use-backslashes-in-compileall-py.patch
@@ -0,0 +1,30 @@
+From 0525d209616594f74c395e8db04aa745f6b190e2 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?=
+ <alexey.pawlow@gmail.com>
+Date: Thu, 17 Jun 2021 18:51:53 +0530
+Subject: [PATCH 046/N] mingw use backslashes in compileall py
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Co-authored-by: Алексей <alexey.pawlow@gmail.com>
+---
+ Lib/compileall.py | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/Lib/compileall.py b/Lib/compileall.py
+index fe7f450..4102839 100644
+--- a/Lib/compileall.py
++++ b/Lib/compileall.py
+@@ -38,6 +38,8 @@ def _walk_dir(dir, maxlevels, quiet=0):
+ if name == '__pycache__':
+ continue
+ fullname = os.path.join(dir, name)
++ if sys.platform == "win32" and sys.version.find("GCC") >= 0:
++ fullname = fullname.replace('\\','/')
+ if not os.path.isdir(fullname):
+ yield fullname
+ elif (maxlevels > 0 and name != os.curdir and name != os.pardir and
+--
+2.32.0
+
diff --git a/0047-msys-convert_path-fix-and-root-hack.patch b/0047-msys-convert_path-fix-and-root-hack.patch
new file mode 100644
index 000000000000..75425a9ed981
--- /dev/null
+++ b/0047-msys-convert_path-fix-and-root-hack.patch
@@ -0,0 +1,117 @@
+From c96759da7b85fe3100ea018eabcce4fb11008212 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?=
+ <alexey.pawlow@gmail.com>
+Date: Thu, 17 Jun 2021 18:51:54 +0530
+Subject: [PATCH 047/N] msys convert_path fix and root hack
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Co-authored-by: Алексей <alexey.pawlow@gmail.com>
+Co-authored-by: Christoph Reiter <reiter.christoph@gmail.com>
+Co-authored-by: Audrey Dutcher <audrey@rhelmot.io>
+---
+ Lib/distutils/command/install.py | 3 ++-
+ Lib/distutils/util.py | 26 ++++++++++++++++++++++++--
+ Makefile.pre.in | 12 +++++++++---
+ 3 files changed, 35 insertions(+), 6 deletions(-)
+
+diff --git a/Lib/distutils/command/install.py b/Lib/distutils/command/install.py
+index aaa300e..eea417e 100644
+--- a/Lib/distutils/command/install.py
++++ b/Lib/distutils/command/install.py
+@@ -342,7 +342,8 @@ class install(Command):
+
+ # 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 --git a/Lib/distutils/util.py b/Lib/distutils/util.py
+index 7b2e1e0..75a369d 100644
+--- a/Lib/distutils/util.py
++++ b/Lib/distutils/util.py
+@@ -131,6 +131,13 @@ def convert_path (pathname):
+ 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 ()
+@@ -141,6 +148,10 @@ def change_root (new_root, pathname):
+ 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):
+@@ -150,9 +161,20 @@ def change_root (new_root, pathname):
+
+ 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 --git a/Makefile.pre.in b/Makefile.pre.in
+index 5271dd8..72be72d 100644
+--- a/Makefile.pre.in
++++ b/Makefile.pre.in
+@@ -1707,6 +1707,12 @@ libainstall: @DEF_MAKE_RULE@ python-config
+ 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
+@@ -1714,9 +1720,9 @@ sharedinstall: sharedmods
+ --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
+--
+2.32.0
+
diff --git a/0048-allow-static-tcltk.patch b/0048-allow-static-tcltk.patch
new file mode 100644
index 000000000000..328021e72e4b
--- /dev/null
+++ b/0048-allow-static-tcltk.patch
@@ -0,0 +1,87 @@
+From 6777f17ccae090e6687d6317b4dafcb0c8899f8f 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?=
+ <alexey.pawlow@gmail.com>
+Date: Thu, 17 Jun 2021 18:51:54 +0530
+Subject: [PATCH 048/N] allow static tcltk
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Co-authored-by: Алексей <alexey.pawlow@gmail.com>
+---
+ setup.py | 35 +++++++++++++++++++++++++----------
+ 1 file changed, 25 insertions(+), 10 deletions(-)
+
+diff --git a/setup.py b/setup.py
+index 55c7382..d8fc413 100644
+--- a/setup.py
++++ b/setup.py
+@@ -783,7 +783,7 @@ class PyBuildExt(build_ext):
+ 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.
+@@ -793,6 +793,8 @@ class PyBuildExt(build_ext):
+ # 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:])
+@@ -2042,14 +2044,19 @@ class PyBuildExt(build_ext):
+ # 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
+@@ -2120,10 +2127,18 @@ class PyBuildExt(build_ext):
+ # 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:
+--
+2.32.0
+
diff --git a/0049-mingw-pdcurses_ISPAD.patch b/0049-mingw-pdcurses_ISPAD.patch
new file mode 100644
index 000000000000..1417c8f4698b
--- /dev/null
+++ b/0049-mingw-pdcurses_ISPAD.patch
@@ -0,0 +1,35 @@
+From 88deca4afdb3762987227d4aa3cd50cfc8658ea7 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?=
+ <alexey.pawlow@gmail.com>
+Date: Thu, 17 Jun 2021 18:51:55 +0530
+Subject: [PATCH 049/N] mingw pdcurses_ISPAD
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Co-authored-by: Алексей <alexey.pawlow@gmail.com>
+---
+ Include/py_curses.h | 7 +++++++
+ 1 file changed, 7 insertions(+)
+
+diff --git a/Include/py_curses.h b/Include/py_curses.h
+index b70252d..0d5cee2 100644
+--- a/Include/py_curses.h
++++ b/Include/py_curses.h
+@@ -36,6 +36,13 @@
+ #include <curses.h>
+ #endif
+
++#if defined(__MINGW32__)
++#include <windows.h>
++#if !defined(_ISPAD)
++#define _ISPAD 0x10
++#endif
++#endif
++
+ #ifdef HAVE_NCURSES_H
+ /* configure was checking <curses.h>, but we will
+ use <ncurses.h>, which has some or all these features. */
+--
+2.32.0
+
diff --git a/0050-grammar-fixes.patch b/0050-grammar-fixes.patch
new file mode 100644
index 000000000000..cc3d5f8eb08d
--- /dev/null
+++ b/0050-grammar-fixes.patch
@@ -0,0 +1,45 @@
+From ece4431ade66c4abb835a489cacc002545ccb13a 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?=
+ <alexey.pawlow@gmail.com>
+Date: Thu, 17 Jun 2021 18:51:56 +0530
+Subject: [PATCH 050/N] grammar fixes
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Co-authored-by: Алексей <alexey.pawlow@gmail.com>
+---
+ Modules/parsermodule.c | 2 +-
+ Python/graminit.c | 3 ++-
+ 2 files changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/Modules/parsermodule.c b/Modules/parsermodule.c
+index 24b0ffb..98a3759 100644
+--- a/Modules/parsermodule.c
++++ b/Modules/parsermodule.c
+@@ -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 <note.h>
+diff --git a/Python/graminit.c b/Python/graminit.c
+index b7aa528..4a1ee9a 100644
+--- a/Python/graminit.c
++++ b/Python/graminit.c
+@@ -2,7 +2,8 @@
+
+ #include "exports.h"
+ #include "grammar.h"
+-Py_EXPORTED_SYMBOL grammar _PyParser_Grammar;
++#include "pyport.h"
++PyAPI_DATA(grammar) _PyParser_Grammar;
+ static const arc arcs_0_0[3] = {
+ {2, 1},
+ {3, 2},
+--
+2.32.0
+
diff --git a/0051-builddir-fixes.patch b/0051-builddir-fixes.patch
new file mode 100644
index 000000000000..b23275dc8762
--- /dev/null
+++ b/0051-builddir-fixes.patch
@@ -0,0 +1,70 @@
+From 6e9ed94084c501600e2ba6fdaac4b49b252e654d 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?=
+ <alexey.pawlow@gmail.com>
+Date: Thu, 17 Jun 2021 18:51:57 +0530
+Subject: [PATCH 051/N] builddir fixes
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Co-authored-by: Алексей <alexey.pawlow@gmail.com>
+Co-authored-by: Christoph Reiter <reiter.christoph@gmail.com>
+---
+ Makefile.pre.in | 10 +++++-----
+ Programs/_freeze_importlib.c | 2 +-
+ 2 files changed, 6 insertions(+), 6 deletions(-)
+
+diff --git a/Makefile.pre.in b/Makefile.pre.in
+index 72be72d..7badeec 100644
+--- a/Makefile.pre.in
++++ b/Makefile.pre.in
+@@ -741,20 +741,20 @@ Programs/_testembed: Programs/_testembed.o $(LIBRARY) $(LDLIBRARY) $(PY3LIBRARY)
+
+ 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
+@@ -1882,7 +1882,7 @@ clean-retain-profile: pycremoval
+ 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 --git a/Programs/_freeze_importlib.c b/Programs/_freeze_importlib.c
+index 2e4ccbb..a8d5c31 100644
+--- a/Programs/_freeze_importlib.c
++++ b/Programs/_freeze_importlib.c
+@@ -20,7 +20,7 @@ static const struct _frozen _PyImport_FrozenModules[] = {
+ {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. */
+--
+2.32.0
+
diff --git a/0052-msys-monkeypatch-os-system-via-sh-exe.patch b/0052-msys-monkeypatch-os-system-via-sh-exe.patch
new file mode 100644
index 000000000000..185b77473043
--- /dev/null
+++ b/0052-msys-monkeypatch-os-system-via-sh-exe.patch
@@ -0,0 +1,39 @@
+From 2cafb98ac994c8befe0d053e6e1524af8ec6e180 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?=
+ <alexey.pawlow@gmail.com>
+Date: Thu, 17 Jun 2021 18:51:57 +0530
+Subject: [PATCH 052/N] msys monkeypatch os system via sh exe
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Co-authored-by: Алексей <alexey.pawlow@gmail.com>
+---
+ setup.py | 11 +++++++++++
+ 1 file changed, 11 insertions(+)
+
+diff --git a/setup.py b/setup.py
+index d8fc413..20fff27 100644
+--- a/setup.py
++++ b/setup.py
+@@ -58,6 +58,17 @@ def get_platform():
+ 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')
+--
+2.32.0
+
diff --git a/0053-msys-replace-slashes-used-in-io-redirection.patch b/0053-msys-replace-slashes-used-in-io-redirection.patch
new file mode 100644
index 000000000000..2d9f4a5aeea8
--- /dev/null
+++ b/0053-msys-replace-slashes-used-in-io-redirection.patch
@@ -0,0 +1,73 @@
+From c403bd9ac50aeda60b91f6c990f4f34bedf93bd3 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?=
+ <alexey.pawlow@gmail.com>
+Date: Thu, 17 Jun 2021 18:51:58 +0530
+Subject: [PATCH 053/N] msys replace slashes used in io redirection
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Co-authored-by: Алексей <alexey.pawlow@gmail.com>
+Co-authored-by: Christoph Reiter <reiter.christoph@gmail.com>
+---
+ setup.py | 12 ++++++------
+ 1 file changed, 6 insertions(+), 6 deletions(-)
+
+diff --git a/setup.py b/setup.py
+index 20fff27..f5914d8 100644
+--- a/setup.py
++++ b/setup.py
+@@ -643,7 +643,7 @@ class PyBuildExt(build_ext):
+ # 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 = run_command(
+@@ -668,7 +668,7 @@ class PyBuildExt(build_ext):
+ 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 = run_command(
+@@ -687,7 +687,7 @@ class PyBuildExt(build_ext):
+
+ 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 = run_command('%s -E -v - </dev/null 2>%s 1>/dev/null' % (cc, tmpfile))
+@@ -1001,7 +1001,7 @@ class PyBuildExt(build_ext):
+ 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.
+@@ -1998,12 +1998,12 @@ class PyBuildExt(build_ext):
+ 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)
+
+ run_command(
+- "file {}/Tk.framework/Tk | grep 'for architecture' > {}".format(F, tmpfile)
++ "file {}/Tk.framework/Tk | grep 'for architecture' > {}".format(F, tmpfile).replace('\\','/')
+ )
+ with open(tmpfile) as fp:
+ detected_archs = []
+--
+2.32.0
+
diff --git a/0054-mingw-install-layout-as-posix.patch b/0054-mingw-install-layout-as-posix.patch
new file mode 100644
index 000000000000..4e160b71bb01
--- /dev/null
+++ b/0054-mingw-install-layout-as-posix.patch
@@ -0,0 +1,47 @@
+From d2e564612e1c443c7e8b523e8d7e9ac34e522fc4 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?=
+ <alexey.pawlow@gmail.com>
+Date: Thu, 17 Jun 2021 18:51:59 +0530
+Subject: [PATCH 054/N] mingw install layout as posix
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Co-authored-by: Алексей <alexey.pawlow@gmail.com>
+---
+ Lib/distutils/command/install.py | 12 ++++++------
+ 1 file changed, 6 insertions(+), 6 deletions(-)
+
+diff --git a/Lib/distutils/command/install.py b/Lib/distutils/command/install.py
+index eea417e..f8c42c7 100644
+--- a/Lib/distutils/command/install.py
++++ b/Lib/distutils/command/install.py
+@@ -20,10 +20,10 @@ from site import USER_SITE
+ 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 @@ if HAS_USER_SITE:
+ 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',
+ }
+
+--
+2.32.0
+
diff --git a/0055-remove_path_max.default.patch b/0055-remove_path_max.default.patch
new file mode 100644
index 000000000000..864103a08d94
--- /dev/null
+++ b/0055-remove_path_max.default.patch
@@ -0,0 +1,29 @@
+From d7ddae846cd17e00caca8c969b55a057f3589fec 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?=
+ <alexey.pawlow@gmail.com>
+Date: Thu, 17 Jun 2021 18:51:59 +0530
+Subject: [PATCH 055/N] remove_path_max.default
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Co-authored-by: Алексей <alexey.pawlow@gmail.com>
+---
+ Include/osdefs.h | 1 -
+ 1 file changed, 1 deletion(-)
+
+diff --git a/Include/osdefs.h b/Include/osdefs.h
+index 3243944..99d4977 100644
+--- a/Include/osdefs.h
++++ b/Include/osdefs.h
+@@ -10,7 +10,6 @@ extern "C" {
+ #ifdef MS_WINDOWS
+ #define SEP L'\\'
+ #define ALTSEP L'/'
+-#define MAXPATHLEN 256
+ #define DELIM L';'
+ #endif
+
+--
+2.32.0
+
diff --git a/0056-dont-link-with-gettext.patch b/0056-dont-link-with-gettext.patch
new file mode 100644
index 000000000000..29901d402e19
--- /dev/null
+++ b/0056-dont-link-with-gettext.patch
@@ -0,0 +1,60 @@
+From fbe0b754bebcb09130fe8303ca180ef2221a8372 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?=
+ <alexey.pawlow@gmail.com>
+Date: Thu, 17 Jun 2021 18:52:00 +0530
+Subject: [PATCH 056/N] dont link with gettext
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Co-authored-by: Алексей <alexey.pawlow@gmail.com>
+---
+ Modules/_localemodule.c | 7 +++++++
+ configure.ac | 9 +++++++++
+ 2 files changed, 16 insertions(+)
+
+diff --git a/Modules/_localemodule.c b/Modules/_localemodule.c
+index 2e353bb..ea222af 100644
+--- a/Modules/_localemodule.c
++++ b/Modules/_localemodule.c
+@@ -12,6 +12,13 @@ This software comes with no warranty. Use at your own risk.
+ #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 <stdio.h>
+ #include <locale.h>
+diff --git a/configure.ac b/configure.ac
+index 4586602..1599c74 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -3154,10 +3154,19 @@ AC_SEARCH_LIBS(sem_init, pthread rt posix4)
+ 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
+--
+2.32.0
+
diff --git a/0057-ctypes-python-dll.patch b/0057-ctypes-python-dll.patch
new file mode 100644
index 000000000000..20359a481ec2
--- /dev/null
+++ b/0057-ctypes-python-dll.patch
@@ -0,0 +1,33 @@
+From 3347f3abb6dac9690e21055bb8a823870d4c9edd 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?=
+ <alexey.pawlow@gmail.com>
+Date: Thu, 17 Jun 2021 18:52:01 +0530
+Subject: [PATCH 057/N] ctypes python dll
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Co-authored-by: Алексей <alexey.pawlow@gmail.com>
+Co-authored-by: Christoph Reiter <reiter.christoph@gmail.com>
+---
+ Lib/ctypes/__init__.py | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/Lib/ctypes/__init__.py b/Lib/ctypes/__init__.py
+index 4afa4eb..2fe2eec 100644
+--- a/Lib/ctypes/__init__.py
++++ b/Lib/ctypes/__init__.py
+@@ -456,7 +456,9 @@ class LibraryLoader(object):
+ 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])
+--
+2.32.0
+
diff --git a/0058-gdbm-module-includes.patch b/0058-gdbm-module-includes.patch
new file mode 100644
index 000000000000..95e45acf78d2
--- /dev/null
+++ b/0058-gdbm-module-includes.patch
@@ -0,0 +1,30 @@
+From 886617c8d1d880ef0206debff313a068669e4e6f 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?=
+ <alexey.pawlow@gmail.com>
+Date: Thu, 17 Jun 2021 18:52:02 +0530
+Subject: [PATCH 058/N] gdbm module includes
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Co-authored-by: Алексей <alexey.pawlow@gmail.com>
+---
+ Modules/_gdbmmodule.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/Modules/_gdbmmodule.c b/Modules/_gdbmmodule.c
+index dd4c6b1..d51015c 100644
+--- a/Modules/_gdbmmodule.c
++++ b/Modules/_gdbmmodule.c
+@@ -11,7 +11,7 @@
+ #include <fcntl.h>
+ #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
+--
+2.32.0
+
diff --git a/0059-use-gnu_printf-in-format.patch b/0059-use-gnu_printf-in-format.patch
new file mode 100644
index 000000000000..adab14b23a0d
--- /dev/null
+++ b/0059-use-gnu_printf-in-format.patch
@@ -0,0 +1,85 @@
+From 3f773a3fb7c2ff965f5ec8dadb348a99ca5c2874 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?=
+ <alexey.pawlow@gmail.com>
+Date: Thu, 17 Jun 2021 18:52:03 +0530
+Subject: [PATCH 059/N] use gnu_printf in format
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Co-authored-by: Алексей <alexey.pawlow@gmail.com>
+---
+ Include/bytesobject.h | 4 ++--
+ Include/pyerrors.h | 4 ++--
+ Include/pyport.h | 6 ++++++
+ Include/sysmodule.h | 4 ++--
+ 4 files changed, 12 insertions(+), 6 deletions(-)
+
+diff --git a/Include/bytesobject.h b/Include/bytesobject.h
+index 5062d8d..627e8b2 100644
+--- a/Include/bytesobject.h
++++ b/Include/bytesobject.h
+@@ -38,9 +38,9 @@ PyAPI_FUNC(PyObject *) PyBytes_FromStringAndSize(const char *, Py_ssize_t);
+ 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_PRINTF(1, 0);
+ PyAPI_FUNC(PyObject *) PyBytes_FromFormat(const char*, ...)
+- Py_GCC_ATTRIBUTE((format(printf, 1, 2)));
++ Py_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 --git a/Include/pyerrors.h b/Include/pyerrors.h
+index 979a26b..28cfb0f 100644
+--- a/Include/pyerrors.h
++++ b/Include/pyerrors.h
+@@ -310,9 +310,9 @@ PyAPI_FUNC(int) PyUnicodeTranslateError_SetReason(
+ );
+
+ PyAPI_FUNC(int) PyOS_snprintf(char *str, size_t size, const char *format, ...)
+- Py_GCC_ATTRIBUTE((format(printf, 3, 4)));
++ Py_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_PRINTF(3, 0);
+
+ #ifndef Py_LIMITED_API
+ # define Py_CPYTHON_ERRORS_H
+diff --git a/Include/pyport.h b/Include/pyport.h
+index a05fa3a..0972630 100644
+--- a/Include/pyport.h
++++ b/Include/pyport.h
+@@ -798,6 +798,12 @@ extern char * _getpty(int *, int, mode_t, int);
+
+ #define Py_VA_COPY va_copy
+
++#if defined(__GNUC__) && ((__GNUC__ == 4 && __GNUC_MINOR__>= 4) || __GNUC__ > 4)
++# define Py_PRINTF(X,Y) Py_GCC_ATTRIBUTE((format(gnu_printf,X,Y)))
++#else
++# define Py_PRINTF(X,Y) Py_GCC_ATTRIBUTE((format(printf,X,Y)))
++#endif
++
+ /*
+ * Convenient macros to deal with endianness of the platform. WORDS_BIGENDIAN is
+ * detected by configure and defined in pyconfig.h. The code in pyconfig.h
+diff --git a/Include/sysmodule.h b/Include/sysmodule.h
+index 670e5d2..d582963 100644
+--- a/Include/sysmodule.h
++++ b/Include/sysmodule.h
+@@ -15,9 +15,9 @@ PyAPI_FUNC(void) PySys_SetArgvEx(int, wchar_t **, int);
+ PyAPI_FUNC(void) PySys_SetPath(const wchar_t *);
+
+ PyAPI_FUNC(void) PySys_WriteStdout(const char *format, ...)
+- Py_GCC_ATTRIBUTE((format(printf, 1, 2)));
++ Py_PRINTF(1, 2);
+ PyAPI_FUNC(void) PySys_WriteStderr(const char *format, ...)
+- Py_GCC_ATTRIBUTE((format(printf, 1, 2)));
++ Py_PRINTF(1, 2);
+ PyAPI_FUNC(void) PySys_FormatStdout(const char *format, ...);
+ PyAPI_FUNC(void) PySys_FormatStderr(const char *format, ...);
+
+--
+2.32.0
+
diff --git a/0060-mingw-fix-ssl-dont-use-enum_certificates.patch b/0060-mingw-fix-ssl-dont-use-enum_certificates.patch
new file mode 100644
index 000000000000..92472c3da3a0
--- /dev/null
+++ b/0060-mingw-fix-ssl-dont-use-enum_certificates.patch
@@ -0,0 +1,39 @@
+From 1d256fa194a67c65adab63f98e3129f203b0f3fa Mon Sep 17 00:00:00 2001
+From: Ray Donnelly <mingw.android@gmail.com>
+Date: Thu, 17 Jun 2021 18:52:03 +0530
+Subject: [PATCH 060/N] mingw fix ssl dont use enum_certificates
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Co-authored-by: Алексей <alexey.pawlow@gmail.com>
+Co-authored-by: Christoph Reiter <reiter.christoph@gmail.com>
+---
+ Lib/ssl.py | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/Lib/ssl.py b/Lib/ssl.py
+index 30f4e59..dda3ae1 100644
+--- a/Lib/ssl.py
++++ b/Lib/ssl.py
+@@ -249,7 +249,7 @@ class _TLSMessageType(_IntEnum):
+ 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, SOCK_STREAM, create_connection
+@@ -569,7 +569,7 @@ class SSLContext(_SSLContext):
+ 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()
+--
+2.32.0
+
diff --git a/0061-mingw-build-optimized-ext.patch b/0061-mingw-build-optimized-ext.patch
new file mode 100644
index 000000000000..118ab56d11da
--- /dev/null
+++ b/0061-mingw-build-optimized-ext.patch
@@ -0,0 +1,34 @@
+From af81cead554790e55ac7297c78c7cf0751741b40 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?=
+ <alexey.pawlow@gmail.com>
+Date: Thu, 17 Jun 2021 18:52:04 +0530
+Subject: [PATCH 061/N] mingw build optimized ext
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Co-authored-by: Алексей <alexey.pawlow@gmail.com>
+---
+ Lib/distutils/cygwinccompiler.py | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/Lib/distutils/cygwinccompiler.py b/Lib/distutils/cygwinccompiler.py
+index f90af3b..0bda7a3 100644
+--- a/Lib/distutils/cygwinccompiler.py
++++ b/Lib/distutils/cygwinccompiler.py
+@@ -303,9 +303,9 @@ class Mingw32CCompiler(CygwinCCompiler):
+ 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,
+--
+2.32.0
+
diff --git a/0062-cygwinccompiler-dont-strip-modules-if-pydebug.patch b/0062-cygwinccompiler-dont-strip-modules-if-pydebug.patch
new file mode 100644
index 000000000000..14ca139a1b50
--- /dev/null
+++ b/0062-cygwinccompiler-dont-strip-modules-if-pydebug.patch
@@ -0,0 +1,29 @@
+From 01a2e7616c9e8d8cb554a125ef768eb010275dee Mon Sep 17 00:00:00 2001
+From: Ray Donnelly <mingw.android@gmail.com>
+Date: Thu, 17 Jun 2021 18:52:05 +0530
+Subject: [PATCH 062/N] cygwinccompiler dont strip modules if pydebug
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Co-authored-by: Алексей <alexey.pawlow@gmail.com>
+---
+ Lib/distutils/cygwinccompiler.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/Lib/distutils/cygwinccompiler.py b/Lib/distutils/cygwinccompiler.py
+index 0bda7a3..09b6eda 100644
+--- a/Lib/distutils/cygwinccompiler.py
++++ b/Lib/distutils/cygwinccompiler.py
+@@ -236,7 +236,7 @@ class CygwinCCompiler(UnixCCompiler):
+ # (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,
+--
+2.32.0
+
diff --git a/0063-fix-using-dllhandle-and-winver-mingw.patch b/0063-fix-using-dllhandle-and-winver-mingw.patch
new file mode 100644
index 000000000000..71966ad3c2e1
--- /dev/null
+++ b/0063-fix-using-dllhandle-and-winver-mingw.patch
@@ -0,0 +1,39 @@
+From 86c9d4a3a9b44f10b1c4c638243ed1f0b783901a 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?=
+ <alexey.pawlow@gmail.com>
+Date: Thu, 17 Jun 2021 18:52:06 +0530
+Subject: [PATCH 063/N] fix using dllhandle and winver mingw
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Co-authored-by: Алексей <alexey.pawlow@gmail.com>
+---
+ Python/sysmodule.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/Python/sysmodule.c b/Python/sysmodule.c
+index 3e4115f..839ed1c 100644
+--- a/Python/sysmodule.c
++++ b/Python/sysmodule.c
+@@ -36,7 +36,7 @@ Data members:
+ #include <windows.h>
+ #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;
+@@ -2731,7 +2731,7 @@ _PySys_InitCore(PyThreadState *tstate, PyObject *sysdict)
+ 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",
+--
+2.32.0
+
diff --git a/0064-mingw-add-LIBPL-to-library-dirs.patch b/0064-mingw-add-LIBPL-to-library-dirs.patch
new file mode 100644
index 000000000000..70c10f774fc3
--- /dev/null
+++ b/0064-mingw-add-LIBPL-to-library-dirs.patch
@@ -0,0 +1,26 @@
+From 01ffe9fb03e551372f0b54912d938f3256e4c5cd 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?=
+ <alexey.pawlow@gmail.com>
+Date: Thu, 17 Jun 2021 18:52:06 +0530
+Subject: [PATCH 064/N] mingw add LIBPL to library dirs
+
+---
+ Lib/distutils/command/build_ext.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/Lib/distutils/command/build_ext.py b/Lib/distutils/command/build_ext.py
+index 1dbdfe0..1598735 100644
+--- a/Lib/distutils/command/build_ext.py
++++ b/Lib/distutils/command/build_ext.py
+@@ -218,7 +218,7 @@ class build_ext(Command):
+
+ # 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'))
+--
+2.32.0
+
diff --git a/0065-Add-AMD64-to-sys-config-so-msvccompiler-get_build_ve.patch b/0065-Add-AMD64-to-sys-config-so-msvccompiler-get_build_ve.patch
new file mode 100644
index 000000000000..b9981c9427c5
--- /dev/null
+++ b/0065-Add-AMD64-to-sys-config-so-msvccompiler-get_build_ve.patch
@@ -0,0 +1,42 @@
+From 1c81c81b5e7f5ba55927e8ae64e148731ed9b04f 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?=
+ <alexey.pawlow@gmail.com>
+Date: Thu, 17 Jun 2021 18:52:07 +0530
+Subject: [PATCH 065/N] Add AMD64 to sys config so msvccompiler
+ get_build_version works
+
+---
+ Python/getcompiler.c | 17 ++++++++++++++++-
+ 1 file changed, 16 insertions(+), 1 deletion(-)
+
+diff --git a/Python/getcompiler.c b/Python/getcompiler.c
+index 59c0dbf..adccaa7 100644
+--- a/Python/getcompiler.c
++++ b/Python/getcompiler.c
+@@ -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++]"
+--
+2.32.0
+
diff --git a/0066-MINGW-link-with-additional-library.patch b/0066-MINGW-link-with-additional-library.patch
new file mode 100644
index 000000000000..490e2703cbc8
--- /dev/null
+++ b/0066-MINGW-link-with-additional-library.patch
@@ -0,0 +1,33 @@
+From 5e0de2a63f9534dabbdfbe422cb7952afa4b7ce2 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?=
+ <alexey.pawlow@gmail.com>
+Date: Thu, 17 Jun 2021 18:52:08 +0530
+Subject: [PATCH 066/N] MINGW link with additional library
+
+---
+ configure.ac | 9 +++++++++
+ 1 file changed, 9 insertions(+)
+
+diff --git a/configure.ac b/configure.ac
+index 1599c74..28b69be 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -5860,6 +5860,15 @@ for dir in $SRCDIRS; do
+ done
+ AC_MSG_RESULT(done)
+
++# For mingw build need additional library for linking
++case $host in
++ *-*-mingw*)
++ LIBS="$LIBS -lversion -lshlwapi -lpathcch"
++ ;;
++ *)
++ ;;
++esac
++
+ # Availability of -O2:
+ AC_MSG_CHECKING(for -O2)
+ saved_cflags="$CFLAGS"
+--
+2.32.0
+
diff --git a/0067-install-msilib.patch b/0067-install-msilib.patch
new file mode 100644
index 000000000000..d8df55c7aedd
--- /dev/null
+++ b/0067-install-msilib.patch
@@ -0,0 +1,30 @@
+From 408a59388df34c484cc3bfc7d7465ca7ea9c6f05 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Sa=C3=BAl=20Ibarra=20Corretg=C3=A9?= <s@saghul.net>
+Date: Thu, 17 Jun 2021 18:52:09 +0530
+Subject: [PATCH 067/N] install msilib
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Co-authored-by: Алексей <alexey.pawlow@gmail.com>
+Co-authored-by: Christoph Reiter <reiter.christoph@gmail.com>
+Co-authored-by: Ray Donnelly <mingw.android@gmail.com>
+---
+ Makefile.pre.in | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/Makefile.pre.in b/Makefile.pre.in
+index 7badeec..f6d0247 100644
+--- a/Makefile.pre.in
++++ b/Makefile.pre.in
+@@ -1497,6 +1497,7 @@ LIBSUBDIRS= tkinter tkinter/test tkinter/test/test_tkinter \
+ test/test_peg_generator \
+ 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 \
+--
+2.32.0
+
diff --git a/0068-dont-include-system-ncurses-path.patch b/0068-dont-include-system-ncurses-path.patch
new file mode 100644
index 000000000000..59bf520622b9
--- /dev/null
+++ b/0068-dont-include-system-ncurses-path.patch
@@ -0,0 +1,36 @@
+From 430aee7255b2ebf1947c8670db95f017e41aecc6 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?=
+ <alexey.pawlow@gmail.com>
+Date: Thu, 17 Jun 2021 18:52:09 +0530
+Subject: [PATCH 068/N] dont include system ncurses path
+
+---
+ configure.ac | 12 +++++++++---
+ 1 file changed, 9 insertions(+), 3 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 28b69be..25aecf9 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -5479,9 +5479,15 @@ fi
+
+ # 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)
+
+--
+2.32.0
+
diff --git a/0069-fix-signal-module-build.patch b/0069-fix-signal-module-build.patch
new file mode 100644
index 000000000000..5bd32b1ba278
--- /dev/null
+++ b/0069-fix-signal-module-build.patch
@@ -0,0 +1,29 @@
+From a79c0b4716a86e95e7b41f9f64a51492ad2440a6 Mon Sep 17 00:00:00 2001
+From: Christoph Reiter <reiter.christoph@gmail.com>
+Date: Thu, 17 Jun 2021 18:52:10 +0530
+Subject: [PATCH 069/N] fix signal module build
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Co-authored-by: Алексей <alexey.pawlow@gmail.com>
+---
+ Modules/Setup | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/Modules/Setup b/Modules/Setup
+index 2bafdd0..7ce4355 100644
+--- a/Modules/Setup
++++ b/Modules/Setup
+@@ -111,7 +111,7 @@ _collections _collectionsmodule.c # Container types
+ _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
+--
+2.32.0
+
diff --git a/0070-build-winconsoleio.patch b/0070-build-winconsoleio.patch
new file mode 100644
index 000000000000..54a404c3c8ac
--- /dev/null
+++ b/0070-build-winconsoleio.patch
@@ -0,0 +1,29 @@
+From a6869a3b49e6a333b907061339eeef622a6d4e08 Mon Sep 17 00:00:00 2001
+From: Christoph Reiter <reiter.christoph@gmail.com>
+Date: Thu, 17 Jun 2021 18:52:11 +0530
+Subject: [PATCH 070/N] build winconsoleio
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Co-authored-by: Алексей <alexey.pawlow@gmail.com>
+---
+ Modules/Setup | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/Modules/Setup b/Modules/Setup
+index 7ce4355..6bb5e51 100644
+--- a/Modules/Setup
++++ b/Modules/Setup
+@@ -120,7 +120,7 @@ _thread -DPy_BUILD_CORE_BUILTIN -I$(srcdir)/Include/internal _threadmodule.c # l
+ _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
+--
+2.32.0
+
diff --git a/0071-expose-sem_unlink.patch b/0071-expose-sem_unlink.patch
new file mode 100644
index 000000000000..579f5f02f256
--- /dev/null
+++ b/0071-expose-sem_unlink.patch
@@ -0,0 +1,29 @@
+From 15f50a4e53545b16eaaf9b9fade68a828a6e0503 Mon Sep 17 00:00:00 2001
+From: Christoph Reiter <reiter.christoph@gmail.com>
+Date: Thu, 17 Jun 2021 18:52:12 +0530
+Subject: [PATCH 071/N] expose sem_unlink
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Co-authored-by: Алексей <alexey.pawlow@gmail.com>
+---
+ Modules/_multiprocessing/multiprocessing.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/Modules/_multiprocessing/multiprocessing.c b/Modules/_multiprocessing/multiprocessing.c
+index 806e638..d7954d1 100644
+--- a/Modules/_multiprocessing/multiprocessing.c
++++ b/Modules/_multiprocessing/multiprocessing.c
+@@ -128,7 +128,7 @@ static PyMethodDef module_methods[] = {
+ {"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}
+--
+2.32.0
+
diff --git a/0072-cygpty-isatty.patch b/0072-cygpty-isatty.patch
new file mode 100644
index 000000000000..21031bac83d3
--- /dev/null
+++ b/0072-cygpty-isatty.patch
@@ -0,0 +1,461 @@
+From 9fb465b60da98040bbc8ee649f17cfb6dbe3f293 Mon Sep 17 00:00:00 2001
+From: Christoph Reiter <reiter.christoph@gmail.com>
+Date: Thu, 17 Jun 2021 18:52:14 +0530
+Subject: [PATCH 072/N] cygpty isatty
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Co-authored-by: Алексей <alexey.pawlow@gmail.com>
+---
+ Include/iscygpty.h | 41 ++++++++++
+ Makefile.pre.in | 2 +
+ Modules/_io/fileio.c | 3 +-
+ Modules/main.c | 3 +-
+ Modules/posixmodule.c | 3 +-
+ Objects/fileobject.c | 3 +-
+ Python/bltinmodule.c | 5 +-
+ Python/fileutils.c | 3 +-
+ Python/frozenmain.c | 3 +-
+ Python/iscygpty.c | 185 ++++++++++++++++++++++++++++++++++++++++++
+ Python/pylifecycle.c | 3 +-
+ 11 files changed, 245 insertions(+), 9 deletions(-)
+ create mode 100644 Include/iscygpty.h
+ create mode 100644 Python/iscygpty.c
+
+diff --git a/Include/iscygpty.h b/Include/iscygpty.h
+new file mode 100644
+index 0000000..82fd0af
+--- /dev/null
++++ b/Include/iscygpty.h
+@@ -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 --git a/Makefile.pre.in b/Makefile.pre.in
+index f6d0247..126131c 100644
+--- a/Makefile.pre.in
++++ b/Makefile.pre.in
+@@ -372,6 +372,7 @@ PYTHON_OBJS= \
+ Python/import.o \
+ Python/importdl.o \
+ Python/initconfig.o \
++ Python/iscygpty.o \
+ Python/marshal.o \
+ Python/modsupport.o \
+ Python/mysnprintf.o \
+@@ -1070,6 +1071,7 @@ PYTHON_HEADERS= \
+ $(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 --git a/Modules/_io/fileio.c b/Modules/_io/fileio.c
+index 048484b..0b56118 100644
+--- a/Modules/_io/fileio.c
++++ b/Modules/_io/fileio.c
+@@ -19,6 +19,7 @@
+ #endif
+ #include <stddef.h> /* For offsetof */
+ #include "_iomodule.h"
++#include "iscygpty.h"
+
+ /*
+ * Known likely problems:
+@@ -1128,7 +1129,7 @@ _io_FileIO_isatty_impl(fileio *self)
+ 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 --git a/Modules/main.c b/Modules/main.c
+index 2cc891f..17469e3 100644
+--- a/Modules/main.c
++++ b/Modules/main.c
+@@ -6,6 +6,7 @@
+ #include "pycore_pathconfig.h" // _PyPathConfig_ComputeSysPath0()
+ #include "pycore_pylifecycle.h" // _Py_PreInitializeFromPyArgv()
+ #include "pycore_pystate.h" // _PyInterpreterState_GET()
++#include "iscygpty.h"
+
+ /* Includes for exit_sigint() */
+ #include <stdio.h> // perror()
+@@ -91,7 +92,7 @@ static inline int config_run_code(const PyConfig *config)
+ 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 --git a/Modules/posixmodule.c b/Modules/posixmodule.c
+index 40fc270..bb1b81d 100644
+--- a/Modules/posixmodule.c
++++ b/Modules/posixmodule.c
+@@ -36,6 +36,7 @@
+ #ifdef __ANDROID__
+ # undef HAVE_FACCESSAT
+ #endif
++#include "iscygpty.h"
+
+ #include <stdio.h> /* needed for ctermid() */
+
+@@ -10082,7 +10083,7 @@ os_isatty_impl(PyObject *module, int fd)
+ {
+ 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 --git a/Objects/fileobject.c b/Objects/fileobject.c
+index 1c6ecaf..afddc4f 100644
+--- a/Objects/fileobject.c
++++ b/Objects/fileobject.c
+@@ -2,6 +2,7 @@
+
+ #define PY_SSIZE_T_CLEAN
+ #include "Python.h"
++#include "iscygpty.h"
+ #include "pycore_runtime.h" // _PyRuntime
+
+ #if defined(HAVE_GETC_UNLOCKED) && !defined(_Py_MEMORY_SANITIZER)
+@@ -435,7 +436,7 @@ stdprinter_isatty(PyStdPrinter_Object *self, PyObject *Py_UNUSED(ignored))
+ }
+
+ Py_BEGIN_ALLOW_THREADS
+- res = isatty(self->fd);
++ res = isatty(self->fd) || is_cygpty(self->fd);
+ Py_END_ALLOW_THREADS
+
+ return PyBool_FromLong(res);
+diff --git a/Python/bltinmodule.c b/Python/bltinmodule.c
+index 614012d..d29d06d 100644
+--- a/Python/bltinmodule.c
++++ b/Python/bltinmodule.c
+@@ -1,6 +1,7 @@
+ /* Built-in functions */
+
+ #include "Python.h"
++#include "iscygpty.h"
+ #include <ctype.h>
+ #include "ast.h"
+ #undef Yield /* undefine macro conflicting with <winbase.h> */
+@@ -1980,7 +1981,7 @@ builtin_input_impl(PyObject *module, PyObject *prompt)
+ 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_CallMethodIdNoArgs(fout, &PyId_fileno);
+@@ -1993,7 +1994,7 @@ builtin_input_impl(PyObject *module, PyObject *prompt)
+ 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));
+ }
+ }
+
+diff --git a/Python/fileutils.c b/Python/fileutils.c
+index d5f8b79..a47f12b 100644
+--- a/Python/fileutils.c
++++ b/Python/fileutils.c
+@@ -1,4 +1,5 @@
+ #include "Python.h"
++#include "iscygpty.h"
+ #include "pycore_fileutils.h"
+ #include "osdefs.h" // SEP
+ #include <locale.h>
+@@ -70,7 +71,7 @@ _Py_device_encoding(int fd)
+ #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/Python/frozenmain.c b/Python/frozenmain.c
+index dd04d60..6607762 100644
+--- a/Python/frozenmain.c
++++ b/Python/frozenmain.c
+@@ -4,6 +4,7 @@
+ #include "Python.h"
+ #include "pycore_runtime.h" // _PyRuntime_Initialize()
+ #include <locale.h>
++#include "iscygpty.h"
+
+ #ifdef MS_WINDOWS
+ extern void PyWinFreeze_ExeInit(void);
+@@ -107,7 +108,7 @@ Py_FrozenMain(int argc, char **argv)
+ else
+ sts = 0;
+
+- if (inspect && isatty((int)fileno(stdin)))
++ if (inspect && (isatty((int)fileno(stdin)) || is_cygpty((int)fileno(stdin))))
+ sts = PyRun_AnyFile(stdin, "<stdin>") != 0;
+
+ #ifdef MS_WINDOWS
+diff --git a/Python/iscygpty.c b/Python/iscygpty.c
+new file mode 100644
+index 0000000..722f88f
+--- /dev/null
++++ b/Python/iscygpty.c
+@@ -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 <ctype.h>
++#include <io.h>
++#include <wchar.h>
++#include <windows.h>
++
++#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 <fileextd.h>
++#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 --git a/Python/pylifecycle.c b/Python/pylifecycle.c
+index 60f091c..734084c 100644
+--- a/Python/pylifecycle.c
++++ b/Python/pylifecycle.c
+@@ -19,6 +19,7 @@
+ #include "pycore_traceback.h" // _Py_DumpTracebackThreads()
+
+ #include "grammar.h" // PyGrammar_RemoveAccelerators()
++#include "iscygpty.h"
+ #include <locale.h> // setlocale()
+
+ #ifdef HAVE_SIGNAL_H
+@@ -2470,7 +2471,7 @@ _Py_RestoreSignals(void)
+ 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;
+--
+2.32.0
+
diff --git a/0073-disable-broken-gdbm-module.patch b/0073-disable-broken-gdbm-module.patch
new file mode 100644
index 000000000000..79a3c181d214
--- /dev/null
+++ b/0073-disable-broken-gdbm-module.patch
@@ -0,0 +1,29 @@
+From e486b493d937ef113c8cfc1904362196a31ba605 Mon Sep 17 00:00:00 2001
+From: Christoph Reiter <reiter.christoph@gmail.com>
+Date: Thu, 17 Jun 2021 18:52:15 +0530
+Subject: [PATCH 073/N] disable broken gdbm module
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Co-authored-by: Алексей <alexey.pawlow@gmail.com>
+---
+ setup.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/setup.py b/setup.py
+index f5914d8..a709723 100644
+--- a/setup.py
++++ b/setup.py
+@@ -1399,7 +1399,7 @@ class PyBuildExt(build_ext):
+ 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":
+--
+2.32.0
+
diff --git a/0074-link-win-resource-files-and-build-pythonw.patch b/0074-link-win-resource-files-and-build-pythonw.patch
new file mode 100644
index 000000000000..cf72ae35c9f2
--- /dev/null
+++ b/0074-link-win-resource-files-and-build-pythonw.patch
@@ -0,0 +1,134 @@
+From d25e8cea94e811159605490e7b383521024c563b Mon Sep 17 00:00:00 2001
+From: Christoph Reiter <reiter.christoph@gmail.com>
+Date: Thu, 17 Jun 2021 18:52:16 +0530
+Subject: [PATCH 074/N] link win resource files and build pythonw
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Co-authored-by: Алексей <alexey.pawlow@gmail.com>
+---
+ Makefile.pre.in | 29 ++++++++++++++++++++++++-----
+ configure.ac | 10 ++++++++++
+ 2 files changed, 34 insertions(+), 5 deletions(-)
+
+diff --git a/Makefile.pre.in b/Makefile.pre.in
+index 126131c..7c1a775 100644
+--- a/Makefile.pre.in
++++ b/Makefile.pre.in
+@@ -38,6 +38,7 @@ CXX= @CXX@
+ MAINCC= @MAINCC@
+ LINKCC= @LINKCC@
+ AR= @AR@
++WINDRES= @WINDRES@
+ READELF= @READELF@
+ SOABI= @SOABI@
+ LDVERSION= @LDVERSION@
+@@ -119,6 +120,7 @@ PY_CORE_CFLAGS= $(PY_STDMODULE_CFLAGS) -DPy_BUILD_CORE
+ PY_CORE_LDFLAGS=$(PY_LDFLAGS) $(PY_LDFLAGS_NODIST)
+ # Strict or non-strict aliasing flags used to compile dtoa.c, see above
+ CFLAGS_ALIASING=@CFLAGS_ALIASING@
++RCFLAGS=@RCFLAGS@
+
+
+ # Machine-dependent subdirectories
+@@ -260,6 +262,7 @@ LIBOBJS= @LIBOBJS@
+
+ 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
+@@ -482,7 +485,7 @@ DTRACE_DEPS = \
+
+ # 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.
+@@ -596,9 +599,24 @@ coverage-report: regen-grammar regen-token regen-importlib
+ clinic: check-clean-src $(srcdir)/Modules/_blake2/blake2s_impl.c
+ $(PYTHON_FOR_REGEN) $(srcdir)/Tools/clinic/clinic.py --make --srcdir $(srcdir)
+
++pythonnt_rc.h:
++ @echo '#define PYTHON_DLL_NAME "$(DLLLIBRARY)"' >> $@
++
++python_exe.o: pythonnt_rc.h $(srcdir)/PC/python_exe.rc
++ $(WINDRES) $(RCFLAGS) -I$(srcdir)/Include -I$(srcdir)/PC -I. $(srcdir)/PC/python_exe.rc $@
++
++pythonw_exe.o: pythonnt_rc.h $(srcdir)/PC/pythonw_exe.rc
++ $(WINDRES) $(RCFLAGS) -I$(srcdir)/Include -I$(srcdir)/PC -I. $(srcdir)/PC/pythonw_exe.rc $@
++
++python_nt.o: pythonnt_rc.h $(srcdir)/PC/python_nt.rc
++ $(WINDRES) $(RCFLAGS) -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) $(EXPORTSYMS)
+- $(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
+@@ -708,10 +726,10 @@ $(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK): \
+
+ # 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
+
+@@ -1325,6 +1343,7 @@ altbininstall: $(BUILDPYTHON) @FRAMEWORKPYTHONW@
+ 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/configure.ac b/configure.ac
+index 25aecf9..cea888c 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -1350,6 +1350,9 @@ fi
+
+ AC_MSG_RESULT($LDLIBRARY)
+
++AC_SUBST(WINDRES)
++AC_CHECK_TOOL(WINDRES, windres)
++
+ AC_SUBST(AR)
+ AC_CHECK_TOOLS(AR, ar aal, ar)
+
+@@ -5870,10 +5873,17 @@ AC_MSG_RESULT(done)
+ case $host in
+ *-*-mingw*)
+ LIBS="$LIBS -lversion -lshlwapi -lpathcch"
++ RCFLAGS="$RCFLAGS -O COFF"
++ case $host in
++ i686*) RCFLAGS="$RCFLAGS --target=pe-i386" ;;
++ x86_64*) RCFLAGS="$RCFLAGS --target=pe-x86-64" ;;
++ *) ;;
++ esac
+ ;;
+ *)
+ ;;
+ esac
++AC_SUBST(RCFLAGS)
+
+ # Availability of -O2:
+ AC_MSG_CHECKING(for -O2)
+--
+2.32.0
+
diff --git a/0075-3.7-mpdec-mingw.patch b/0075-3.7-mpdec-mingw.patch
new file mode 100644
index 000000000000..ede7f5473b49
--- /dev/null
+++ b/0075-3.7-mpdec-mingw.patch
@@ -0,0 +1,26 @@
+From 0669b928b1aeaedc039a0c7bc1e688b4190fdf8e 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?=
+ <alexey.pawlow@gmail.com>
+Date: Thu, 17 Jun 2021 18:52:17 +0530
+Subject: [PATCH 075/N] 3.7 mpdec mingw
+
+---
+ setup.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/setup.py b/setup.py
+index a709723..79111ab 100644
+--- a/setup.py
++++ b/setup.py
+@@ -2283,7 +2283,7 @@ class PyBuildExt(build_ext):
+ 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:
+--
+2.32.0
+
diff --git a/0076-disable-readline.patch b/0076-disable-readline.patch
new file mode 100644
index 000000000000..8790fec5525a
--- /dev/null
+++ b/0076-disable-readline.patch
@@ -0,0 +1,32 @@
+From 9e98fd461e9504b1275c883f7edb59258d2cf087 Mon Sep 17 00:00:00 2001
+From: Christoph Reiter <reiter.christoph@gmail.com>
+Date: Thu, 17 Jun 2021 18:52:17 +0530
+Subject: [PATCH 076/N] disable readline
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Co-authored-by: Алексей <alexey.pawlow@gmail.com>
+---
+ setup.py | 5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+diff --git a/setup.py b/setup.py
+index 79111ab..ea2aa96 100644
+--- a/setup.py
++++ b/setup.py
+@@ -997,7 +997,10 @@ class PyBuildExt(build_ext):
+
+ 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.
+--
+2.32.0
+
diff --git a/0077-fix-isselectable.patch b/0077-fix-isselectable.patch
new file mode 100644
index 000000000000..fe0657173b8c
--- /dev/null
+++ b/0077-fix-isselectable.patch
@@ -0,0 +1,29 @@
+From 83d74ec0106b0a55fbb29324eb4961d1f5f92cef Mon Sep 17 00:00:00 2001
+From: Christoph Reiter <reiter.christoph@gmail.com>
+Date: Thu, 17 Jun 2021 18:52:18 +0530
+Subject: [PATCH 077/N] fix isselectable
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Co-authored-by: Алексей <alexey.pawlow@gmail.com>
+---
+ Include/fileobject.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/Include/fileobject.h b/Include/fileobject.h
+index 6ec2994..a80f195 100644
+--- a/Include/fileobject.h
++++ b/Include/fileobject.h
+@@ -30,7 +30,7 @@ PyAPI_DATA(int) Py_UTF8Mode;
+ #endif
+
+ /* 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
+--
+2.32.0
+
diff --git a/0078-use-_wcsnicmp-instead-wcsncasecmp.patch b/0078-use-_wcsnicmp-instead-wcsncasecmp.patch
new file mode 100644
index 000000000000..bd889d2c6f73
--- /dev/null
+++ b/0078-use-_wcsnicmp-instead-wcsncasecmp.patch
@@ -0,0 +1,26 @@
+From bc513cec0134febc13c4033ea8e9d839c3f3d6d1 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?=
+ <alexey.pawlow@gmail.com>
+Date: Thu, 17 Jun 2021 18:52:19 +0530
+Subject: [PATCH 078/N] use _wcsnicmp instead wcsncasecmp
+
+---
+ Modules/getpath.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/Modules/getpath.c b/Modules/getpath.c
+index c52e0df..2018495 100644
+--- a/Modules/getpath.c
++++ b/Modules/getpath.c
+@@ -427,7 +427,7 @@ add_exe_suffix(wchar_t **progpath_p)
+ /* 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();
+ }
+
+--
+2.32.0
+
diff --git a/0079-_xxsubinterpretersmodule.patch b/0079-_xxsubinterpretersmodule.patch
new file mode 100644
index 000000000000..be85e20e8ea6
--- /dev/null
+++ b/0079-_xxsubinterpretersmodule.patch
@@ -0,0 +1,26 @@
+From c20ac221468e3770baa22b7f853395e2e8a9df33 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?=
+ <alexey.pawlow@gmail.com>
+Date: Thu, 17 Jun 2021 18:52:20 +0530
+Subject: [PATCH 079/N] _xxsubinterpretersmodule
+
+---
+ Modules/_xxsubinterpretersmodule.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/Modules/_xxsubinterpretersmodule.c b/Modules/_xxsubinterpretersmodule.c
+index 314059d..f26e662 100644
+--- a/Modules/_xxsubinterpretersmodule.c
++++ b/Modules/_xxsubinterpretersmodule.c
+@@ -1761,7 +1761,7 @@ PyDoc_STRVAR(channelid_doc,
+ "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 */
+--
+2.32.0
+
diff --git a/0080-sqlite3-module-defines.patch b/0080-sqlite3-module-defines.patch
new file mode 100644
index 000000000000..0677a1ba601c
--- /dev/null
+++ b/0080-sqlite3-module-defines.patch
@@ -0,0 +1,28 @@
+From 5fd45d9433577159d5ca4080fc338030f7a9e367 Mon Sep 17 00:00:00 2001
+From: Christoph Reiter <reiter.christoph@gmail.com>
+Date: Thu, 17 Jun 2021 18:52:21 +0530
+Subject: [PATCH 080/N] sqlite3 module defines
+
+---
+ setup.py | 5 +----
+ 1 file changed, 1 insertion(+), 4 deletions(-)
+
+diff --git a/setup.py b/setup.py
+index ea2aa96..14e1396 100644
+--- a/setup.py
++++ b/setup.py
+@@ -1554,10 +1554,7 @@ class PyBuildExt(build_ext):
+ '_sqlite/util.c', ]
+
+ sqlite_defines = []
+- if not MS_WINDOWS:
+- sqlite_defines.append(('MODULE_NAME', '"sqlite3"'))
+- else:
+- sqlite_defines.append(('MODULE_NAME', '\\"sqlite3\\"'))
++ sqlite_defines.append(('MODULE_NAME', '"sqlite3"'))
+
+ # Enable support for loadable extensions in the sqlite3 module
+ # if --enable-loadable-sqlite-extensions configure option is used.
+--
+2.32.0
+
diff --git a/0081-configure-have-inet-pton.patch b/0081-configure-have-inet-pton.patch
new file mode 100644
index 000000000000..a233867adcba
--- /dev/null
+++ b/0081-configure-have-inet-pton.patch
@@ -0,0 +1,35 @@
+From a59150eaa982d06c28e04305056e6064de57bcd0 Mon Sep 17 00:00:00 2001
+From: Christoph Reiter <reiter.christoph@gmail.com>
+Date: Thu, 17 Jun 2021 18:52:23 +0530
+Subject: [PATCH 081/N] configure have inet pton
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Co-authored-by: Алексей <alexey.pawlow@gmail.com>
+---
+ configure.ac | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/configure.ac b/configure.ac
+index cea888c..fb15812 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -4273,10 +4273,14 @@ AC_LINK_IFELSE([AC_LANG_PROGRAM([[
+
+ AC_MSG_CHECKING(for inet_pton)
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
++#ifdef _WIN32
++#include <ws2tcpip.h>
++#else
+ #include <sys/types.h>
+ #include <sys/socket.h>
+ #include <netinet/in.h>
+ #include <arpa/inet.h>
++#endif
+ ]], [[void* p = inet_pton]])],
+ [AC_DEFINE(HAVE_INET_PTON, 1, Define if you have the 'inet_pton' function.)
+ AC_MSG_RESULT(yes)],
+--
+2.32.0
+
diff --git a/0082-fix-msvc9-import.patch b/0082-fix-msvc9-import.patch
new file mode 100644
index 000000000000..0d73ce2b419b
--- /dev/null
+++ b/0082-fix-msvc9-import.patch
@@ -0,0 +1,38 @@
+From 5db67822f24f57c96ef4424c7738aca59e0dd7aa Mon Sep 17 00:00:00 2001
+From: Christoph Reiter <reiter.christoph@gmail.com>
+Date: Thu, 17 Jun 2021 18:52:24 +0530
+Subject: [PATCH 082/N] fix msvc9 import
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Co-authored-by: Алексей <alexey.pawlow@gmail.com>
+---
+ Lib/distutils/msvc9compiler.py | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/Lib/distutils/msvc9compiler.py b/Lib/distutils/msvc9compiler.py
+index 6934e96..dddb2fd 100644
+--- a/Lib/distutils/msvc9compiler.py
++++ b/Lib/distutils/msvc9compiler.py
+@@ -291,8 +291,6 @@ def query_vcvarsall(version, arch="x86"):
+
+ # 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) :
+@@ -327,6 +325,8 @@ class MSVCCompiler(CCompiler) :
+
+ 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
+--
+2.32.0
+
diff --git a/0083-set-venv-activate-path-unix.patch b/0083-set-venv-activate-path-unix.patch
new file mode 100644
index 000000000000..4788ec5e852b
--- /dev/null
+++ b/0083-set-venv-activate-path-unix.patch
@@ -0,0 +1,29 @@
+From d13ab42085ab58f7114dbe9e50a9431dd0a5b9f4 Mon Sep 17 00:00:00 2001
+From: Dan Yeaw <dan@yeaw.me>
+Date: Thu, 17 Jun 2021 18:52:25 +0530
+Subject: [PATCH 083/N] set venv activate path unix
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Co-authored-by: Алексей <alexey.pawlow@gmail.com>
+---
+ Lib/venv/scripts/common/activate | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/Lib/venv/scripts/common/activate b/Lib/venv/scripts/common/activate
+index 45af353..877b5d3 100644
+--- a/Lib/venv/scripts/common/activate
++++ b/Lib/venv/scripts/common/activate
+@@ -37,7 +37,7 @@ deactivate () {
+ # unset irrelevant variables
+ deactivate nondestructive
+
+-VIRTUAL_ENV="__VENV_DIR__"
++VIRTUAL_ENV=$(cygpath "__VENV_DIR__")
+ export VIRTUAL_ENV
+
+ _OLD_VIRTUAL_PATH="$PATH"
+--
+2.32.0
+
diff --git a/0084-venv-creation-fixes.patch b/0084-venv-creation-fixes.patch
new file mode 100644
index 000000000000..1b84a2279970
--- /dev/null
+++ b/0084-venv-creation-fixes.patch
@@ -0,0 +1,71 @@
+From eb0b0f383d56454cc6fde8f19ea056bf5bed75ce Mon Sep 17 00:00:00 2001
+From: Christoph Reiter <reiter.christoph@gmail.com>
+Date: Thu, 17 Jun 2021 18:52:26 +0530
+Subject: [PATCH 084/N] venv creation fixes
+
+---
+ Lib/venv/__init__.py | 19 ++++++++++++++-----
+ 1 file changed, 14 insertions(+), 5 deletions(-)
+
+diff --git a/Lib/venv/__init__.py b/Lib/venv/__init__.py
+index 8009deb..b471006 100644
+--- a/Lib/venv/__init__.py
++++ b/Lib/venv/__init__.py
+@@ -11,6 +11,7 @@ import subprocess
+ import sys
+ import sysconfig
+ import types
++from sysconfig import _POSIX_BUILD
+
+
+ CORE_VENV_DEPS = ('pip', 'setuptools')
+@@ -119,7 +120,7 @@ class EnvBuilder:
+ 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')
+@@ -252,7 +253,7 @@ class EnvBuilder:
+ 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
+@@ -275,7 +276,13 @@ class EnvBuilder:
+ 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:
+@@ -293,9 +300,11 @@ class EnvBuilder:
+ # 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):
+ """
+--
+2.32.0
+
diff --git a/0085-pass-gen-profile-ldflags.patch b/0085-pass-gen-profile-ldflags.patch
new file mode 100644
index 000000000000..b67e10c61efb
--- /dev/null
+++ b/0085-pass-gen-profile-ldflags.patch
@@ -0,0 +1,29 @@
+From d7dcc7c569482c7b1d2bc811b12e1f6a82d75cb3 Mon Sep 17 00:00:00 2001
+From: Christoph Reiter <reiter.christoph@gmail.com>
+Date: Thu, 17 Jun 2021 18:52:27 +0530
+Subject: [PATCH 085/N] pass gen profile ldflags
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Co-authored-by: Алексей <alexey.pawlow@gmail.com>
+---
+ Makefile.pre.in | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/Makefile.pre.in b/Makefile.pre.in
+index 7c1a775..3331d5c 100644
+--- a/Makefile.pre.in
++++ b/Makefile.pre.in
+@@ -729,7 +729,7 @@ $(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK): \
+ $(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
+
+--
+2.32.0
+
diff --git a/0086-distutils-add-windmc-to-cygwinccompiler.patch b/0086-distutils-add-windmc-to-cygwinccompiler.patch
new file mode 100644
index 000000000000..07a7a0bee937
--- /dev/null
+++ b/0086-distutils-add-windmc-to-cygwinccompiler.patch
@@ -0,0 +1,58 @@
+From 4f1841b7211dd4d9557a868525b5005e4d67e55e 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?=
+ <alexey.pawlow@gmail.com>
+Date: Thu, 17 Jun 2021 18:52:28 +0530
+Subject: [PATCH 086/N] distutils add windmc to cygwinccompiler
+
+---
+ Lib/distutils/cygwinccompiler.py | 26 ++++++++++++++++++++++++--
+ 1 file changed, 24 insertions(+), 2 deletions(-)
+
+diff --git a/Lib/distutils/cygwinccompiler.py b/Lib/distutils/cygwinccompiler.py
+index 09b6eda..fcba43a 100644
+--- a/Lib/distutils/cygwinccompiler.py
++++ b/Lib/distutils/cygwinccompiler.py
+@@ -163,6 +163,28 @@ class CygwinCCompiler(UnixCCompiler):
+ 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] +
+@@ -257,9 +279,9 @@ class CygwinCCompiler(UnixCCompiler):
+ 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
+--
+2.32.0
+
diff --git a/0087-pkg-config-windows-must-link-ext-with-python-lib.patch b/0087-pkg-config-windows-must-link-ext-with-python-lib.patch
new file mode 100644
index 000000000000..0110603636b0
--- /dev/null
+++ b/0087-pkg-config-windows-must-link-ext-with-python-lib.patch
@@ -0,0 +1,38 @@
+From 2834911199728b44d81ab258423b7fdbabd4753a 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?=
+ <alexey.pawlow@gmail.com>
+Date: Thu, 17 Jun 2021 18:52:29 +0530
+Subject: [PATCH 087/N] pkg config windows must link ext with python lib
+
+---
+ Misc/python.pc.in | 2 +-
+ configure.ac | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/Misc/python.pc.in b/Misc/python.pc.in
+index 87e04de..3900190 100644
+--- a/Misc/python.pc.in
++++ b/Misc/python.pc.in
+@@ -9,5 +9,5 @@ Description: Build a C extension for Python
+ Requires:
+ Version: @VERSION@
+ Libs.private: @LIBS@
+-Libs:
++Libs: -L${libdir} -lpython@VERSION@@ABIFLAGS@
+ Cflags: -I${includedir}/python@VERSION@@ABIFLAGS@
+diff --git a/configure.ac b/configure.ac
+index fb15812..d8b1eb3 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -5149,7 +5149,7 @@ AC_MSG_RESULT($LDVERSION)
+
+ # 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=''
+--
+2.32.0
+
diff --git a/0088-importlib-bootstrap-path-sep.patch b/0088-importlib-bootstrap-path-sep.patch
new file mode 100644
index 000000000000..f16c8398ec21
--- /dev/null
+++ b/0088-importlib-bootstrap-path-sep.patch
@@ -0,0 +1,31 @@
+From 70b8703cafcfd25608f53a4a70403700dd695202 Mon Sep 17 00:00:00 2001
+From: Christoph Reiter <reiter.christoph@gmail.com>
+Date: Thu, 17 Jun 2021 18:52:30 +0530
+Subject: [PATCH 088/N] importlib bootstrap path sep
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Co-authored-by: Алексей <alexey.pawlow@gmail.com>
+---
+ Lib/importlib/_bootstrap_external.py | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/Lib/importlib/_bootstrap_external.py b/Lib/importlib/_bootstrap_external.py
+index fe31f43..229d9aa 100644
+--- a/Lib/importlib/_bootstrap_external.py
++++ b/Lib/importlib/_bootstrap_external.py
+@@ -1674,6 +1674,10 @@ def _setup(_bootstrap_module):
+ 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))
+--
+2.32.0
+
diff --git a/0089-pathlib-path-sep.patch b/0089-pathlib-path-sep.patch
new file mode 100644
index 000000000000..ca87d8ae15ac
--- /dev/null
+++ b/0089-pathlib-path-sep.patch
@@ -0,0 +1,25 @@
+From df3c78d7fbec2a02d559d26315c00d8f29e0a6c8 Mon Sep 17 00:00:00 2001
+From: Christoph Reiter <reiter.christoph@gmail.com>
+Date: Thu, 17 Jun 2021 18:52:31 +0530
+Subject: [PATCH 089/N] pathlib path sep
+
+---
+ Lib/pathlib.py | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/Lib/pathlib.py b/Lib/pathlib.py
+index 60e2855..9fc9f38 100644
+--- a/Lib/pathlib.py
++++ b/Lib/pathlib.py
+@@ -123,6 +123,8 @@ class _WindowsFlavour(_Flavour):
+
+ sep = '\\'
+ altsep = '/'
++ if 'MSYSTEM' in os.environ:
++ sep, altsep = altsep, sep
+ has_drv = True
+ pathmod = ntpath
+
+--
+2.32.0
+
diff --git a/0090-warnings-fixes.patch b/0090-warnings-fixes.patch
new file mode 100644
index 000000000000..2c4719a2612a
--- /dev/null
+++ b/0090-warnings-fixes.patch
@@ -0,0 +1,131 @@
+From 2a8d3bf3a58d3caad9a27783240c25e9f720d137 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?=
+ <alexey.pawlow@gmail.com>
+Date: Thu, 17 Jun 2021 18:52:33 +0530
+Subject: [PATCH 090/N] warnings fixes
+
+---
+ Modules/_winapi.c | 2 +-
+ Modules/posixmodule.c | 6 +++---
+ Modules/socketmodule.h | 2 ++
+ PC/python_exe.rc | 2 +-
+ PC/pythonw_exe.rc | 2 +-
+ PC/winreg.c | 1 +
+ Python/thread_nt.h | 3 ++-
+ 7 files changed, 11 insertions(+), 7 deletions(-)
+
+diff --git a/Modules/_winapi.c b/Modules/_winapi.c
+index ba318a1..e4c7d11 100644
+--- a/Modules/_winapi.c
++++ b/Modules/_winapi.c
+@@ -950,7 +950,7 @@ getattributelist(PyObject *obj, const char *name, AttributeList *attribute_list)
+ 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 --git a/Modules/posixmodule.c b/Modules/posixmodule.c
+index bb1b81d..bf19ac8 100644
+--- a/Modules/posixmodule.c
++++ b/Modules/posixmodule.c
+@@ -5343,7 +5343,7 @@ os_utime_impl(PyObject *module, path_t *path, PyObject *times, PyObject *ns,
+ /*[clinic end generated code: output=cfcac69d027b82cf input=2fbd62a2f228f8f4]*/
+ {
+ #ifdef MS_WINDOWS
+- HANDLE hFile;
++ HANDLE hFile = 0;
+ FILETIME atime, mtime;
+ #else
+ int result;
+@@ -14360,7 +14360,7 @@ os__add_dll_directory_impl(PyObject *module, path_t *path)
+ 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();
+@@ -14410,7 +14410,7 @@ os__remove_dll_directory_impl(PyObject *module, PyObject *cookie)
+ loaded. */
+ Py_BEGIN_ALLOW_THREADS
+ if (!(hKernel32 = GetModuleHandleW(L"kernel32")) ||
+- !(RemoveDllDirectory = (PRemoveDllDirectory)GetProcAddress(
++ !(RemoveDllDirectory = (PRemoveDllDirectory)(void *)GetProcAddress(
+ hKernel32, "RemoveDllDirectory")) ||
+ !(*RemoveDllDirectory)(cookieValue)) {
+ err = GetLastError();
+diff --git a/Modules/socketmodule.h b/Modules/socketmodule.h
+index ba2c9f5..81bad15 100644
+--- a/Modules/socketmodule.h
++++ b/Modules/socketmodule.h
+@@ -70,8 +70,10 @@ struct SOCKADDR_BTH_REDEF {
+ */
+ # ifdef SIO_GET_MULTICAST_FILTER
+ # include <mstcpip.h> /* 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 --git a/PC/python_exe.rc b/PC/python_exe.rc
+index ae0b029..e667ffa 100644
+--- a/PC/python_exe.rc
++++ b/PC/python_exe.rc
+@@ -7,7 +7,7 @@
+ #include <winuser.h>
+ 1 RT_MANIFEST "python.manifest"
+
+-1 ICON DISCARDABLE "icons\python.ico"
++1 ICON DISCARDABLE "icons/python.ico"
+
+
+ /////////////////////////////////////////////////////////////////////////////
+diff --git a/PC/pythonw_exe.rc b/PC/pythonw_exe.rc
+index 88bf359..413d7d1 100644
+--- a/PC/pythonw_exe.rc
++++ b/PC/pythonw_exe.rc
+@@ -7,7 +7,7 @@
+ #include <winuser.h>
+ 1 RT_MANIFEST "python.manifest"
+
+-1 ICON DISCARDABLE "icons\pythonw.ico"
++1 ICON DISCARDABLE "icons/pythonw.ico"
+
+
+ /////////////////////////////////////////////////////////////////////////////
+diff --git a/PC/winreg.c b/PC/winreg.c
+index b6f1a8f..19cc104 100644
+--- a/PC/winreg.c
++++ b/PC/winreg.c
+@@ -809,6 +809,7 @@ Reg2Py(BYTE *retDataBuf, DWORD retDataSize, DWORD typ)
+ 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 --git a/Python/thread_nt.h b/Python/thread_nt.h
+index 0ce5e94..6a6fe7e 100644
+--- a/Python/thread_nt.h
++++ b/Python/thread_nt.h
+@@ -349,8 +349,9 @@ PyThread_release_lock(PyThread_type_lock aLock)
+ {
+ 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 */
+--
+2.32.0
+
diff --git a/0091-fix-build-testinternalcapi.patch b/0091-fix-build-testinternalcapi.patch
new file mode 100644
index 000000000000..1a3648a5f2e8
--- /dev/null
+++ b/0091-fix-build-testinternalcapi.patch
@@ -0,0 +1,28 @@
+From c7083b0b392333103cf09f4f33d66f07b0b5ac18 Mon Sep 17 00:00:00 2001
+From: Christoph Reiter <reiter.christoph@gmail.com>
+Date: Thu, 17 Jun 2021 18:52:34 +0530
+Subject: [PATCH 091/N] fix build testinternalcapi
+
+---
+ setup.py | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/setup.py b/setup.py
+index 14e1396..0ce4714 100644
+--- a/setup.py
++++ b/setup.py
+@@ -978,7 +978,11 @@ class PyBuildExt(build_ext):
+ 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
+--
+2.32.0
+
diff --git a/0092-extend-MS_WINDOWS-flag.patch b/0092-extend-MS_WINDOWS-flag.patch
new file mode 100644
index 000000000000..2430614ce75c
--- /dev/null
+++ b/0092-extend-MS_WINDOWS-flag.patch
@@ -0,0 +1,25 @@
+From 1cdb69057f1fa189eaf8ef57c6a6ec946f681aaf Mon Sep 17 00:00:00 2001
+From: Long Nguyen <nguyen.long.908132@gmail.com>
+Date: Thu, 17 Jun 2021 18:52:34 +0530
+Subject: [PATCH 092/N] extend MS_WINDOWS flag
+
+---
+ setup.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/setup.py b/setup.py
+index 0ce4714..a2d5656 100644
+--- a/setup.py
++++ b/setup.py
+@@ -71,7 +71,7 @@ if sys.platform == "win32" and "MSYSTEM" in os.environ:
+
+ 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'))
+--
+2.32.0
+
diff --git a/0093-clang-arm64.patch b/0093-clang-arm64.patch
new file mode 100644
index 000000000000..60f11671c640
--- /dev/null
+++ b/0093-clang-arm64.patch
@@ -0,0 +1,63 @@
+From 025cefb3dca7317d7476fa2a40938206e65eaa80 Mon Sep 17 00:00:00 2001
+From: jeremyd2019 <4524874+jeremyd2019@users.noreply.github.com>
+Date: Thu, 17 Jun 2021 18:52:36 +0530
+Subject: [PATCH 093/N] clang arm64
+
+---
+ Lib/distutils/cygwinccompiler.py | 2 +-
+ Python/getcompiler.c | 11 ++++++++++-
+ 2 files changed, 11 insertions(+), 2 deletions(-)
+
+diff --git a/Lib/distutils/cygwinccompiler.py b/Lib/distutils/cygwinccompiler.py
+index fcba43a..0c063a8 100644
+--- a/Lib/distutils/cygwinccompiler.py
++++ b/Lib/distutils/cygwinccompiler.py
+@@ -394,7 +394,7 @@ def check_config_h():
+ 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/Python/getcompiler.c b/Python/getcompiler.c
+index adccaa7..b529e29 100644
+--- a/Python/getcompiler.c
++++ b/Python/getcompiler.c
+@@ -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++]"
+--
+2.32.0
+
diff --git a/0094-MINGW-stack-reserve.patch b/0094-MINGW-stack-reserve.patch
new file mode 100644
index 000000000000..b790b9a9323a
--- /dev/null
+++ b/0094-MINGW-stack-reserve.patch
@@ -0,0 +1,28 @@
+From f20f69a24d26de4f570e0c3806b8e328fe54a2b5 Mon Sep 17 00:00:00 2001
+From: jeremyd2019 <4524874+jeremyd2019@users.noreply.github.com>
+Date: Thu, 17 Jun 2021 18:52:37 +0530
+Subject: [PATCH 094/N] MINGW stack reserve
+
+---
+ configure.ac | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+diff --git a/configure.ac b/configure.ac
+index d8b1eb3..d76db66 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -3065,6 +3065,11 @@ then
+ VxWorks*)
+ LINKFORSHARED='--export-dynamic';;
+ esac
++ case $host in
++ *-*-mingw*)
++ # for https://bugs.python.org/issue40458 on MINGW
++ LINKFORSHARED="-Wl,--stack,2000000";;
++ esac
+ fi
+ AC_MSG_RESULT($LINKFORSHARED)
+
+--
+2.32.0
+
diff --git a/0095-Add-support-for-Windows-7-Python-3.9.patch b/0095-Add-support-for-Windows-7-Python-3.9.patch
new file mode 100644
index 000000000000..44c514d30b3b
--- /dev/null
+++ b/0095-Add-support-for-Windows-7-Python-3.9.patch
@@ -0,0 +1,176 @@
+From 71fba9ef0080a54dcd80fa5ff6c85c567101206d Mon Sep 17 00:00:00 2001
+From: Naveen M K <naveen521kk@gmail.com>
+Date: Thu, 17 Jun 2021 18:52:39 +0530
+Subject: [PATCH 095/N] Add support for Windows 7 Python 3.9
+
+---
+ Modules/posixmodule.c | 22 +++++++++++------
+ PC/getpathp.c | 57 +++++++++++++++++++++++++++++++++++++++----
+ configure.ac | 2 +-
+ 3 files changed, 68 insertions(+), 13 deletions(-)
+
+diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c
+index bf19ac8..215c81f 100644
+--- a/Modules/posixmodule.c
++++ b/Modules/posixmodule.c
+@@ -18,7 +18,7 @@
+
+ FSCTL_GET_REPARSE_POINT is not exported with WIN32_LEAN_AND_MEAN. */
+ # include <windows.h>
+-# include <pathcch.h>
++# include <shlwapi.h>
+ #endif
+
+ #include "pycore_ceval.h" // _PyEval_ReInitThreads()
+@@ -4402,7 +4402,6 @@ os__path_splitroot_impl(PyObject *module, path_t *path)
+ wchar_t *buffer;
+ wchar_t *end;
+ PyObject *result = NULL;
+- HRESULT ret;
+
+ buffer = (wchar_t*)PyMem_Malloc(sizeof(wchar_t) * (wcslen(path->wide) + 1));
+ if (!buffer) {
+@@ -4414,18 +4413,26 @@ os__path_splitroot_impl(PyObject *module, path_t *path)
+ }
+
+ Py_BEGIN_ALLOW_THREADS
+- ret = PathCchSkipRoot(buffer, &end);
++ if (buffer[0] && buffer[1] == L':') {
++ if (buffer[2] == L'\\') {
++ end = &buffer[3];
++ } else {
++ end = &buffer[2];
++ }
++ } else {
++ end = PathSkipRootW(buffer);
++ }
+ Py_END_ALLOW_THREADS
+- if (FAILED(ret)) {
++ if (!end || end == buffer) {
+ result = Py_BuildValue("sO", "", path->object);
+- } else if (end != buffer) {
++ } else if (!*end) {
++ result = Py_BuildValue("Os", path->object, "");
++ } else {
+ size_t rootLen = (size_t)(end - buffer);
+ result = Py_BuildValue("NN",
+ PyUnicode_FromWideChar(path->wide, rootLen),
+ PyUnicode_FromWideChar(path->wide + rootLen, -1)
+ );
+- } else {
+- result = Py_BuildValue("Os", path->object, "");
+ }
+ PyMem_Free(buffer);
+
+@@ -4433,6 +4440,7 @@ os__path_splitroot_impl(PyObject *module, path_t *path)
+ }
+
+
++
+ #endif /* MS_WINDOWS */
+
+
+diff --git a/PC/getpathp.c b/PC/getpathp.c
+index 53da3a6..40b0db3 100644
+--- a/PC/getpathp.c
++++ b/PC/getpathp.c
+@@ -90,7 +90,6 @@
+ #endif
+
+ #include <windows.h>
+-#include <pathcch.h>
+ #include <shlwapi.h>
+
+ #ifdef HAVE_SYS_TYPES_H
+@@ -250,14 +249,43 @@ ismodule(wchar_t *filename, int update_filename)
+ stuff as fits will be appended.
+ */
+
++static int _PathCchCombineEx_Initialized = 0;
++typedef HRESULT(__stdcall *PPathCchCombineEx) (PWSTR pszPathOut, size_t cchPathOut,
++ PCWSTR pszPathIn, PCWSTR pszMore,
++ unsigned long dwFlags);
++static PPathCchCombineEx _PathCchCombineEx;
++
+ static void
+ join(wchar_t *buffer, const wchar_t *stuff)
+ {
+- if (FAILED(PathCchCombineEx(buffer, MAXPATHLEN+1, buffer, stuff, 0))) {
+- Py_FatalError("buffer overflow in getpathp.c's join()");
++ if (_PathCchCombineEx_Initialized == 0) {
++ HMODULE pathapi = LoadLibraryExW(L"api-ms-win-core-path-l1-1-0.dll", NULL,
++ LOAD_LIBRARY_SEARCH_SYSTEM32);
++ if (pathapi) {
++ _PathCchCombineEx = (PPathCchCombineEx)GetProcAddress(pathapi, "PathCchCombineEx");
++ }
++ else {
++ _PathCchCombineEx = NULL;
++ }
++ _PathCchCombineEx_Initialized = 1;
++ }
++
++ if (_PathCchCombineEx) {
++ if (FAILED(_PathCchCombineEx(buffer, MAXPATHLEN+1, buffer, stuff, 0))) {
++ Py_FatalError("buffer overflow in getpathp.c's join()");
++ }
++ } else {
++ if (!PathCombineW(buffer, buffer, stuff)) {
++ Py_FatalError("buffer overflow in getpathp.c's join()");
++ }
+ }
+ }
+
++static int _PathCchCanonicalizeEx_Initialized = 0;
++typedef HRESULT(__stdcall *PPathCchCanonicalizeEx) (PWSTR pszPathOut, size_t cchPathOut,
++ PCWSTR pszPathIn, unsigned long dwFlags);
++static PPathCchCanonicalizeEx _PathCchCanonicalizeEx;
++
+ /* Call PathCchCanonicalizeEx(path): remove navigation elements such as "."
+ and ".." to produce a direct, well-formed path. */
+ static PyStatus
+@@ -267,8 +295,27 @@ canonicalize(wchar_t *buffer, const wchar_t *path)
+ return _PyStatus_NO_MEMORY();
+ }
+
+- if (FAILED(PathCchCanonicalizeEx(buffer, MAXPATHLEN + 1, path, 0))) {
+- return INIT_ERR_BUFFER_OVERFLOW();
++ if (_PathCchCanonicalizeEx_Initialized == 0) {
++ HMODULE pathapi = LoadLibraryExW(L"api-ms-win-core-path-l1-1-0.dll", NULL,
++ LOAD_LIBRARY_SEARCH_SYSTEM32);
++ if (pathapi) {
++ _PathCchCanonicalizeEx = (PPathCchCanonicalizeEx)GetProcAddress(pathapi, "PathCchCanonicalizeEx");
++ }
++ else {
++ _PathCchCanonicalizeEx = NULL;
++ }
++ _PathCchCanonicalizeEx_Initialized = 1;
++ }
++
++ if (_PathCchCanonicalizeEx) {
++ if (FAILED(_PathCchCanonicalizeEx(buffer, MAXPATHLEN + 1, path, 0))) {
++ return INIT_ERR_BUFFER_OVERFLOW();
++ }
++ }
++ else {
++ if (!PathCanonicalizeW(buffer, path)) {
++ return INIT_ERR_BUFFER_OVERFLOW();
++ }
+ }
+ return _PyStatus_OK();
+ }
+diff --git a/configure.ac b/configure.ac
+index d76db66..7cf6519 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -5881,7 +5881,7 @@ AC_MSG_RESULT(done)
+ # For mingw build need additional library for linking
+ case $host in
+ *-*-mingw*)
+- LIBS="$LIBS -lversion -lshlwapi -lpathcch"
++ LIBS="$LIBS -lversion -lshlwapi"
+ RCFLAGS="$RCFLAGS -O COFF"
+ case $host in
+ i686*) RCFLAGS="$RCFLAGS --target=pe-i386" ;;
+--
+2.32.0
+
diff --git a/0096-Add-CI-to-Build-and-Test.patch b/0096-Add-CI-to-Build-and-Test.patch
new file mode 100644
index 000000000000..bd3dd00f2b23
--- /dev/null
+++ b/0096-Add-CI-to-Build-and-Test.patch
@@ -0,0 +1,388 @@
+From 3a33db28df3b60d7127396f76366e2081eccd386 Mon Sep 17 00:00:00 2001
+From: Naveen M K <naveen521kk@gmail.com>
+Date: Fri, 18 Jun 2021 17:51:59 +0530
+Subject: [PATCH 096/N] Add CI to Build and Test
+
+---
+ .github/workflows/mingw.yml | 229 ++++++++++++++++++++++++++++++++
+ .github/workflows/smoketests.py | 132 ++++++++++++++++++
+ 2 files changed, 361 insertions(+)
+ create mode 100644 .github/workflows/mingw.yml
+ create mode 100644 .github/workflows/smoketests.py
+
+diff --git a/.github/workflows/mingw.yml b/.github/workflows/mingw.yml
+new file mode 100644
+index 0000000..fff5fa5
+--- /dev/null
++++ b/.github/workflows/mingw.yml
+@@ -0,0 +1,229 @@
++name: Build
++on: [push, pull_request, workflow_dispatch]
++
++jobs:
++ build:
++ runs-on: windows-latest
++ strategy:
++ fail-fast: false
++ matrix:
++ msystem: ['MINGW64','MINGW32','UCRT64','CLANG64']
++ include:
++ - msystem: MINGW64
++ prefix: mingw-w64-x86_64
++ - msystem: MINGW32
++ prefix: mingw-w64-i686
++ - msystem: UCRT64
++ prefix: mingw-w64-ucrt-x86_64
++ - msystem: CLANG64
++ prefix: mingw-w64-clang-x86_64
++ #- msystem: CLANG32
++ # prefix: mingw-w64-clang-i686
++ steps:
++ - name: Setup git
++ run: |
++ git config --global core.autocrlf false
++ git config --global core.eol lf
++ - uses: actions/checkout@v2
++ - uses: msys2/setup-msys2@v2
++ with:
++ msystem: ${{ matrix.msystem }}
++ release: false
++ install: >-
++ make
++ binutils
++ autoconf-archive
++ ${{ matrix.prefix }}-toolchain
++ ${{ matrix.prefix }}-expat
++ ${{ matrix.prefix }}-bzip2
++ ${{ matrix.prefix }}-libffi
++ ${{ matrix.prefix }}-mpdecimal
++ ${{ matrix.prefix }}-ncurses
++ ${{ matrix.prefix }}-openssl
++ ${{ matrix.prefix }}-sqlite3
++ ${{ matrix.prefix }}-tcl
++ ${{ matrix.prefix }}-tk
++ ${{ matrix.prefix }}-zlib
++ ${{ matrix.prefix }}-xz
++
++ - name: Build Python
++ shell: msys2 {0}
++ run: |
++ set -ex
++ pkgver='3.9.5'
++ _pybasever='3.9'
++
++ PREFIX_WIN=$(cygpath -wm ${MINGW_PREFIX})
++ if [ ${{ matrix.msystem }} == "CLANG64" ]
++ then
++ export CC=clang
++ export CXX=clang++
++ fi
++ autoreconf -vfi
++ 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 "
++ CFLAGS+=" -DNDEBUG "
++ CXXFLAGS+=" -DNDEBUG "
++ _extra_config+=("--enable-optimizations")
++ # Fix MS_DLL_ID undeclared in PC/dl_nt.c
++ f3f=0
++ re='^[0-9]+$'
++ part3=${pkgver##*.}
++ if ! [[ $part3 =~ $re ]]; then
++ c=
++ while test -n "$part3"; do
++ b=${part3:0:1}
++ if ! [[ $b =~ $re ]]; then
++ break
++ fi
++ c+=${b}
++ part3=${part3:1}
++ done
++ f3f=$((f3f + 1000 * $((${c}))))
++ part3Len=${#part3}
++ if [ "$part3Len" -ge "1" ]; then
++ f3f=$((f3f + 10 * $((0x${part3:0:1}))))
++ if [ "$part3Len" -ge "2" ]; then
++ f3f=$((f3f + ${part3:1:1}))
++ fi
++ fi
++ else
++ f3f=$((f3f + 1000 * ${part3}))
++ fi
++ CFLAGS+=" -DMS_DLL_ID=\\\"${_pybasever}\\\""
++ CFLAGS+=" -DFIELD3=${f3f}"
++ CFLAGS+=" -DORIGINAL_FILENAME=\\\"libpython${_pybasever}.dll\\\""
++ rc_flags=" -DMS_DLL_ID=\\\\\\\"${_pybasever}\\\\\\\" -DFIELD3=${f3f} -DORIGINAL_FILENAME=\\\\\\\"libpython${_pybasever}.dll\\\\\\\""
++
++ # 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
++
++ export CFLAGS
++ export CXXFLAGS
++ export CPPFLAGS
++
++
++ MSYSTEM=MINGW ./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[@]}" \
++ RCFLAGS="$rc_flags" \
++ OPT=""
++ # We patch importlib which is embedded in C headers, so regenerate them
++ make regen-importlib
++
++ make -j8
++
++ # Add missing venvlauncher files (issue #7014)
++ # FIXME: build these from PC/launcher.c instead
++ cp python.exe venvlauncher.exe
++ cp pythonw.exe venvwlauncher.exe
++
++ - name: Install
++ shell: msys2 {0}
++ run: |
++ set -ex
++
++ pkgver='3.9.5'
++ _pybasever='3.9'
++ srcdir=.
++
++ # now install things
++
++ pkgdir=python_pkgdir
++
++ PREFIX_WIN=$(cygpath -wm ${MINGW_PREFIX})
++ MSYSTEM=MINGW \
++ MSYS2_ARG_CONV_EXCL="--prefix=;--install-scripts=;--install-platlib=" \
++ make -j1 install DESTDIR="${pkgdir}"
++ VERABI=${_pybasever}
++
++ # 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
++
++ 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
++
++ 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
++
++
++ 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
++
++ 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
++
++ # 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
++
++ - name: Run Smoke Test
++ shell: msys2 {0}
++ run: |
++ SMOKETESTS="$(pwd)/.github/workflows/smoketests.py"
++ cd python_pkgdir/${MINGW_PREFIX}/bin
++ ./python.exe "$SMOKETESTS"
++ MSYSTEM= ./python.exe "$SMOKETESTS"
++
++ - name: Run tests
++ continue-on-error: true
++ shell: msys2 {0}
++ run: |
++ cd python_pkgdir/${MINGW_PREFIX}/bin
++ ./python.exe -m test -j4
++
++ - name: Compress
++ if: always()
++ shell: msys2 {0}
++ run: |
++ tar -I 'zstd --ultra -20' -cf python.tar.zst python_pkgdir/
++
++ - name: Upload
++ uses: actions/upload-artifact@v2
++ if: always()
++ with:
++ name: build-${{ matrix.msystem }}
++ path: python.tar.zst
++
+diff --git a/.github/workflows/smoketests.py b/.github/workflows/smoketests.py
+new file mode 100644
+index 0000000..9277c14
+--- /dev/null
++++ b/.github/workflows/smoketests.py
+@@ -0,0 +1,132 @@
++#!/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')
+--
+2.32.0
+
diff --git a/0097-Don-t-use-os.pathsep-to-find-EOF.patch b/0097-Don-t-use-os.pathsep-to-find-EOF.patch
new file mode 100644
index 000000000000..b0845a03e772
--- /dev/null
+++ b/0097-Don-t-use-os.pathsep-to-find-EOF.patch
@@ -0,0 +1,27 @@
+From d0241e1a50f2bd27876a54ee3047487d7ce66cc5 Mon Sep 17 00:00:00 2001
+From: Naveen M K <naveen@syrusdark.website>
+Date: Fri, 18 Jun 2021 12:38:11 +0530
+Subject: [PATCH 097/N] Don't use os.pathsep to find EOF not all
+ distributions in win32 have them as \ instead check using sys.platform
+
+Signed-off-by: Naveen M K <naveen@syrusdark.website>
+---
+ Lib/site.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/Lib/site.py b/Lib/site.py
+index b344f03..474ef89 100644
+--- a/Lib/site.py
++++ b/Lib/site.py
+@@ -370,7 +370,7 @@ def setquit():
+ The repr of each object contains a hint at how it works.
+
+ """
+- if os.sep == '\\':
++ if sys.platform == 'win32':
+ eof = 'Ctrl-Z plus Return'
+ else:
+ eof = 'Ctrl-D (i.e. EOF)'
+--
+2.32.0
+
diff --git a/0098-Fix-extension-suffix-for-c-extensions-on-mingw.patch b/0098-Fix-extension-suffix-for-c-extensions-on-mingw.patch
new file mode 100644
index 000000000000..226494752d26
--- /dev/null
+++ b/0098-Fix-extension-suffix-for-c-extensions-on-mingw.patch
@@ -0,0 +1,181 @@
+From 07a8e1ed1285bf5e2708036b1c1cc72fc87dfa21 Mon Sep 17 00:00:00 2001
+From: Naveen M K <naveen521kk@gmail.com>
+Date: Wed, 23 Jun 2021 18:12:12 +0530
+Subject: [PATCH 098/N] Fix extension suffix for c-extensions on mingw
+
+Python is compiled with various compilers which previously
+had same platform tags or extension suffix. This can be error
+prone while loading c-extensions, so now each compiler or
+runtime has a different extension suffix.
+
+Also, changed all extension to end with .pyd rather than
+.dll file.
+
+Fixes https://github.com/msys2/MINGW-packages/issues/8843
+
+Signed-off-by: Naveen M K <naveen521kk@gmail.com>
+---
+ Makefile.pre.in | 6 ++--
+ Python/dynload_win.c | 6 ----
+ configure.ac | 76 +++++++++++++++++++++++++++++++++++++++-----
+ 3 files changed, 71 insertions(+), 17 deletions(-)
+
+diff --git a/Makefile.pre.in b/Makefile.pre.in
+index 3331d5c..e18239f 100644
+--- a/Makefile.pre.in
++++ b/Makefile.pre.in
+@@ -165,6 +165,7 @@ CONFINCLUDEPY= $(CONFINCLUDEDIR)/python$(LDVERSION)
+ # Symbols used for using shared libraries
+ SHLIB_SUFFIX= @SHLIB_SUFFIX@
+ EXT_SUFFIX= @EXT_SUFFIX@
++PYD_PLATFORM_TAG = @PYD_PLATFORM_TAG@
+ LDSHARED= @LDSHARED@ $(PY_LDFLAGS)
+ BLDSHARED= @BLDSHARED@ $(PY_CORE_LDFLAGS)
+ LDCXXSHARED= @LDCXXSHARED@
+@@ -851,8 +852,7 @@ Python/dynload_hpux.o: $(srcdir)/Python/dynload_hpux.c Makefile
+
+ Python/dynload_win.o: $(srcdir)/Python/dynload_win.c Makefile
+ $(CC) -c $(PY_CORE_CFLAGS) \
+- -DSHLIB_SUFFIX='"$(SHLIB_SUFFIX)"' \
+- -DEXT_SUFFIX='"$(EXT_SUFFIX)"' \
++ -DPYD_PLATFORM_TAG='"$(PYD_PLATFORM_TAG)"' \
+ -o $@ $(srcdir)/Python/dynload_win.c
+
+ Python/sysmodule.o: $(srcdir)/Python/sysmodule.c Makefile $(srcdir)/Include/pydtrace.h
+@@ -1691,7 +1691,7 @@ libainstall: @DEF_MAKE_RULE@ python-config
+ done
+ @if test -d $(LIBRARY); then :; else \
+ if test "$(PYTHONFRAMEWORKDIR)" = no-framework; then \
+- if test "$(SHLIB_SUFFIX)" = .dll; then \
++ if test "$(SHLIB_SUFFIX)" = .dll -o "$(SHLIB_SUFFIX)" = .pyd; then \
+ $(INSTALL_DATA) $(LDLIBRARY) $(DESTDIR)$(LIBPL) ; \
+ else \
+ $(INSTALL_DATA) $(LIBRARY) $(DESTDIR)$(LIBPL)/$(LIBRARY) ; \
+diff --git a/Python/dynload_win.c b/Python/dynload_win.c
+index bd34310..60fb603 100644
+--- a/Python/dynload_win.c
++++ b/Python/dynload_win.c
+@@ -27,12 +27,6 @@
+ #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
+diff --git a/configure.ac b/configure.ac
+index 7cf6519..bba2006 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -2825,7 +2825,7 @@ if test -z "$SHLIB_SUFFIX"; then
+ *) SHLIB_SUFFIX=.so;;
+ esac
+ case $host_os in
+- mingw*) SHLIB_SUFFIX=.dll;;
++ mingw*) SHLIB_SUFFIX=.pyd;;
+ esac
+ fi
+ AC_MSG_RESULT($SHLIB_SUFFIX)
+@@ -5114,6 +5114,67 @@ esac
+ # check for endianness
+ AC_C_BIGENDIAN
+
++AC_SUBST(PYD_PLATFORM_TAG)
++# Special case of PYD_PLATFORM_TAG with python build with mingw.
++# Python can with compiled with clang or gcc and linked
++# to msvcrt or ucrt. To avoid conflicts between them
++# we are selecting the extension as based on the compiler
++# and the runtime they link to
++# gcc + x86_64 + msvcrt = cp{version number}-x86_64
++# gcc + i686 + msvcrt = cp{version number}-i686
++# gcc + x86_64 + ucrt = cp{version number}-x86_64-ucrt
++# clang + x86_64 + ucrt = cp{version number}-x86_64-clang
++# clang + i686 + ucrt = cp{version number}-i686-clang
++
++PYD_PLATFORM_TAG=""
++case $host in
++ *-*-mingw*)
++ # check if we are linking to ucrt
++ AC_MSG_CHECKING(whether linking to ucrt)
++ AC_RUN_IFELSE([AC_LANG_SOURCE([[
++ #include <stdio.h>
++ int main(){
++ _UCRT;
++ }
++ ]])],[linking_to_ucrt=yes],[linking_to_ucrt=no])
++ AC_MSG_RESULT($linking_to_ucrt)
++ ;;
++esac
++case $host_os in
++ mingw*)
++ AC_MSG_CHECKING(PYD_PLATFORM_TAG)
++ case $host in
++ i686-*-mingw*)
++ if test -n "${cc_is_clang}"; then
++ # it is CLANG32
++ PYD_PLATFORM_TAG="mingw_i686_clang"
++ else
++ if test $linking_to_ucrt = no; then
++ PYD_PLATFORM_TAG="mingw_i686"
++ else
++ PYD_PLATFORM_TAG="mingw_i686_ucrt"
++ fi
++ fi
++ ;;
++ x86_64-*-mingw*)
++ if test -n "${cc_is_clang}"; then
++ # it is CLANG64
++ PYD_PLATFORM_TAG="mingw_x86_64_clang"
++ else
++ if test $linking_to_ucrt = no; then
++ PYD_PLATFORM_TAG="mingw_x86_64"
++ else
++ PYD_PLATFORM_TAG="mingw_x86_64_ucrt"
++ fi
++ fi
++ ;;
++ aarch64-*-mingw*)
++ PYD_PLATFORM_TAG+="mingw_aarch64"
++ ;;
++ esac
++ AC_MSG_RESULT($PYD_PLATFORM_TAG)
++esac
++
+ # ABI version string for Python extension modules. This appears between the
+ # periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
+ # from the following attributes which affect the ABI of this Python build (in
+@@ -5146,7 +5207,12 @@ if test "$Py_DEBUG" = 'true' -a "$with_trace_refs" != "yes"; then
+ fi
+
+ AC_SUBST(EXT_SUFFIX)
+-EXT_SUFFIX=.${SOABI}${SHLIB_SUFFIX}
++VERSION_NO_DOTS=$(echo $LDVERSION | tr -d .)
++if test -n "${PYD_PLATFORM_TAG}"; then
++ EXT_SUFFIX=".cp${VERSION_NO_DOTS}-${PYD_PLATFORM_TAG}${SHLIB_SUFFIX}"
++else
++ EXT_SUFFIX=.${SOABI}${SHLIB_SUFFIX}
++fi
+
+ AC_MSG_CHECKING(LDVERSION)
+ LDVERSION='$(VERSION)$(ABIFLAGS)'
+@@ -5824,12 +5890,6 @@ case "$ac_cv_computed_gotos" in yes*)
+ AC_DEFINE(HAVE_COMPUTED_GOTOS, 1,
+ [Define if the C compiler supports computed gotos.])
+ 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
+
+ case $ac_sys_system in
+ AIX*)
+--
+2.32.0
+
diff --git a/0099-Change-the-get_platform-method-in-sysconfig-and-dist.patch b/0099-Change-the-get_platform-method-in-sysconfig-and-dist.patch
new file mode 100644
index 000000000000..07dd2e3f7943
--- /dev/null
+++ b/0099-Change-the-get_platform-method-in-sysconfig-and-dist.patch
@@ -0,0 +1,93 @@
+From 0e71a45f5306c61085b972fb6799dad58cc51b83 Mon Sep 17 00:00:00 2001
+From: Naveen M K <naveen521kk@gmail.com>
+Date: Mon, 28 Jun 2021 17:31:35 +0530
+Subject: [PATCH 099/N] Change the `get_platform()` method in sysconfig and
+ distutils
+
+This would possibly fix building wheels when mingw python
+is used and would be unique to each python same as EXT_SUFFIX.
+
+Also, this modifies the `sys.version` argument to include UCRT
+in it.
+
+Signed-off-by: Naveen M K <naveen521kk@gmail.com>
+---
+ Lib/distutils/util.py | 16 ++++++++++++++--
+ Lib/sysconfig.py | 16 ++++++++++++++--
+ Python/getcompiler.c | 4 ++++
+ 3 files changed, 32 insertions(+), 4 deletions(-)
+
+diff --git a/Lib/distutils/util.py b/Lib/distutils/util.py
+index 75a369d..5b51c76 100644
+--- a/Lib/distutils/util.py
++++ b/Lib/distutils/util.py
+@@ -36,8 +36,20 @@ def get_host_platform():
+
+ """
+ if os.name == 'nt':
+- if 'GCC' in sys.version:
+- return 'mingw'
++ if 'gcc' in sys.version.lower():
++ if 'ucrt' in sys.version.lower():
++ if 'amd64' in sys.version.lower():
++ return 'mingw_x86_64_ucrt'
++ return 'mingw_i686_ucrt'
++ if 'clang' in sys.version.lower():
++ if 'amd64' in sys.version.lower():
++ return 'mingw_x86_64_clang'
++ if 'arm64' in sys.version.lower():
++ return 'mingw_aarch64'
++ return 'mingw_i686_clang'
++ if 'amd64' in sys.version.lower():
++ return 'mingw_x86_64'
++ return 'mingw_i686'
+ if 'amd64' in sys.version.lower():
+ return 'win-amd64'
+ if '(arm)' in sys.version.lower():
+diff --git a/Lib/sysconfig.py b/Lib/sysconfig.py
+index c0695e2..854b382 100644
+--- a/Lib/sysconfig.py
++++ b/Lib/sysconfig.py
+@@ -667,8 +667,20 @@ def get_platform():
+
+ """
+ if os.name == 'nt':
+- if 'GCC' in sys.version:
+- return 'mingw'
++ if 'gcc' in sys.version.lower():
++ if 'ucrt' in sys.version.lower():
++ if 'amd64' in sys.version.lower():
++ return 'mingw_x86_64_ucrt'
++ return 'mingw_i686_ucrt'
++ if 'clang' in sys.version.lower():
++ if 'amd64' in sys.version.lower():
++ return 'mingw_x86_64_clang'
++ if 'arm64' in sys.version.lower():
++ return 'mingw_aarch64'
++ return 'mingw_i686_clang'
++ if 'amd64' in sys.version.lower():
++ return 'mingw_x86_64'
++ return 'mingw_i686'
+ if 'amd64' in sys.version.lower():
+ return 'win-amd64'
+ if '(arm)' in sys.version.lower():
+diff --git a/Python/getcompiler.c b/Python/getcompiler.c
+index b529e29..2d935fe 100644
+--- a/Python/getcompiler.c
++++ b/Python/getcompiler.c
+@@ -33,8 +33,12 @@
+ #define COMPILER COMP_SEP "[GCC Clang " xstr(__clang_major__) "." \
+ xstr(__clang_minor__) "." xstr(__clang_patchlevel__) ARCH_SUFFIX "]"
+ #else
++#if defined(_UCRT)
++#define COMPILER COMP_SEP "[GCC UCRT " __VERSION__ ARCH_SUFFIX "]"
++#else
+ #define COMPILER COMP_SEP "[GCC " __VERSION__ ARCH_SUFFIX "]"
+ #endif
++#endif
+ // Generic fallbacks.
+ #elif defined(__cplusplus)
+ #define COMPILER "[C++]"
+--
+2.32.0
+
diff --git a/0100-Add-a-test-to-build-C-Ext.patch b/0100-Add-a-test-to-build-C-Ext.patch
new file mode 100644
index 000000000000..067b44628949
--- /dev/null
+++ b/0100-Add-a-test-to-build-C-Ext.patch
@@ -0,0 +1,108 @@
+From 30080e89858fc1ae343eea6ba2d2bf152257a458 Mon Sep 17 00:00:00 2001
+From: Naveen M K <naveen521kk@gmail.com>
+Date: Tue, 29 Jun 2021 18:24:37 +0530
+Subject: [PATCH 100/N] Add a test to build C-Ext
+
+---
+ .github/workflows/smoketests.py | 85 +++++++++++++++++++++++++++++++++
+ 1 file changed, 85 insertions(+)
+
+diff --git a/.github/workflows/smoketests.py b/.github/workflows/smoketests.py
+index 9277c14..1761724 100644
+--- a/.github/workflows/smoketests.py
++++ b/.github/workflows/smoketests.py
+@@ -123,6 +123,91 @@ class Tests(unittest.TestCase):
+ from time import mktime, gmtime
+ mktime(gmtime())
+
++ def test_c_ext_build(self):
++ import tempfile
++ import sys
++ import subprocess
++ import textwrap
++ from pathlib import Path
++
++ with tempfile.TemporaryDirectory() as tmppro:
++ subprocess.check_call([sys.executable, "-m", "ensurepip", "--user"])
++ with Path(tmppro, "setup.py").open("w") as f:
++ f.write(
++ textwrap.dedent(
++ """\
++ from setuptools import setup, Extension
++
++ setup(
++ name='cwrapper',
++ version='1.0',
++ ext_modules=[
++ Extension(
++ 'cwrapper',
++ sources=['cwrapper.c']),
++ ],
++ )
++ """
++ )
++ )
++ with Path(tmppro, "cwrapper.c").open("w") as f:
++ f.write(
++ textwrap.dedent(
++ """\
++ #include <Python.h>
++ static PyObject *
++ helloworld(PyObject *self, PyObject *args)
++ {
++ printf("Hello World\\n");
++ return Py_None;
++ }
++ static PyMethodDef
++ myMethods[] = {
++ { "helloworld", helloworld, METH_NOARGS, "Prints Hello World" },
++ { NULL, NULL, 0, NULL }
++ };
++ static struct PyModuleDef cwrapper = {
++ PyModuleDef_HEAD_INIT,
++ "cwrapper",
++ "Test Module",
++ -1,
++ myMethods
++ };
++
++ PyMODINIT_FUNC
++ PyInit_cwrapper(void)
++ {
++ return PyModule_Create(&cwrapper);
++ }
++ """
++ )
++ )
++ subprocess.check_call(
++ [sys.executable, "-c", "import struct"],
++ )
++ subprocess.check_call(
++ [
++ sys.executable,
++ "-m",
++ "pip",
++ "install",
++ "wheel",
++ ],
++ )
++ subprocess.check_call(
++ [
++ sys.executable,
++ "-m",
++ "pip",
++ "install",
++ tmppro,
++ ],
++ )
++ subprocess.check_call(
++ [sys.executable, "-c", "import cwrapper"],
++ )
++
++
+
+ def suite():
+ return unittest.TestLoader().loadTestsFromName(__name__)
+--
+2.32.0
+
diff --git a/0101-Add-some-platform-related-tests.patch b/0101-Add-some-platform-related-tests.patch
new file mode 100644
index 000000000000..50622c926737
--- /dev/null
+++ b/0101-Add-some-platform-related-tests.patch
@@ -0,0 +1,45 @@
+From 23659e23d12299a564b12e527ab144d425a2d572 Mon Sep 17 00:00:00 2001
+From: Christoph Reiter <reiter.christoph@gmail.com>
+Date: Thu, 1 Jul 2021 09:16:20 +0200
+Subject: [PATCH 101/N] Add some platform related tests
+
+So we notice when things change/break
+---
+ .github/workflows/smoketests.py | 21 +++++++++++++++++++++
+ 1 file changed, 21 insertions(+)
+
+diff --git a/.github/workflows/smoketests.py b/.github/workflows/smoketests.py
+index 1761724..d8f76e6 100644
+--- a/.github/workflows/smoketests.py
++++ b/.github/workflows/smoketests.py
+@@ -123,6 +123,27 @@ class Tests(unittest.TestCase):
+ from time import mktime, gmtime
+ mktime(gmtime())
+
++ def test_platform_things(self):
++ import sys
++ import sysconfig
++ import platform
++ import importlib.machinery
++ self.assertEqual(sys.implementation.name, "cpython")
++ self.assertEqual(sys.platform, "win32")
++ self.assertTrue(sysconfig.get_platform().startswith("mingw"))
++ self.assertTrue(sysconfig.get_config_var('SOABI').startswith("cpython-"))
++ ext_suffix = sysconfig.get_config_var('EXT_SUFFIX')
++ self.assertTrue(ext_suffix.endswith(".pyd"))
++ self.assertTrue("mingw" in ext_suffix)
++ self.assertEqual(sysconfig.get_config_var('SHLIB_SUFFIX'), ".pyd")
++ ext_suffixes = importlib.machinery.EXTENSION_SUFFIXES
++ self.assertTrue(ext_suffix in ext_suffixes)
++ self.assertTrue(".pyd" in ext_suffixes)
++ self.assertEqual(sys.winver, ".".join(map(str, sys.version_info[:2])))
++ self.assertEqual(platform.python_implementation(), "CPython")
++ self.assertEqual(platform.system(), "Windows")
++ self.assertTrue(isinstance(sys.api_version, int) and sys.api_version > 0)
++
+ def test_c_ext_build(self):
+ import tempfile
+ import sys
+--
+2.32.0
+
diff --git a/0102-squash-CI-use-O2.patch b/0102-squash-CI-use-O2.patch
new file mode 100644
index 000000000000..0814327e35d7
--- /dev/null
+++ b/0102-squash-CI-use-O2.patch
@@ -0,0 +1,30 @@
+From 16dd9f42f911def97236f58be72d6d6aa023373e Mon Sep 17 00:00:00 2001
+From: Christoph Reiter <reiter.christoph@gmail.com>
+Date: Fri, 2 Jul 2021 15:01:54 +0200
+Subject: [PATCH 102/N] [squash] CI: use -O2
+
+Without optimizations the stack size increases and tests start to fail
+with stack overflow (this is a known problem upstream https://bugs.python.org/issue43271)
+
+Either we enforce -O2 or we increase the stack size.
+
+Needs to be merged into the CI setup
+---
+ .github/workflows/mingw.yml | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/.github/workflows/mingw.yml b/.github/workflows/mingw.yml
+index fff5fa5..8486bb4 100644
+--- a/.github/workflows/mingw.yml
++++ b/.github/workflows/mingw.yml
+@@ -52,6 +52,7 @@ jobs:
+ set -ex
+ pkgver='3.9.5'
+ _pybasever='3.9'
++ CFLAGS="-O2"
+
+ PREFIX_WIN=$(cygpath -wm ${MINGW_PREFIX})
+ if [ ${{ matrix.msystem }} == "CLANG64" ]
+--
+2.32.0
+
diff --git a/0103-squash-Fixup-.rc-handling.patch b/0103-squash-Fixup-.rc-handling.patch
new file mode 100644
index 000000000000..abbbc180ec9f
--- /dev/null
+++ b/0103-squash-Fixup-.rc-handling.patch
@@ -0,0 +1,69 @@
+From 2d66cfe1ae9f08b51abfd8f1aaeeb9ce87ee06b9 Mon Sep 17 00:00:00 2001
+From: Christoph Reiter <reiter.christoph@gmail.com>
+Date: Fri, 2 Jul 2021 19:04:05 +0200
+Subject: [PATCH 103/N] [squash] Fixup .rc handling
+
+Define everything needed in the build system
+
+This needs to be merged into "link win resource files and build pythonw"
+---
+ Makefile.pre.in | 11 ++++-------
+ configure.ac | 16 +++++++++++++++-
+ 2 files changed, 19 insertions(+), 8 deletions(-)
+
+diff --git a/Makefile.pre.in b/Makefile.pre.in
+index e18239f..01cc055 100644
+--- a/Makefile.pre.in
++++ b/Makefile.pre.in
+@@ -600,17 +600,14 @@ coverage-report: regen-grammar regen-token regen-importlib
+ clinic: check-clean-src $(srcdir)/Modules/_blake2/blake2s_impl.c
+ $(PYTHON_FOR_REGEN) $(srcdir)/Tools/clinic/clinic.py --make --srcdir $(srcdir)
+
+-pythonnt_rc.h:
+- @echo '#define PYTHON_DLL_NAME "$(DLLLIBRARY)"' >> $@
+-
+-python_exe.o: pythonnt_rc.h $(srcdir)/PC/python_exe.rc
++python_exe.o: $(srcdir)/PC/python_exe.rc
+ $(WINDRES) $(RCFLAGS) -I$(srcdir)/Include -I$(srcdir)/PC -I. $(srcdir)/PC/python_exe.rc $@
+
+-pythonw_exe.o: pythonnt_rc.h $(srcdir)/PC/pythonw_exe.rc
++pythonw_exe.o: $(srcdir)/PC/pythonw_exe.rc
+ $(WINDRES) $(RCFLAGS) -I$(srcdir)/Include -I$(srcdir)/PC -I. $(srcdir)/PC/pythonw_exe.rc $@
+
+-python_nt.o: pythonnt_rc.h $(srcdir)/PC/python_nt.rc
+- $(WINDRES) $(RCFLAGS) -I$(srcdir)/Include -I$(srcdir)/PC -I. $(srcdir)/PC/python_nt.rc $@
++python_nt.o: $(srcdir)/PC/python_nt.rc
++ $(WINDRES) $(RCFLAGS) -DORIGINAL_FILENAME=\\\"$(DLLLIBRARY)\\\" -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
+diff --git a/configure.ac b/configure.ac
+index bba2006..78057de 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -5942,7 +5942,21 @@ AC_MSG_RESULT(done)
+ case $host in
+ *-*-mingw*)
+ LIBS="$LIBS -lversion -lshlwapi"
+- RCFLAGS="$RCFLAGS -O COFF"
++
++ AC_RUN_IFELSE([AC_LANG_SOURCE([[
++ #include <stdio.h>
++ #include "Include/patchlevel.h"
++ int main() {
++ fprintf (
++ fopen ("conftest.out","w"),
++ "%d",
++ PY_MICRO_VERSION * 1000 + PY_RELEASE_LEVEL * 10 + PY_RELEASE_SERIAL);
++ return 0;
++ }
++ ]])], [FIELD3=`cat conftest.out`])
++
++ RCFLAGS="$RCFLAGS -DFIELD3=$FIELD3 -O COFF"
++
+ case $host in
+ i686*) RCFLAGS="$RCFLAGS --target=pe-i386" ;;
+ x86_64*) RCFLAGS="$RCFLAGS --target=pe-x86-64" ;;
+--
+2.32.0
+
diff --git a/0104-squash-Set-MS_DLL_ID.patch b/0104-squash-Set-MS_DLL_ID.patch
new file mode 100644
index 000000000000..72b4758ffc4b
--- /dev/null
+++ b/0104-squash-Set-MS_DLL_ID.patch
@@ -0,0 +1,25 @@
+From a12eab686c41516a51449bcc61883703393870b2 Mon Sep 17 00:00:00 2001
+From: Christoph Reiter <reiter.christoph@gmail.com>
+Date: Fri, 2 Jul 2021 19:04:56 +0200
+Subject: [PATCH 104/N] [squash] Set MS_DLL_ID
+
+This needs to be merged into "MINGW dynamic loading support"
+---
+ configure.ac | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/configure.ac b/configure.ac
+index 78057de..bf21222 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -3958,6 +3958,7 @@ then
+ *-*-mingw*)
+ DYNLOADFILE="dynload_win.o"
+ extra_machdep_objs="$extra_machdep_objs PC/dl_nt.o"
++ CFLAGS_NODIST="$CFLAGS_NODIST -DMS_DLL_ID='\"$VERSION\"'"
+ ;;
+ esac
+ fi
+--
+2.32.0
+
diff --git a/0105-squash-CI-Clean-up.patch b/0105-squash-CI-Clean-up.patch
new file mode 100644
index 000000000000..1d2f9c9fd55e
--- /dev/null
+++ b/0105-squash-CI-Clean-up.patch
@@ -0,0 +1,115 @@
+From 0a6d945f0dc1b1941aa4265ce68718582f5bea32 Mon Sep 17 00:00:00 2001
+From: Christoph Reiter <reiter.christoph@gmail.com>
+Date: Fri, 2 Jul 2021 19:11:46 +0200
+Subject: [PATCH 105/N] [squash] CI: Clean up
+
+this is all no longer needed now
+
+Needs to be merged into the CI setup
+---
+ .github/workflows/mingw.yml | 45 +++++--------------------------------
+ 1 file changed, 6 insertions(+), 39 deletions(-)
+
+diff --git a/.github/workflows/mingw.yml b/.github/workflows/mingw.yml
+index 8486bb4..d45a9c2 100644
+--- a/.github/workflows/mingw.yml
++++ b/.github/workflows/mingw.yml
+@@ -50,8 +50,7 @@ jobs:
+ shell: msys2 {0}
+ run: |
+ set -ex
+- pkgver='3.9.5'
+- _pybasever='3.9'
++
+ CFLAGS="-O2"
+
+ PREFIX_WIN=$(cygpath -wm ${MINGW_PREFIX})
+@@ -67,35 +66,6 @@ jobs:
+ CFLAGS+=" -DNDEBUG "
+ CXXFLAGS+=" -DNDEBUG "
+ _extra_config+=("--enable-optimizations")
+- # Fix MS_DLL_ID undeclared in PC/dl_nt.c
+- f3f=0
+- re='^[0-9]+$'
+- part3=${pkgver##*.}
+- if ! [[ $part3 =~ $re ]]; then
+- c=
+- while test -n "$part3"; do
+- b=${part3:0:1}
+- if ! [[ $b =~ $re ]]; then
+- break
+- fi
+- c+=${b}
+- part3=${part3:1}
+- done
+- f3f=$((f3f + 1000 * $((${c}))))
+- part3Len=${#part3}
+- if [ "$part3Len" -ge "1" ]; then
+- f3f=$((f3f + 10 * $((0x${part3:0:1}))))
+- if [ "$part3Len" -ge "2" ]; then
+- f3f=$((f3f + ${part3:1:1}))
+- fi
+- fi
+- else
+- f3f=$((f3f + 1000 * ${part3}))
+- fi
+- CFLAGS+=" -DMS_DLL_ID=\\\"${_pybasever}\\\""
+- CFLAGS+=" -DFIELD3=${f3f}"
+- CFLAGS+=" -DORIGINAL_FILENAME=\\\"libpython${_pybasever}.dll\\\""
+- rc_flags=" -DMS_DLL_ID=\\\\\\\"${_pybasever}\\\\\\\" -DFIELD3=${f3f} -DORIGINAL_FILENAME=\\\\\\\"libpython${_pybasever}.dll\\\\\\\""
+
+ # Workaround for conftest error on 64-bit builds
+ export ac_cv_working_tzset=no
+@@ -131,7 +101,6 @@ jobs:
+ --without-c-locale-coercion \
+ --enable-loadable-sqlite-extensions \
+ "${_extra_config[@]}" \
+- RCFLAGS="$rc_flags" \
+ OPT=""
+ # We patch importlib which is embedded in C headers, so regenerate them
+ make regen-importlib
+@@ -147,9 +116,8 @@ jobs:
+ shell: msys2 {0}
+ run: |
+ set -ex
+-
+- pkgver='3.9.5'
+- _pybasever='3.9'
++
++ _pybasever=$(./python.exe -c "import sys; print(sys.winver);")
+ srcdir=.
+
+ # now install things
+@@ -160,7 +128,6 @@ jobs:
+ MSYSTEM=MINGW \
+ MSYS2_ARG_CONV_EXCL="--prefix=;--install-scripts=;--install-platlib=" \
+ make -j1 install DESTDIR="${pkgdir}"
+- VERABI=${_pybasever}
+
+ # gdb pretty printers for debugging Python itself; to use:
+ # python
+@@ -169,10 +136,10 @@ jobs:
+ # reload(python_gdb)
+ # end
+
+- cp -f "${pkgdir}${MINGW_PREFIX}"/lib/python${_pybasever}/config-${VERABI}/libpython${VERABI}.dll.a "${pkgdir}${MINGW_PREFIX}"/lib/libpython${VERABI}.dll.a
++ cp -f "${pkgdir}${MINGW_PREFIX}"/lib/python${_pybasever}/config-${_pybasever}/libpython${_pybasever}.dll.a "${pkgdir}${MINGW_PREFIX}"/lib/libpython${_pybasever}.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
++ cp -f "${pkgdir}${MINGW_PREFIX}"/lib/python${_pybasever}/config-${_pybasever}/libpython${_pybasever}.dll.a "${pkgdir}${MINGW_PREFIX}"/lib/libpython${_pybasever}.dll.a
+
+ 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}
+@@ -185,7 +152,7 @@ jobs:
+ cp "${pkgdir}${MINGW_PREFIX}"/bin/idle3 "${pkgdir}${MINGW_PREFIX}"/bin/idle
+ cp "${pkgdir}${MINGW_PREFIX}"/bin/pydoc3 "${pkgdir}${MINGW_PREFIX}"/bin/pydoc
+
+- 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
++ sed -i "s|#!${pkgdir}${MINGW_PREFIX}/bin/python${_pybasever}.exe|#!/usr/bin/env python${_pybasever}.exe|" "${pkgdir}${MINGW_PREFIX}"/lib/python${_pybasever}/config-${_pybasever}/python-config.py
+
+ # fix permissons
+ find ${pkgdir}${MINGW_PREFIX} -type f \( -name "*.dll" -o -name "*.exe" \) | xargs chmod 0755
+--
+2.32.0
+
diff --git a/0106-squash-CI-use-srcdir-builddir.patch b/0106-squash-CI-use-srcdir-builddir.patch
new file mode 100644
index 000000000000..f23054c98a97
--- /dev/null
+++ b/0106-squash-CI-use-srcdir-builddir.patch
@@ -0,0 +1,69 @@
+From 29bca6042fe8e66965c3c7207699fff107403296 Mon Sep 17 00:00:00 2001
+From: Christoph Reiter <reiter.christoph@gmail.com>
+Date: Sat, 3 Jul 2021 09:22:14 +0200
+Subject: [PATCH 106/N] [squash] CI: use srcdir!=builddir
+
+To catch me breaking it
+---
+ .github/workflows/mingw.yml | 10 +++++++---
+ 1 file changed, 7 insertions(+), 3 deletions(-)
+
+diff --git a/.github/workflows/mingw.yml b/.github/workflows/mingw.yml
+index d45a9c2..b2f0d6a 100644
+--- a/.github/workflows/mingw.yml
++++ b/.github/workflows/mingw.yml
+@@ -87,8 +87,9 @@ jobs:
+ export CXXFLAGS
+ export CPPFLAGS
+
++ rm -Rf _build && mkdir _build && cd _build
+
+- MSYSTEM=MINGW ./configure \
++ MSYSTEM=MINGW ../configure \
+ --prefix=${MINGW_PREFIX} \
+ --host=${MINGW_CHOST} \
+ --build=${MINGW_CHOST} \
+@@ -117,8 +118,8 @@ jobs:
+ run: |
+ set -ex
+
++ cd _build
+ _pybasever=$(./python.exe -c "import sys; print(sys.winver);")
+- srcdir=.
+
+ # now install things
+
+@@ -171,6 +172,7 @@ jobs:
+ shell: msys2 {0}
+ run: |
+ SMOKETESTS="$(pwd)/.github/workflows/smoketests.py"
++ cd _build
+ cd python_pkgdir/${MINGW_PREFIX}/bin
+ ./python.exe "$SMOKETESTS"
+ MSYSTEM= ./python.exe "$SMOKETESTS"
+@@ -179,6 +181,7 @@ jobs:
+ continue-on-error: true
+ shell: msys2 {0}
+ run: |
++ cd _build
+ cd python_pkgdir/${MINGW_PREFIX}/bin
+ ./python.exe -m test -j4
+
+@@ -186,6 +189,7 @@ jobs:
+ if: always()
+ shell: msys2 {0}
+ run: |
++ cd _build
+ tar -I 'zstd --ultra -20' -cf python.tar.zst python_pkgdir/
+
+ - name: Upload
+@@ -193,5 +197,5 @@ jobs:
+ if: always()
+ with:
+ name: build-${{ matrix.msystem }}
+- path: python.tar.zst
++ path: _build/python.tar.zst
+
+--
+2.32.0
+
diff --git a/0107-squash-fix-srcdir-builddir.patch b/0107-squash-fix-srcdir-builddir.patch
new file mode 100644
index 000000000000..5494f6db5502
--- /dev/null
+++ b/0107-squash-fix-srcdir-builddir.patch
@@ -0,0 +1,41 @@
+From b38e504287a07e713de6facb001b2b9e069e5f74 Mon Sep 17 00:00:00 2001
+From: Christoph Reiter <reiter.christoph@gmail.com>
+Date: Sat, 3 Jul 2021 09:34:29 +0200
+Subject: [PATCH 107/N] [squash] fix srcdir!=builddir
+
+merge into "Fixup .rc handling"
+---
+ configure.ac | 8 ++++++--
+ 1 file changed, 6 insertions(+), 2 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index bf21222..14e4c8c 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -5944,9 +5944,12 @@ case $host in
+ *-*-mingw*)
+ LIBS="$LIBS -lversion -lshlwapi"
+
++ AC_MSG_CHECKING([FIELD3])
++ SAVE_CFLAGS=$CFLAGS
++ CFLAGS="-I $srcdir/Include"
+ AC_RUN_IFELSE([AC_LANG_SOURCE([[
+ #include <stdio.h>
+- #include "Include/patchlevel.h"
++ #include "patchlevel.h"
+ int main() {
+ fprintf (
+ fopen ("conftest.out","w"),
+@@ -5955,7 +5958,8 @@ case $host in
+ return 0;
+ }
+ ]])], [FIELD3=`cat conftest.out`])
+-
++ CFLAGS=$SAVE_CFLAGS
++ AC_MSG_RESULT([${FIELD3}])
+ RCFLAGS="$RCFLAGS -DFIELD3=$FIELD3 -O COFF"
+
+ case $host in
+--
+2.32.0
+
diff --git a/0108-build-Cleanup-ncursesw-include-lookup-code.patch b/0108-build-Cleanup-ncursesw-include-lookup-code.patch
new file mode 100644
index 000000000000..a37be8ae9b67
--- /dev/null
+++ b/0108-build-Cleanup-ncursesw-include-lookup-code.patch
@@ -0,0 +1,75 @@
+From 092108ff97a30264657e3f998de754e691cc58f4 Mon Sep 17 00:00:00 2001
+From: Christoph Reiter <reiter.christoph@gmail.com>
+Date: Fri, 23 Jul 2021 08:50:39 +0200
+Subject: [PATCH 108/N] build: Cleanup ncursesw include lookup code
+
+Mirror what si already done for libffi; Look it up via
+pkg-config and use the exported path via sysconfig in setup.py
+
+This should be merged into "dont include system ncurses path"
+---
+ Makefile.pre.in | 1 +
+ configure.ac | 19 ++++++++++---------
+ setup.py | 2 +-
+ 3 files changed, 12 insertions(+), 10 deletions(-)
+
+diff --git a/Makefile.pre.in b/Makefile.pre.in
+index 01cc055..fe25d9e 100644
+--- a/Makefile.pre.in
++++ b/Makefile.pre.in
+@@ -313,6 +313,7 @@ IO_OBJS= \
+ ##########################################################################
+
+ LIBFFI_INCLUDEDIR= @LIBFFI_INCLUDEDIR@
++NCURSESW_INCLUDEDIR= @NCURSESW_INCLUDEDIR@
+
+ ##########################################################################
+ # Parser
+diff --git a/configure.ac b/configure.ac
+index 14e4c8c..bab62ad 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -5556,17 +5556,18 @@ then
+ [Define if you have struct stat.st_mtimensec])
+ fi
+
++if test -n "$PKG_CONFIG"; then
++ NCURSESW_INCLUDEDIR="`"$PKG_CONFIG" ncursesw --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
++else
++ NCURSESW_INCLUDEDIR=""
++fi
++AC_SUBST(NCURSESW_INCLUDEDIR)
++
+ # first curses header check
+ ac_save_cppflags="$CPPFLAGS"
+-case $host_os in
+- mingw*)
+- ;;
+- *)
+- if test "$cross_compiling" = no; then
+- CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
+- fi
+- ;;
+-esac
++if test "$cross_compiling" = no; then
++ CPPFLAGS="$CPPFLAGS -I$NCURSESW_INCLUDEDIR"
++fi
+
+ AC_CHECK_HEADERS(curses.h ncurses.h)
+
+diff --git a/setup.py b/setup.py
+index a2d5656..4e7a284 100644
+--- a/setup.py
++++ b/setup.py
+@@ -1098,7 +1098,7 @@ class PyBuildExt(build_ext):
+ if curses_library == 'ncursesw':
+ curses_defines.append(('HAVE_NCURSESW', '1'))
+ if not CROSS_COMPILING:
+- curses_includes.append('/usr/include/ncursesw')
++ curses_includes.append(sysconfig.get_config_var("NCURSESW_INCLUDEDIR"))
+ # Bug 1464056: If _curses.so links with ncursesw,
+ # _curses_panel.so must link with panelw.
+ panel_library = 'panelw'
+--
+2.32.0
+
diff --git a/0109-tests-fix-test_bytes.patch b/0109-tests-fix-test_bytes.patch
new file mode 100644
index 000000000000..eb466629b02c
--- /dev/null
+++ b/0109-tests-fix-test_bytes.patch
@@ -0,0 +1,27 @@
+From c303ac774c185b775e109d857cfd91223825de96 Mon Sep 17 00:00:00 2001
+From: Christoph Reiter <reiter.christoph@gmail.com>
+Date: Fri, 23 Jul 2021 08:51:32 +0200
+Subject: [PATCH 109/N] tests: fix test_bytes
+
+%p has different casing with mingw-w64, but it's implementation defined.
+Change the test to the mingw-w64 variant.
+---
+ Lib/test/test_bytes.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/Lib/test/test_bytes.py b/Lib/test/test_bytes.py
+index 227e6d7..193ce10 100644
+--- a/Lib/test/test_bytes.py
++++ b/Lib/test/test_bytes.py
+@@ -1073,7 +1073,7 @@ class BytesTest(BaseBytesTest, unittest.TestCase):
+
+ if os.name == 'nt':
+ # Windows (MSCRT)
+- ptr_format = '0x%0{}X'.format(2 * sizeof_ptr)
++ ptr_format = '0x%0{}x'.format(2 * sizeof_ptr)
+ def ptr_formatter(ptr):
+ return (ptr_format % ptr)
+ else:
+--
+2.32.0
+
diff --git a/0110-time-fix-strftime-not-raising-for-invalid-year-value.patch b/0110-time-fix-strftime-not-raising-for-invalid-year-value.patch
new file mode 100644
index 000000000000..32bb8332f301
--- /dev/null
+++ b/0110-time-fix-strftime-not-raising-for-invalid-year-value.patch
@@ -0,0 +1,28 @@
+From 57bb29b796eca27031584a75e6b44182e4c6b2e5 Mon Sep 17 00:00:00 2001
+From: Christoph Reiter <reiter.christoph@gmail.com>
+Date: Fri, 23 Jul 2021 08:52:50 +0200
+Subject: [PATCH 110/N] time: fix strftime not raising for invalid year
+ values
+
+It's crt specific and not compiler specific.
+This fixes a test case in test_time
+---
+ Modules/timemodule.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/Modules/timemodule.c b/Modules/timemodule.c
+index 80eab30..f0cdcfa 100644
+--- a/Modules/timemodule.c
++++ b/Modules/timemodule.c
+@@ -754,7 +754,7 @@ time_strftime(PyObject *self, PyObject *args)
+ return NULL;
+ }
+
+-#if defined(_MSC_VER) || (defined(__sun) && defined(__SVR4)) || defined(_AIX) || defined(__VXWORKS__)
++#if defined(MS_WINDOWS) || (defined(__sun) && defined(__SVR4)) || defined(_AIX) || defined(__VXWORKS__)
+ if (buf.tm_year + 1900 < 1 || 9999 < buf.tm_year + 1900) {
+ PyErr_SetString(PyExc_ValueError,
+ "strftime() requires year in [1; 9999]");
+--
+2.32.0
+
diff --git a/0111-winconsoleio-build-_testconsole-which-is-required-fo.patch b/0111-winconsoleio-build-_testconsole-which-is-required-fo.patch
new file mode 100644
index 000000000000..fd6674c53399
--- /dev/null
+++ b/0111-winconsoleio-build-_testconsole-which-is-required-fo.patch
@@ -0,0 +1,30 @@
+From bf8eeb610de434dc3adbdf0f4e8da39c70171cca Mon Sep 17 00:00:00 2001
+From: Christoph Reiter <reiter.christoph@gmail.com>
+Date: Fri, 23 Jul 2021 08:55:03 +0200
+Subject: [PATCH 111/N] winconsoleio: build _testconsole which is required
+ for the tests
+
+This fixes test_winconsoleio
+
+Should be merged into "build winconsoleio"
+---
+ setup.py | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/setup.py b/setup.py
+index 4e7a284..63f486c 100644
+--- a/setup.py
++++ b/setup.py
+@@ -999,6 +999,9 @@ class PyBuildExt(build_ext):
+ ['_xxtestfuzz/_xxtestfuzz.c',
+ '_xxtestfuzz/fuzzer.c']))
+
++ if MS_WINDOWS:
++ self.add(Extension('_testconsole', ['../PC/_testconsole.c']))
++
+ def detect_readline_curses(self):
+ # readline
+ if not MS_WINDOWS:
+--
+2.32.0
+
diff --git a/0112-Adjust-Py_WINVER-for-our-Win-7-target.patch b/0112-Adjust-Py_WINVER-for-our-Win-7-target.patch
new file mode 100644
index 000000000000..945c86d7c51a
--- /dev/null
+++ b/0112-Adjust-Py_WINVER-for-our-Win-7-target.patch
@@ -0,0 +1,30 @@
+From 44f87e70a74f9acde6536373a37e0623020a07a5 Mon Sep 17 00:00:00 2001
+From: Christoph Reiter <reiter.christoph@gmail.com>
+Date: Fri, 23 Jul 2021 08:55:42 +0200
+Subject: [PATCH 112/N] Adjust Py_WINVER for our Win 7 target
+
+We support win7 still, so adjust accordingly.
+
+Should be merged into the win7 patch
+---
+ PC/pyconfig.h | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/PC/pyconfig.h b/PC/pyconfig.h
+index d7d3cf0..6e9c090 100644
+--- a/PC/pyconfig.h
++++ b/PC/pyconfig.h
+@@ -136,8 +136,8 @@ WIN32 is still required for the locale module.
+
+ /* set the version macros for the windows headers */
+ /* Python 3.9+ requires Windows 8 or greater */
+-#define Py_WINVER 0x0602 /* _WIN32_WINNT_WIN8 */
+-#define Py_NTDDI NTDDI_WIN8
++#define Py_WINVER 0x0601 /* _WIN32_WINNT_WIN7 */
++#define Py_NTDDI NTDDI_WIN7
+
+ /* We only set these values when building Python - we don't want to force
+ these values on extensions, as that will affect the prototypes and
+--
+2.32.0
+
diff --git a/0113-ctypes-find_library-c-should-return-None-with-ucrt.patch b/0113-ctypes-find_library-c-should-return-None-with-ucrt.patch
new file mode 100644
index 000000000000..9a253d9baadf
--- /dev/null
+++ b/0113-ctypes-find_library-c-should-return-None-with-ucrt.patch
@@ -0,0 +1,41 @@
+From a3aa28ae29edfe8ffd0d428742f1e1bee4db971b Mon Sep 17 00:00:00 2001
+From: Christoph Reiter <reiter.christoph@gmail.com>
+Date: Fri, 23 Jul 2021 18:23:58 +0200
+Subject: [PATCH 113/N] ctypes: find_library('c') should return None with
+ ucrt
+
+Just like with MSVC. This fixes a test in test_ctypes.
+---
+ Lib/ctypes/util.py | 9 +++++++++
+ 1 file changed, 9 insertions(+)
+
+diff --git a/Lib/ctypes/util.py b/Lib/ctypes/util.py
+index 0c2510e..48ddb3b 100644
+--- a/Lib/ctypes/util.py
++++ b/Lib/ctypes/util.py
+@@ -31,6 +31,12 @@ if os.name == "nt":
+ # else we don't know what version of the compiler this is
+ return None
+
++ def find_msvcrt_mingw():
++ is_ucrt = 'clang' in sys.version.lower() or 'ucrt' in sys.version.lower()
++ if is_ucrt:
++ return None
++ return 'msvcrt.dll'
++
+ def find_msvcrt():
+ """Return the name of the VC runtime dll"""
+ version = _get_build_version()
+@@ -54,6 +60,9 @@ if os.name == "nt":
+
+ def find_library(name):
+ if name in ('c', 'm'):
++ import sysconfig
++ if sysconfig.get_platform().startswith('mingw'):
++ return find_msvcrt_mingw()
+ return find_msvcrt()
+ # See MSDN for the REAL search order.
+ for directory in os.environ['PATH'].split(os.pathsep):
+--
+2.32.0
+
diff --git a/0114-build-Disable-checks-for-dlopen-dlfcn.patch b/0114-build-Disable-checks-for-dlopen-dlfcn.patch
new file mode 100644
index 000000000000..232c85aec8a3
--- /dev/null
+++ b/0114-build-Disable-checks-for-dlopen-dlfcn.patch
@@ -0,0 +1,66 @@
+From 22537ffc1a86b3f483bd6ff0af9bd89880160f0c Mon Sep 17 00:00:00 2001
+From: Christoph Reiter <reiter.christoph@gmail.com>
+Date: Sun, 25 Jul 2021 13:54:12 +0200
+Subject: [PATCH 114/N] build: Disable checks for dlopen/dlfcn
+
+While it is (potentially) available with mingw we don't want to use it, so skip any
+checks for it.
+---
+ configure.ac | 20 +++++++++++++++++---
+ 1 file changed, 17 insertions(+), 3 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index bab62ad..d1b8acb 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -2423,7 +2423,7 @@ dnl AC_MSG_RESULT($cpp_type)
+
+ # checks for header files
+ AC_HEADER_STDC
+-AC_CHECK_HEADERS(asm/types.h crypt.h conio.h direct.h dlfcn.h errno.h \
++AC_CHECK_HEADERS(asm/types.h crypt.h conio.h direct.h errno.h \
+ fcntl.h grp.h \
+ ieeefp.h io.h langinfo.h libintl.h process.h \
+ shadow.h signal.h stropts.h termios.h \
+@@ -2437,6 +2437,12 @@ sys/times.h sys/types.h sys/uio.h sys/un.h sys/utsname.h sys/wait.h pty.h \
+ libutil.h sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
+ linux/tipc.h linux/random.h spawn.h util.h alloca.h endian.h \
+ sys/endian.h sys/sysmacros.h linux/memfd.h linux/wait.h sys/memfd.h sys/mman.h)
++
++case $host in
++ *-*-mingw*) ;;
++ *) AC_CHECK_HEADERS([dlfcn.h]);;
++esac
++
+ AC_HEADER_DIRENT
+ AC_HEADER_MAJOR
+
+@@ -3108,7 +3114,12 @@ AC_MSG_RESULT($SHLIBS)
+
+ # checks for libraries
+ AC_CHECK_LIB(sendfile, sendfile)
+-AC_CHECK_LIB(dl, dlopen) # Dynamic linking for SunOS/Solaris and SYSV
++
++case $host in
++ *-*-mingw*) ;;
++ *) AC_CHECK_LIB(dl, dlopen) ;; # Dynamic linking for SunOS/Solaris and SYSV
++esac
++
+ AC_CHECK_LIB(dld, shl_load) # Dynamic linking for HP-UX
+
+ # checks for uuid.h location
+@@ -5014,7 +5025,10 @@ then
+ [define to 1 if your sem_getvalue is broken.])
+ fi
+
+-AC_CHECK_DECLS([RTLD_LAZY, RTLD_NOW, RTLD_GLOBAL, RTLD_LOCAL, RTLD_NODELETE, RTLD_NOLOAD, RTLD_DEEPBIND, RTLD_MEMBER], [], [], [[#include <dlfcn.h>]])
++case $host in
++ *-*-mingw*) ;;
++ *) AC_CHECK_DECLS([RTLD_LAZY, RTLD_NOW, RTLD_GLOBAL, RTLD_LOCAL, RTLD_NODELETE, RTLD_NOLOAD, RTLD_DEEPBIND, RTLD_MEMBER], [], [], [[#include <dlfcn.h>]]);;
++esac
+
+ # determine what size digit to use for Python's longs
+ AC_MSG_CHECKING([digit size for Python's longs])
+--
+2.32.0
+
diff --git a/0115-Fix-install-location-of-the-import-library.patch b/0115-Fix-install-location-of-the-import-library.patch
new file mode 100644
index 000000000000..7bee5322b8d6
--- /dev/null
+++ b/0115-Fix-install-location-of-the-import-library.patch
@@ -0,0 +1,25 @@
+From 88d43ecb5443eaa93965e7f799deed119486fd0a Mon Sep 17 00:00:00 2001
+From: Christoph Reiter <reiter.christoph@gmail.com>
+Date: Sun, 25 Jul 2021 15:46:01 +0200
+Subject: [PATCH 115/N] Fix install location of the import library
+
+---
+ Makefile.pre.in | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/Makefile.pre.in b/Makefile.pre.in
+index fe25d9e..2dfc47f 100644
+--- a/Makefile.pre.in
++++ b/Makefile.pre.in
+@@ -1690,7 +1690,7 @@ libainstall: @DEF_MAKE_RULE@ python-config
+ @if test -d $(LIBRARY); then :; else \
+ if test "$(PYTHONFRAMEWORKDIR)" = no-framework; then \
+ if test "$(SHLIB_SUFFIX)" = .dll -o "$(SHLIB_SUFFIX)" = .pyd; then \
+- $(INSTALL_DATA) $(LDLIBRARY) $(DESTDIR)$(LIBPL) ; \
++ $(INSTALL_DATA) $(LDLIBRARY) $(DESTDIR)$(LIBDIR) ; \
+ else \
+ $(INSTALL_DATA) $(LIBRARY) $(DESTDIR)$(LIBPL)/$(LIBRARY) ; \
+ fi; \
+--
+2.32.0
+
diff --git a/0116-Set-MSYS2_ARG_CONV_EXCL-for-the-shared-Python-module.patch b/0116-Set-MSYS2_ARG_CONV_EXCL-for-the-shared-Python-module.patch
new file mode 100644
index 000000000000..1078e6b617a4
--- /dev/null
+++ b/0116-Set-MSYS2_ARG_CONV_EXCL-for-the-shared-Python-module.patch
@@ -0,0 +1,26 @@
+From aa693f38199fb21c4b1e7520c4de3a515243aa34 Mon Sep 17 00:00:00 2001
+From: Christoph Reiter <reiter.christoph@gmail.com>
+Date: Sun, 25 Jul 2021 15:46:54 +0200
+Subject: [PATCH 116/N] Set MSYS2_ARG_CONV_EXCL for the shared Python module
+ install
+
+Otherwise one has to set it when calling "make install".
+---
+ Makefile.pre.in | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/Makefile.pre.in b/Makefile.pre.in
+index 2dfc47f..a17dcdf 100644
+--- a/Makefile.pre.in
++++ b/Makefile.pre.in
+@@ -1736,6 +1736,7 @@ endif
+ # Install the dynamically loadable modules
+ # This goes into $(exec_prefix)
+ sharedinstall: sharedmods
++ MSYS2_ARG_CONV_EXCL="--prefix=;--install-scripts=;--install-platlib=" \
+ $(RUNSHARED) $(PYTHON_FOR_BUILD) $(srcdir)/setup.py install \
+ --prefix=$(prefix) \
+ --install-scripts=$(BINDIR) \
+--
+2.32.0
+
diff --git a/0117-build-Integrate-venvlauncher-build-installation-into.patch b/0117-build-Integrate-venvlauncher-build-installation-into.patch
new file mode 100644
index 000000000000..576b5db5e4fc
--- /dev/null
+++ b/0117-build-Integrate-venvlauncher-build-installation-into.patch
@@ -0,0 +1,79 @@
+From 4dc2cda4b0eaffbb79f67174db060452dc43e3ea Mon Sep 17 00:00:00 2001
+From: Christoph Reiter <reiter.christoph@gmail.com>
+Date: Sun, 25 Jul 2021 16:53:35 +0200
+Subject: [PATCH 117/N] build: Integrate venvlauncher build/installation into
+ the Makefile
+
+This is required for venv creation on Windows.
+Ideally this would use the venv specific launcher (PC/launcher.c),
+but a copy of main binary seems to work as well for now.
+---
+ Makefile.pre.in | 17 +++++++++++++++--
+ 1 file changed, 15 insertions(+), 2 deletions(-)
+
+diff --git a/Makefile.pre.in b/Makefile.pre.in
+index a17dcdf..ab90e65 100644
+--- a/Makefile.pre.in
++++ b/Makefile.pre.in
+@@ -161,6 +161,7 @@ BINLIBDEST= @BINLIBDEST@
+ LIBDEST= $(SCRIPTDIR)/python$(VERSION)
+ INCLUDEPY= $(INCLUDEDIR)/python$(LDVERSION)
+ CONFINCLUDEPY= $(CONFINCLUDEDIR)/python$(LDVERSION)
++VENVLAUNCHERDIR= $(BINLIBDEST)/venv/scripts/nt
+
+ # Symbols used for using shared libraries
+ SHLIB_SUFFIX= @SHLIB_SUFFIX@
+@@ -264,6 +265,8 @@ LIBOBJS= @LIBOBJS@
+ PYTHON= python$(EXE)
+ BUILDPYTHON= python$(BUILDEXE)
+ BUILDPYTHONW= pythonw$(BUILDEXE)
++BUILDVENVLAUNCHER= venvlauncher$(BUILDEXE)
++BUILDVENVWLAUNCHER= venvwlauncher$(BUILDEXE)
+
+ PYTHON_FOR_REGEN?=@PYTHON_FOR_REGEN@
+ UPDATE_FILE=@PYTHON_FOR_REGEN@ $(srcdir)/Tools/scripts/update_file.py
+@@ -487,7 +490,7 @@ DTRACE_DEPS = \
+
+ # Default target
+ all: @DEF_MAKE_ALL_RULE@
+-build_all: check-clean-src $(BUILDPYTHON) $(BUILDPYTHONW) oldsharedmods sharedmods gdbhooks \
++build_all: check-clean-src $(BUILDPYTHON) $(BUILDPYTHONW) $(BUILDVENVLAUNCHER) $(BUILDVENVWLAUNCHER) oldsharedmods sharedmods gdbhooks \
+ Programs/_testembed python-config
+
+ # Check that the source is clean when building out of source.
+@@ -617,6 +620,14 @@ $(BUILDPYTHONW): Programs/python.o $(LIBRARY) $(LDLIBRARY) $(PY3LIBRARY) pythonw
+ $(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
+
++# FIXME: build these from PC/launcher.c instead
++$(BUILDVENVLAUNCHER): $(BUILDPYTHON)
++ cp $(BUILDPYTHON) $(BUILDVENVLAUNCHER)
++
++# FIXME: build these from PC/launcher.c instead
++$(BUILDVENVWLAUNCHER): $(BUILDPYTHONW)
++ cp $(BUILDPYTHONW) $(BUILDVENVWLAUNCHER)
++
+ 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
+
+@@ -1331,7 +1342,7 @@ $(DESTSHARED):
+ # Install the interpreter with $(VERSION) affixed
+ # This goes into $(exec_prefix)
+ altbininstall: $(BUILDPYTHON) @FRAMEWORKPYTHONW@
+- @for i in $(BINDIR) $(LIBDIR); \
++ @for i in $(BINDIR) $(LIBDIR) $(VENVLAUNCHERDIR); \
+ do \
+ if test ! -d $(DESTDIR)$$i; then \
+ echo "Creating directory $$i"; \
+@@ -1342,6 +1353,8 @@ altbininstall: $(BUILDPYTHON) @FRAMEWORKPYTHONW@
+ if test "$(PYTHONFRAMEWORKDIR)" = "no-framework" ; then \
+ $(INSTALL_PROGRAM) $(BUILDPYTHON) $(DESTDIR)$(BINDIR)/python$(LDVERSION)$(EXE); \
+ $(INSTALL_PROGRAM) $(BUILDPYTHONW) $(DESTDIR)$(BINDIR)/python3w$(EXE); \
++ $(INSTALL_PROGRAM) $(BUILDPYTHON) $(DESTDIR)$(VENVLAUNCHERDIR)/python$(EXE); \
++ $(INSTALL_PROGRAM) $(BUILDPYTHONW) $(DESTDIR)$(VENVLAUNCHERDIR)/pythonw$(EXE); \
+ else \
+ $(INSTALL_PROGRAM) $(STRIPFLAG) Mac/pythonw $(DESTDIR)$(BINDIR)/python$(LDVERSION)$(EXE); \
+ fi
+--
+2.32.0
+
diff --git a/0118-Update-smoketests.patch b/0118-Update-smoketests.patch
new file mode 100644
index 000000000000..c27b70706158
--- /dev/null
+++ b/0118-Update-smoketests.patch
@@ -0,0 +1,70 @@
+From 6cc4ce00eeed7ab066c848637b4d06381d161a11 Mon Sep 17 00:00:00 2001
+From: Christoph Reiter <reiter.christoph@gmail.com>
+Date: Fri, 23 Jul 2021 08:56:15 +0200
+Subject: [PATCH 118/N] Update smoketests
+
+---
+ .../smoketests.py => mingw_smoketests.py | 27 +++++++++++++++++++
+ 1 file changed, 27 insertions(+)
+ rename .github/workflows/smoketests.py => mingw_smoketests.py (90%)
+
+diff --git a/.github/workflows/smoketests.py b/mingw_smoketests.py
+similarity index 90%
+rename from .github/workflows/smoketests.py
+rename to mingw_smoketests.py
+index d8f76e6..3f41855 100644
+--- a/.github/workflows/smoketests.py
++++ b/mingw_smoketests.py
+@@ -27,15 +27,41 @@ Feel free to extend.
+
+ import os
+ import unittest
++import sysconfig
+
+ if "MSYSTEM" in os.environ:
+ SEP = "/"
+ else:
+ SEP = "\\"
+
++_UCRT = "clang" in sysconfig.get_platform() or "ucrt" in sysconfig.get_platform()
++
+
+ class Tests(unittest.TestCase):
+
++ def test_ctypes_find_library(self):
++ from ctypes.util import find_library
++ from ctypes import cdll
++ self.assertTrue(cdll.msvcrt)
++ if _UCRT:
++ self.assertIsNone(find_library('c'))
++ else:
++ self.assertEqual(find_library('c'), 'msvcrt.dll')
++
++ def test_ctypes_dlopen(self):
++ import ctypes
++ import sys
++ self.assertEqual(ctypes.RTLD_GLOBAL, 0)
++ self.assertEqual(ctypes.RTLD_GLOBAL, ctypes.RTLD_LOCAL)
++ self.assertFalse(hasattr(sys, 'setdlopenflags'))
++ self.assertFalse(hasattr(sys, 'getdlopenflags'))
++ self.assertFalse([n for n in dir(os) if n.startswith("RTLD_")])
++
++ def test_strftime(self):
++ import time
++ with self.assertRaises(ValueError):
++ time.strftime('%Y', (12345,) + (0,) * 8)
++
+ def test_sep(self):
+ self.assertEqual(os.sep, SEP)
+
+@@ -66,6 +92,7 @@ class Tests(unittest.TestCase):
+ import sqlite3
+ import ssl
+ import ctypes
++ import curses
+
+ def test_socket_inet_ntop(self):
+ import socket
+--
+2.32.0
+
diff --git a/0119-CI-clean-up-the-build-enforce-some-tests.patch b/0119-CI-clean-up-the-build-enforce-some-tests.patch
new file mode 100644
index 000000000000..eb4a531d2674
--- /dev/null
+++ b/0119-CI-clean-up-the-build-enforce-some-tests.patch
@@ -0,0 +1,247 @@
+From 02aeab593ce0e2e5fe99717d286a8e1776de5b9d Mon Sep 17 00:00:00 2001
+From: Christoph Reiter <reiter.christoph@gmail.com>
+Date: Fri, 23 Jul 2021 09:03:21 +0200
+Subject: [PATCH 119/N] CI: clean up the build; enforce some tests
+
+This now enforces success of a subset of tests (see mingw_ignorefile.txt)
+and runs smoketests on the build as well as after installation.
+
+Remove everything that is no longer needed after the previous patches:
+
+* the build uses -O3 by default
+* it sets fwrapv by default
+* __USE_MINGW_ANSI_STDIO is not needed anymore with c99
+* it sets_WIN32_WINNT anyway
+* ncurses is fixed by patching the build
+* debug is handled by autotools
+* all ac_cv_* overrides are now handled in configure.ac
+* venvlauncher is handled by the main makefile
+* setting MSYS2_ARG_CONV_EXCL is now handled by the makefile
+* the import library is now installed by the makefile
+* _sysconfig_data overrides are handled at runtime anyway
+* we don't care about permissions.. (I think?)
+---
+ .github/workflows/mingw.yml | 118 +++++++++++-------------------------
+ mingw_ignorefile.txt | 34 +++++++++++
+ 2 files changed, 68 insertions(+), 84 deletions(-)
+ create mode 100644 mingw_ignorefile.txt
+
+diff --git a/.github/workflows/mingw.yml b/.github/workflows/mingw.yml
+index b2f0d6a..16a96b5 100644
+--- a/.github/workflows/mingw.yml
++++ b/.github/workflows/mingw.yml
+@@ -51,45 +51,16 @@ jobs:
+ run: |
+ set -ex
+
+- CFLAGS="-O2"
+-
+- PREFIX_WIN=$(cygpath -wm ${MINGW_PREFIX})
+ if [ ${{ matrix.msystem }} == "CLANG64" ]
+ then
+ export CC=clang
+ export CXX=clang++
+ fi
+ autoreconf -vfi
+- 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 "
+- CFLAGS+=" -DNDEBUG "
+- CXXFLAGS+=" -DNDEBUG "
+- _extra_config+=("--enable-optimizations")
+-
+- # 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
+-
+- export CFLAGS
+- export CXXFLAGS
+- export CPPFLAGS
+-
++
+ rm -Rf _build && mkdir _build && cd _build
+-
+- MSYSTEM=MINGW ../configure \
++
++ ../configure \
+ --prefix=${MINGW_PREFIX} \
+ --host=${MINGW_CHOST} \
+ --build=${MINGW_CHOST} \
+@@ -101,90 +72,69 @@ jobs:
+ --without-ensurepip \
+ --without-c-locale-coercion \
+ --enable-loadable-sqlite-extensions \
+- "${_extra_config[@]}" \
+- OPT=""
++ --enable-optimizations
++
+ # We patch importlib which is embedded in C headers, so regenerate them
+ make regen-importlib
+
+ make -j8
+-
+- # Add missing venvlauncher files (issue #7014)
+- # FIXME: build these from PC/launcher.c instead
+- cp python.exe venvlauncher.exe
+- cp pythonw.exe venvwlauncher.exe
+
+- - name: Install
++ - name: Run Smoke Test (build)
+ shell: msys2 {0}
+ run: |
+- set -ex
++ SMOKETESTS="$(pwd)/mingw_smoketests.py"
++ cd _build
++ ./python.exe "$SMOKETESTS"
++ MSYSTEM= ./python.exe "$SMOKETESTS"
++
++ - name: Run tests
++ shell: msys2 {0}
++ run: |
++ IGNOREFILE="$(pwd)/mingw_ignorefile.txt"
++ cd _build
++ MSYSTEM= ./python.exe -m test -j8 --ignorefile "$IGNOREFILE" -W
+
++ - name: Run broken tests
++ continue-on-error: true
++ shell: msys2 {0}
++ run: |
++ IGNOREFILE="$(pwd)/mingw_ignorefile.txt"
+ cd _build
+- _pybasever=$(./python.exe -c "import sys; print(sys.winver);")
++ MSYSTEM= ./python.exe -m test -j8 --matchfile "$IGNOREFILE" -W
+
+- # now install things
++ - name: Install
++ shell: msys2 {0}
++ run: |
++ set -ex
++ cd _build
+
+ pkgdir=python_pkgdir
+
+- PREFIX_WIN=$(cygpath -wm ${MINGW_PREFIX})
+- MSYSTEM=MINGW \
+- MSYS2_ARG_CONV_EXCL="--prefix=;--install-scripts=;--install-platlib=" \
+ make -j1 install DESTDIR="${pkgdir}"
+
+- # 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
+-
+- cp -f "${pkgdir}${MINGW_PREFIX}"/lib/python${_pybasever}/config-${_pybasever}/libpython${_pybasever}.dll.a "${pkgdir}${MINGW_PREFIX}"/lib/libpython${_pybasever}.dll.a
+-
+- # Need for building boost python module
+- cp -f "${pkgdir}${MINGW_PREFIX}"/lib/python${_pybasever}/config-${_pybasever}/libpython${_pybasever}.dll.a "${pkgdir}${MINGW_PREFIX}"/lib/libpython${_pybasever}.dll.a
+-
++ # Fix shebangs
++ _pybasever=$(./python.exe -c "import sys; print(sys.winver);")
+ 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
++ sed -i "s|#!${pkgdir}${MINGW_PREFIX}/bin/python${_pybasever}.exe|#!/usr/bin/env python${_pybasever}.exe|" "${pkgdir}${MINGW_PREFIX}"/lib/python${_pybasever}/config-${_pybasever}/python-config.py
+
+-
++ # Create version-less aliases
+ 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
+
+- sed -i "s|#!${pkgdir}${MINGW_PREFIX}/bin/python${_pybasever}.exe|#!/usr/bin/env python${_pybasever}.exe|" "${pkgdir}${MINGW_PREFIX}"/lib/python${_pybasever}/config-${_pybasever}/python-config.py
+-
+- # fix permissons
+- find ${pkgdir}${MINGW_PREFIX} -type f \( -name "*.dll" -o -name "*.exe" \) | xargs chmod 0755
+-
+- # 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
+-
+- - name: Run Smoke Test
++ - name: Run Smoke Test (installed)
+ shell: msys2 {0}
+ run: |
+- SMOKETESTS="$(pwd)/.github/workflows/smoketests.py"
++ SMOKETESTS="$(pwd)/mingw_smoketests.py"
+ cd _build
+ cd python_pkgdir/${MINGW_PREFIX}/bin
+ ./python.exe "$SMOKETESTS"
+ MSYSTEM= ./python.exe "$SMOKETESTS"
+
+- - name: Run tests
+- continue-on-error: true
+- shell: msys2 {0}
+- run: |
+- cd _build
+- cd python_pkgdir/${MINGW_PREFIX}/bin
+- ./python.exe -m test -j4
+-
+ - name: Compress
+ if: always()
+ shell: msys2 {0}
+diff --git a/mingw_ignorefile.txt b/mingw_ignorefile.txt
+new file mode 100644
+index 0000000..dc3802e
+--- /dev/null
++++ b/mingw_ignorefile.txt
+@@ -0,0 +1,34 @@
++ctypes.test.test_loading.LoaderTest.test_load_dll_with_flags
++distutils.tests.test_bdist_dumb.BuildDumbTestCase.test_simple_built
++distutils.tests.test_cygwinccompiler.CygwinCCompilerTestCase.test_get_versions
++distutils.tests.test_util.UtilTestCase.test_change_root
++test.datetimetester.TestLocalTimeDisambiguation_Fast.*
++test.datetimetester.TestLocalTimeDisambiguation_Pure.*
++test.test_cmath.CMathTests.test_specific_values
++test.test_cmd_line_script.CmdLineTest.test_consistent_sys_path_for_direct_execution
++test.test_compileall.CommandLineTestsNoSourceEpoch.*
++test.test_compileall.CommandLineTestsWithSourceEpoch.*
++test.test_compileall.CompileallTestsWithoutSourceEpoch.*
++test.test_compileall.CompileallTestsWithSourceEpoch.*
++test.test_import.ImportTests.test_dll_dependency_import
++test.test_math.MathTests.*
++test.test_ntpath.NtCommonTest.test_import
++test.test_os.StatAttributeTests.test_stat_block_device
++test.test_os.TestScandir.test_attributes
++test.test_os.UtimeTests.test_large_time
++test.test_platform.PlatformTest.test_architecture_via_symlink
++test.test_regrtest.ProgramsTestCase.test_pcbuild_rt
++test.test_regrtest.ProgramsTestCase.test_tools_buildbot_test
++test.test_site._pthFileTests.*
++test.test_site.HelperFunctionsTests.*
++test.test_site.StartupImportTests.*
++test.test_ssl.*
++test.test_strptime.CalculationTests.*
++test.test_strptime.StrptimeTests.test_weekday
++test.test_strptime.TimeRETests.test_compile
++test.test_tools.test_i18n.Test_pygettext.test_POT_Creation_Date
++test.test_venv.BasicTest.*
++test.test_venv.EnsurePipTest.*
++# flaky
++test.test__xxsubinterpreters.*
++test.test_asyncio.test_subprocess.SubprocessProactorTests.test_stdin_broken_pipe
+\ No newline at end of file
+--
+2.32.0
+
diff --git a/0120-1-2-AC_RUN_IFELSE-replace.patch b/0120-1-2-AC_RUN_IFELSE-replace.patch
new file mode 100644
index 000000000000..9f5d846e3bf0
--- /dev/null
+++ b/0120-1-2-AC_RUN_IFELSE-replace.patch
@@ -0,0 +1,33 @@
+From 92b9a55e916277392c5e308a4193179637e04eae Mon Sep 17 00:00:00 2001
+From: Long Nguyen <nguyen.long.908132@gmail.com>
+Date: Thu, 29 Jul 2021 22:19:32 +0700
+Subject: [PATCH 120/N] [1/2] AC_RUN_IFELSE replace
+
+---
+ configure.ac | 9 +++++----
+ 1 file changed, 5 insertions(+), 4 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index d1b8acb..ae9b1d8 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -5146,11 +5146,12 @@ case $host in
+ *-*-mingw*)
+ # check if we are linking to ucrt
+ AC_MSG_CHECKING(whether linking to ucrt)
+- AC_RUN_IFELSE([AC_LANG_SOURCE([[
++ AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
+ #include <stdio.h>
+- int main(){
+- _UCRT;
+- }
++ #ifndef _UCRT
++ #error no ucrt
++ #endif
++ int main(){}
+ ]])],[linking_to_ucrt=yes],[linking_to_ucrt=no])
+ AC_MSG_RESULT($linking_to_ucrt)
+ ;;
+--
+2.32.0
+
diff --git a/0121-Add-return-0-to-the-test-code.patch b/0121-Add-return-0-to-the-test-code.patch
new file mode 100644
index 000000000000..662a846d461c
--- /dev/null
+++ b/0121-Add-return-0-to-the-test-code.patch
@@ -0,0 +1,25 @@
+From b63a2139c30c268fdc763abae966f527b9a7d798 Mon Sep 17 00:00:00 2001
+From: Long Nguyen <nguyen.long.908132@gmail.com>
+Date: Fri, 30 Jul 2021 10:31:55 +0700
+Subject: [PATCH 121/N] Add return 0 to the test code
+
+---
+ configure.ac | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index ae9b1d8..14eb4b6 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -5151,7 +5151,7 @@ case $host in
+ #ifndef _UCRT
+ #error no ucrt
+ #endif
+- int main(){}
++ int main(){ return 0; }
+ ]])],[linking_to_ucrt=yes],[linking_to_ucrt=no])
+ AC_MSG_RESULT($linking_to_ucrt)
+ ;;
+--
+2.32.0
+
diff --git a/0122-2-2-AC_RUN_IFELSE-replace.patch b/0122-2-2-AC_RUN_IFELSE-replace.patch
new file mode 100644
index 000000000000..e806c69d8085
--- /dev/null
+++ b/0122-2-2-AC_RUN_IFELSE-replace.patch
@@ -0,0 +1,53 @@
+From 91ea75c8a7e2c91fd1ba454f3522ac8f27989805 Mon Sep 17 00:00:00 2001
+From: Long Nguyen <nguyen.long.908132@gmail.com>
+Date: Fri, 30 Jul 2021 16:34:41 +0700
+Subject: [PATCH 122/N] [2/2] AC_RUN_IFELSE replace
+
+Replace strtonum() with --non-decimal-data
+---
+ configure.ac | 28 +++++++++++++---------------
+ 1 file changed, 13 insertions(+), 15 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 14eb4b6..215dc75 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -5959,22 +5959,20 @@ AC_MSG_RESULT(done)
+ case $host in
+ *-*-mingw*)
+ LIBS="$LIBS -lversion -lshlwapi"
+-
++ AC_PROG_AWK
++ if test "$AWK" = "gawk"; then
++ awk_extra_flag="--non-decimal-data"
++ fi
+ AC_MSG_CHECKING([FIELD3])
+- SAVE_CFLAGS=$CFLAGS
+- CFLAGS="-I $srcdir/Include"
+- AC_RUN_IFELSE([AC_LANG_SOURCE([[
+- #include <stdio.h>
+- #include "patchlevel.h"
+- int main() {
+- fprintf (
+- fopen ("conftest.out","w"),
+- "%d",
+- PY_MICRO_VERSION * 1000 + PY_RELEASE_LEVEL * 10 + PY_RELEASE_SERIAL);
+- return 0;
+- }
+- ]])], [FIELD3=`cat conftest.out`])
+- CFLAGS=$SAVE_CFLAGS
++ FIELD3=$($AWK $awk_extra_flag '\
++ /^#define PY_RELEASE_LEVEL_/ {levels[$2]=$3} \
++ /^#define PY_MICRO_VERSION[[:space:]]+/ {micro=$3} \
++ /^#define PY_RELEASE_LEVEL[[:space:]]+/ {level=levels[$3]} \
++ /^#define PY_RELEASE_SERIAL[[:space:]]+/ {serial=$3} \
++ END {print micro * 1000 + level * 10 + serial}' \
++ $srcdir/Include/patchlevel.h
++ )
++
+ AC_MSG_RESULT([${FIELD3}])
+ RCFLAGS="$RCFLAGS -DFIELD3=$FIELD3 -O COFF"
+
+--
+2.32.0
+
diff --git a/0123-Make-sure-MACHDEP-matches-sys.platform.patch b/0123-Make-sure-MACHDEP-matches-sys.platform.patch
new file mode 100644
index 000000000000..b3bd2f27b7af
--- /dev/null
+++ b/0123-Make-sure-MACHDEP-matches-sys.platform.patch
@@ -0,0 +1,83 @@
+From aacd49b757cccfef161f2107248b8a80ab62f3d5 Mon Sep 17 00:00:00 2001
+From: Christoph Reiter <reiter.christoph@gmail.com>
+Date: Sat, 31 Jul 2021 15:55:00 +0200
+Subject: [PATCH 123/N] Make sure MACHDEP matches sys.platform
+
+MACHDEP=win32
+
+This simplifies things a bit and also makes sure that
+_PYTHON_SYSCONFIGDATA_NAME is set correctly when cross compiling
+---
+ Python/getplatform.c | 6 ------
+ configure.ac | 17 +++++------------
+ 2 files changed, 5 insertions(+), 18 deletions(-)
+
+diff --git a/Python/getplatform.c b/Python/getplatform.c
+index 636b0a8..81a0f7a 100644
+--- a/Python/getplatform.c
++++ b/Python/getplatform.c
+@@ -1,12 +1,6 @@
+
+ #include "Python.h"
+
+-#ifdef __MINGW32__
+-# undef PLATFORM
+-/* see PC/pyconfig.h */
+-# define PLATFORM "win32"
+-#endif
+-
+ #ifndef PLATFORM
+ #define PLATFORM "unknown"
+ #endif
+diff --git a/configure.ac b/configure.ac
+index 215dc75..736e1b9 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -383,17 +383,6 @@ AC_DEFINE_UNQUOTED(_PYTHONFRAMEWORK, "${PYTHONFRAMEWORK}", [framework name])
+ # 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
+@@ -412,6 +401,9 @@ then
+ *-*-cygwin*)
+ ac_sys_system=Cygwin
+ ;;
++ *-*-mingw*)
++ ac_sys_system=MINGW
++ ;;
+ *-*-darwin*)
+ ac_sys_system=Darwin
+ ac_sys_release=$(echo $host | sed -n 's/.*-[^0-9]\+\([0-9]\+\)/\1/p')
+@@ -461,6 +453,7 @@ then
+ linux*) MACHDEP="linux";;
+ cygwin*) MACHDEP="cygwin";;
+ darwin*) MACHDEP="darwin";;
++ mingw*) MACHDEP="win32";;
+ '') MACHDEP="unknown";;
+ esac
+ fi
+@@ -5236,7 +5229,7 @@ AC_MSG_RESULT($LDVERSION)
+
+ # On Android and Cygwin the shared libraries must be linked with libpython.
+ AC_SUBST(LIBPYTHON)
+-if test -n "$ANDROID_API_LEVEL" -o "$MACHDEP" = "cygwin" -o "$MACHDEP" = "win"; then
++if test -n "$ANDROID_API_LEVEL" -o "$MACHDEP" = "cygwin" -o "$MACHDEP" = "win32"; then
+ LIBPYTHON="-lpython${VERSION}${ABIFLAGS}"
+ else
+ LIBPYTHON=''
+--
+2.32.0
+
diff --git a/0124-CI-add-a-cross-build-job.patch b/0124-CI-add-a-cross-build-job.patch
new file mode 100644
index 000000000000..38b4452d8fd6
--- /dev/null
+++ b/0124-CI-add-a-cross-build-job.patch
@@ -0,0 +1,77 @@
+From 3ea2b7adc6859e939b75c02260d9512de758eb5c Mon Sep 17 00:00:00 2001
+From: Christoph Reiter <reiter.christoph@gmail.com>
+Date: Sat, 31 Jul 2021 18:04:05 +0200
+Subject: [PATCH 124/N] CI: add a cross build job
+
+---
+ .github/workflows/mingw.yml | 57 +++++++++++++++++++++++++++++++++++++
+ 1 file changed, 57 insertions(+)
+
+diff --git a/.github/workflows/mingw.yml b/.github/workflows/mingw.yml
+index 16a96b5..af2f57c 100644
+--- a/.github/workflows/mingw.yml
++++ b/.github/workflows/mingw.yml
+@@ -149,3 +149,60 @@ jobs:
+ name: build-${{ matrix.msystem }}
+ path: _build/python.tar.zst
+
++ cross:
++ runs-on: ubuntu-latest
++ container:
++ image: archlinux:base-devel
++ steps:
++ - uses: actions/checkout@v2
++ - name: Install deps
++ run: |
++ pacman --noconfirm -Suuy
++ pacman --needed --noconfirm -S mingw-w64-gcc autoconf-archive autoconf automake python zip
++
++ - name: Build
++ run: |
++ autoreconf -vfi
++
++ mkdir _build && cd _build
++
++ CFLAGS="-O2 -D_WIN32_WINNT=0x0601" \
++ ../configure \
++ --host=x86_64-w64-mingw32 \
++ --build=x86_64-pc-linux-gnu \
++ --enable-shared \
++ --with-nt-threads \
++ --with-system-expat \
++ --with-system-ffi \
++ --with-system-libmpdec \
++ --without-ensurepip \
++ --without-c-locale-coercion \
++ --enable-loadable-sqlite-extensions
++
++ make -j8
++
++ make install DESTDIR="$(pwd)/install"
++ cp /usr/x86_64-w64-mingw32/bin/libwinpthread-1.dll install/usr/local/bin
++
++ - name: 'Zip files'
++ run: |
++ zip -r install.zip _build/install
++
++ - name: Upload
++ uses: actions/upload-artifact@v2
++ with:
++ name: build-cross
++ path: install.zip
++
++ cross-test:
++ needs: [cross]
++ runs-on: windows-latest
++ steps:
++ - uses: actions/download-artifact@v2
++ with:
++ name: build-cross
++
++ - name: 'Run tests'
++ run: |
++ 7z x install.zip
++ ./_build/install/usr/local/bin/python3.exe -c "import sysconfig, pprint; pprint.pprint(sysconfig.get_config_vars())"
+--
+2.32.0
+
diff --git a/0125-Revert-Adjust-Py_WINVER-for-our-Win-7-target.patch b/0125-Revert-Adjust-Py_WINVER-for-our-Win-7-target.patch
new file mode 100644
index 000000000000..69638967d9c7
--- /dev/null
+++ b/0125-Revert-Adjust-Py_WINVER-for-our-Win-7-target.patch
@@ -0,0 +1,28 @@
+From 9f09ab8856a9b220e700345ad3a8378f51a372e6 Mon Sep 17 00:00:00 2001
+From: Christoph Reiter <reiter.christoph@gmail.com>
+Date: Sun, 1 Aug 2021 15:18:28 +0200
+Subject: [PATCH 125/N] Revert "Adjust Py_WINVER for our Win 7 target"
+
+This reverts commit 44f87e70a74f9acde6536373a37e0623020a07a5.
+---
+ PC/pyconfig.h | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/PC/pyconfig.h b/PC/pyconfig.h
+index 6e9c090..d7d3cf0 100644
+--- a/PC/pyconfig.h
++++ b/PC/pyconfig.h
+@@ -136,8 +136,8 @@ WIN32 is still required for the locale module.
+
+ /* set the version macros for the windows headers */
+ /* Python 3.9+ requires Windows 8 or greater */
+-#define Py_WINVER 0x0601 /* _WIN32_WINNT_WIN7 */
+-#define Py_NTDDI NTDDI_WIN7
++#define Py_WINVER 0x0602 /* _WIN32_WINNT_WIN8 */
++#define Py_NTDDI NTDDI_WIN8
+
+ /* We only set these values when building Python - we don't want to force
+ these values on extensions, as that will affect the prototypes and
+--
+2.32.0
+
diff --git a/0126-Set-_WIN32_WINNT-version-in-configure.ac.patch b/0126-Set-_WIN32_WINNT-version-in-configure.ac.patch
new file mode 100644
index 000000000000..73829c70edf3
--- /dev/null
+++ b/0126-Set-_WIN32_WINNT-version-in-configure.ac.patch
@@ -0,0 +1,28 @@
+From 32c54c2c248fe463a4b0078cb945f1845178780a Mon Sep 17 00:00:00 2001
+From: Christoph Reiter <reiter.christoph@gmail.com>
+Date: Sun, 1 Aug 2021 15:18:50 +0200
+Subject: [PATCH 126/N] Set _WIN32_WINNT version in configure.ac
+
+---
+ configure.ac | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+diff --git a/configure.ac b/configure.ac
+index 736e1b9..82bea12 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -3470,6 +3470,11 @@ else
+ fi])
+ AC_MSG_RESULT($with_dbmliborder)
+
++case $host in
++ *-*-mingw*)
++ CFLAGS_NODIST="$CFLAGS_NODIST -D_WIN32_WINNT=0x0601";;
++esac
++
+ # Determine if windows modules should be used.
+ AC_SUBST(USE_WIN32_MODULE)
+ USE_WIN32_MODULE='#'
+--
+2.32.0
+
diff --git a/0127-CI-cleanup.patch b/0127-CI-cleanup.patch
new file mode 100644
index 000000000000..74a466db1a63
--- /dev/null
+++ b/0127-CI-cleanup.patch
@@ -0,0 +1,24 @@
+From ea45b9740011bbd6d09c6f66e43f71f21e354c00 Mon Sep 17 00:00:00 2001
+From: Christoph Reiter <reiter.christoph@gmail.com>
+Date: Sun, 1 Aug 2021 15:19:48 +0200
+Subject: [PATCH 127/N] CI: cleanup
+
+---
+ .github/workflows/mingw.yml | 1 -
+ 1 file changed, 1 deletion(-)
+
+diff --git a/.github/workflows/mingw.yml b/.github/workflows/mingw.yml
+index af2f57c..17aab89 100644
+--- a/.github/workflows/mingw.yml
++++ b/.github/workflows/mingw.yml
+@@ -166,7 +166,6 @@ jobs:
+
+ mkdir _build && cd _build
+
+- CFLAGS="-O2 -D_WIN32_WINNT=0x0601" \
+ ../configure \
+ --host=x86_64-w64-mingw32 \
+ --build=x86_64-pc-linux-gnu \
+--
+2.32.0
+
diff --git a/0128-Commit-regenerated-importlib.patch b/0128-Commit-regenerated-importlib.patch
new file mode 100644
index 000000000000..c42bc2a50f4c
--- /dev/null
+++ b/0128-Commit-regenerated-importlib.patch
@@ -0,0 +1,2394 @@
+From 73ef914a5fa580212ee63d4336484f788618972e Mon Sep 17 00:00:00 2001
+From: Christoph Reiter <reiter.christoph@gmail.com>
+Date: Sun, 1 Aug 2021 16:09:12 +0200
+Subject: [PATCH 128/N] Commit regenerated importlib
+
+It needs a native Python when building which isn't available when cross compiling
+
+Generated using "make regen-importlib" with line endings normalized.
+---
+ Python/importlib_external.h | 1321 ++++++++++++++++++-----------------
+ 1 file changed, 662 insertions(+), 659 deletions(-)
+
+diff --git a/Python/importlib_external.h b/Python/importlib_external.h
+index 6d40249..17f549b 100644
+--- a/Python/importlib_external.h
++++ b/Python/importlib_external.h
+@@ -109,7 +109,7 @@ const unsigned char _Py_M__importlib_bootstrap_external[] = {
+ 114,101,32,110,111,116,32,115,101,116,46,41,5,218,3,115,
+ 121,115,218,5,102,108,97,103,115,218,18,105,103,110,111,114,
+ 101,95,101,110,118,105,114,111,110,109,101,110,116,218,3,95,
+- 111,115,90,7,101,110,118,105,114,111,110,114,10,0,0,0,
++ 111,115,218,7,101,110,118,105,114,111,110,114,10,0,0,0,
+ 169,1,218,3,107,101,121,114,10,0,0,0,114,11,0,0,
+ 0,218,11,95,114,101,108,97,120,95,99,97,115,101,64,0,
+ 0,0,115,2,0,0,0,0,2,122,37,95,109,97,107,101,
+@@ -122,18 +122,18 @@ const unsigned char _Py_M__importlib_bootstrap_external[] = {
+ 99,104,101,99,107,101,100,32,99,97,115,101,45,105,110,115,
+ 101,110,115,105,116,105,118,101,108,121,46,70,114,10,0,0,
+ 0,114,10,0,0,0,114,10,0,0,0,114,10,0,0,0,
+- 114,11,0,0,0,114,27,0,0,0,68,0,0,0,115,2,
++ 114,11,0,0,0,114,28,0,0,0,68,0,0,0,115,2,
+ 0,0,0,0,2,41,5,114,21,0,0,0,218,8,112,108,
+ 97,116,102,111,114,109,218,10,115,116,97,114,116,115,119,105,
+ 116,104,218,27,95,67,65,83,69,95,73,78,83,69,78,83,
+ 73,84,73,86,69,95,80,76,65,84,70,79,82,77,83,218,
+ 35,95,67,65,83,69,95,73,78,83,69,78,83,73,84,73,
+ 86,69,95,80,76,65,84,70,79,82,77,83,95,83,84,82,
+- 95,75,69,89,41,1,114,27,0,0,0,114,10,0,0,0,
+- 114,25,0,0,0,114,11,0,0,0,218,16,95,109,97,107,
++ 95,75,69,89,41,1,114,28,0,0,0,114,10,0,0,0,
++ 114,26,0,0,0,114,11,0,0,0,218,16,95,109,97,107,
+ 101,95,114,101,108,97,120,95,99,97,115,101,57,0,0,0,
+ 115,14,0,0,0,0,1,12,1,12,1,6,2,4,2,14,
+- 4,8,3,114,32,0,0,0,99,1,0,0,0,0,0,0,
++ 4,8,3,114,33,0,0,0,99,1,0,0,0,0,0,0,
+ 0,0,0,0,0,1,0,0,0,4,0,0,0,67,0,0,
+ 0,115,20,0,0,0,116,0,124,0,131,1,100,1,64,0,
+ 160,1,100,2,100,3,161,2,83,0,41,4,122,42,67,111,
+@@ -144,7 +144,7 @@ const unsigned char _Py_M__importlib_bootstrap_external[] = {
+ 41,2,218,3,105,110,116,218,8,116,111,95,98,121,116,101,
+ 115,41,1,218,1,120,114,10,0,0,0,114,10,0,0,0,
+ 114,11,0,0,0,218,12,95,112,97,99,107,95,117,105,110,
+- 116,51,50,74,0,0,0,115,2,0,0,0,0,2,114,39,
++ 116,51,50,74,0,0,0,115,2,0,0,0,0,2,114,40,
+ 0,0,0,99,1,0,0,0,0,0,0,0,0,0,0,0,
+ 1,0,0,0,4,0,0,0,67,0,0,0,115,28,0,0,
+ 0,116,0,124,0,131,1,100,1,107,2,115,16,74,0,130,
+@@ -152,23 +152,23 @@ const unsigned char _Py_M__importlib_bootstrap_external[] = {
+ 47,67,111,110,118,101,114,116,32,52,32,98,121,116,101,115,
+ 32,105,110,32,108,105,116,116,108,101,45,101,110,100,105,97,
+ 110,32,116,111,32,97,110,32,105,110,116,101,103,101,114,46,
+- 114,34,0,0,0,114,35,0,0,0,169,3,114,6,0,0,
+- 0,114,36,0,0,0,218,10,102,114,111,109,95,98,121,116,
++ 114,35,0,0,0,114,36,0,0,0,169,3,114,6,0,0,
++ 0,114,37,0,0,0,218,10,102,114,111,109,95,98,121,116,
+ 101,115,169,1,218,4,100,97,116,97,114,10,0,0,0,114,
+ 10,0,0,0,114,11,0,0,0,218,14,95,117,110,112,97,
+ 99,107,95,117,105,110,116,51,50,79,0,0,0,115,4,0,
+- 0,0,0,2,16,1,114,44,0,0,0,99,1,0,0,0,
++ 0,0,0,2,16,1,114,45,0,0,0,99,1,0,0,0,
+ 0,0,0,0,0,0,0,0,1,0,0,0,4,0,0,0,
+ 67,0,0,0,115,28,0,0,0,116,0,124,0,131,1,100,
+ 1,107,2,115,16,74,0,130,1,116,1,160,2,124,0,100,
+ 2,161,2,83,0,41,3,122,47,67,111,110,118,101,114,116,
+ 32,50,32,98,121,116,101,115,32,105,110,32,108,105,116,116,
+ 108,101,45,101,110,100,105,97,110,32,116,111,32,97,110,32,
+- 105,110,116,101,103,101,114,46,233,2,0,0,0,114,35,0,
+- 0,0,114,40,0,0,0,114,42,0,0,0,114,10,0,0,
++ 105,110,116,101,103,101,114,46,233,2,0,0,0,114,36,0,
++ 0,0,114,41,0,0,0,114,43,0,0,0,114,10,0,0,
+ 0,114,10,0,0,0,114,11,0,0,0,218,14,95,117,110,
+ 112,97,99,107,95,117,105,110,116,49,54,84,0,0,0,115,
+- 4,0,0,0,0,2,16,1,114,46,0,0,0,99,0,0,
++ 4,0,0,0,0,2,16,1,114,47,0,0,0,99,0,0,
+ 0,0,0,0,0,0,0,0,0,0,5,0,0,0,4,0,
+ 0,0,71,0,0,0,115,228,0,0,0,124,0,115,8,100,
+ 1,83,0,116,0,124,0,131,1,100,2,107,2,114,28,124,
+@@ -200,10 +200,10 @@ const unsigned char _Py_M__importlib_bootstrap_external[] = {
+ 97,116,104,95,106,111,105,110,46,60,108,111,99,97,108,115,
+ 62,46,60,108,105,115,116,99,111,109,112,62,41,13,114,6,
+ 0,0,0,218,3,109,97,112,114,24,0,0,0,218,15,95,
+- 112,97,116,104,95,115,112,108,105,116,114,111,111,116,114,29,
++ 112,97,116,104,95,115,112,108,105,116,114,111,111,116,114,30,
+ 0,0,0,218,14,112,97,116,104,95,115,101,112,95,116,117,
+- 112,108,101,218,8,101,110,100,115,119,105,116,104,114,49,0,
+- 0,0,114,50,0,0,0,218,8,112,97,116,104,95,115,101,
++ 112,108,101,218,8,101,110,100,115,119,105,116,104,114,50,0,
++ 0,0,114,51,0,0,0,218,8,112,97,116,104,95,115,101,
+ 112,218,8,99,97,115,101,102,111,108,100,218,6,97,112,112,
+ 101,110,100,218,4,106,111,105,110,41,5,218,10,112,97,116,
+ 104,95,112,97,114,116,115,218,4,114,111,111,116,218,4,112,
+@@ -213,20 +213,20 @@ const unsigned char _Py_M__importlib_bootstrap_external[] = {
+ 0,0,115,42,0,0,0,0,2,4,1,4,1,12,1,8,
+ 1,4,1,4,1,20,1,20,1,14,1,12,1,10,1,16,
+ 3,4,1,8,2,12,2,8,1,12,1,14,1,20,2,8,
+- 1,114,67,0,0,0,99,0,0,0,0,0,0,0,0,0,
++ 1,114,68,0,0,0,99,0,0,0,0,0,0,0,0,0,
+ 0,0,0,1,0,0,0,4,0,0,0,71,0,0,0,115,
+ 20,0,0,0,116,0,160,1,100,1,100,2,132,0,124,0,
+- 68,0,131,1,161,1,83,0,41,3,114,47,0,0,0,99,
++ 68,0,131,1,161,1,83,0,41,3,114,48,0,0,0,99,
+ 1,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,
+ 5,0,0,0,83,0,0,0,115,26,0,0,0,103,0,124,
+ 0,93,18,125,1,124,1,114,4,124,1,160,0,116,1,161,
+- 1,145,2,113,4,83,0,114,10,0,0,0,114,48,0,0,
++ 1,145,2,113,4,83,0,114,10,0,0,0,114,49,0,0,
+ 0,41,2,114,8,0,0,0,218,4,112,97,114,116,114,10,
+- 0,0,0,114,10,0,0,0,114,11,0,0,0,114,53,0,
++ 0,0,0,114,10,0,0,0,114,11,0,0,0,114,54,0,
+ 0,0,123,0,0,0,115,4,0,0,0,6,1,6,255,114,
+- 54,0,0,0,41,2,114,59,0,0,0,114,62,0,0,0,
+- 41,1,114,63,0,0,0,114,10,0,0,0,114,10,0,0,
+- 0,114,11,0,0,0,114,67,0,0,0,121,0,0,0,115,
++ 55,0,0,0,41,2,114,60,0,0,0,114,63,0,0,0,
++ 41,1,114,64,0,0,0,114,10,0,0,0,114,10,0,0,
++ 0,114,11,0,0,0,114,68,0,0,0,121,0,0,0,115,
+ 6,0,0,0,0,2,10,1,2,255,99,1,0,0,0,0,
+ 0,0,0,0,0,0,0,2,0,0,0,4,0,0,0,3,
+ 0,0,0,115,66,0,0,0,116,0,135,0,102,1,100,1,
+@@ -240,16 +240,16 @@ const unsigned char _Py_M__importlib_bootstrap_external[] = {
+ 0,0,0,51,0,0,0,115,24,0,0,0,124,0,93,16,
+ 125,1,136,0,160,0,124,1,161,1,86,0,1,0,113,2,
+ 100,0,83,0,169,1,78,41,1,218,5,114,102,105,110,100,
+- 114,51,0,0,0,169,1,114,65,0,0,0,114,10,0,0,
++ 114,52,0,0,0,169,1,114,66,0,0,0,114,10,0,0,
+ 0,114,11,0,0,0,114,12,0,0,0,129,0,0,0,114,
+ 13,0,0,0,122,30,95,112,97,116,104,95,115,112,108,105,
+ 116,46,60,108,111,99,97,108,115,62,46,60,103,101,110,101,
+ 120,112,114,62,114,0,0,0,0,114,14,0,0,0,78,114,
+- 4,0,0,0,41,2,218,3,109,97,120,114,50,0,0,0,
+- 41,2,114,65,0,0,0,218,1,105,114,10,0,0,0,114,
+- 71,0,0,0,114,11,0,0,0,218,11,95,112,97,116,104,
++ 4,0,0,0,41,2,218,3,109,97,120,114,51,0,0,0,
++ 41,2,114,66,0,0,0,218,1,105,114,10,0,0,0,114,
++ 72,0,0,0,114,11,0,0,0,218,11,95,112,97,116,104,
+ 95,115,112,108,105,116,127,0,0,0,115,8,0,0,0,0,
+- 2,22,1,8,1,8,1,114,74,0,0,0,99,1,0,0,
++ 2,22,1,8,1,8,1,114,75,0,0,0,99,1,0,0,
+ 0,0,0,0,0,0,0,0,0,1,0,0,0,3,0,0,
+ 0,67,0,0,0,115,10,0,0,0,116,0,160,1,124,0,
+ 161,1,83,0,41,1,122,126,83,116,97,116,32,116,104,101,
+@@ -261,9 +261,9 @@ const unsigned char _Py_M__importlib_bootstrap_external[] = {
+ 115,10,32,32,32,32,40,101,46,103,46,32,99,97,99,104,
+ 101,32,115,116,97,116,32,114,101,115,117,108,116,115,41,46,
+ 10,10,32,32,32,32,41,2,114,24,0,0,0,90,4,115,
+- 116,97,116,114,71,0,0,0,114,10,0,0,0,114,10,0,
++ 116,97,116,114,72,0,0,0,114,10,0,0,0,114,10,0,
+ 0,0,114,11,0,0,0,218,10,95,112,97,116,104,95,115,
+- 116,97,116,135,0,0,0,115,2,0,0,0,0,7,114,75,
++ 116,97,116,135,0,0,0,115,2,0,0,0,0,7,114,76,
+ 0,0,0,99,2,0,0,0,0,0,0,0,0,0,0,0,
+ 3,0,0,0,8,0,0,0,67,0,0,0,115,48,0,0,
+ 0,122,12,116,0,124,0,131,1,125,2,87,0,110,20,4,
+@@ -272,33 +272,33 @@ const unsigned char _Py_M__importlib_bootstrap_external[] = {
+ 0,41,3,122,49,84,101,115,116,32,119,104,101,116,104,101,
+ 114,32,116,104,101,32,112,97,116,104,32,105,115,32,116,104,
+ 101,32,115,112,101,99,105,102,105,101,100,32,109,111,100,101,
+- 32,116,121,112,101,46,70,105,0,240,0,0,41,3,114,75,
++ 32,116,121,112,101,46,70,105,0,240,0,0,41,3,114,76,
+ 0,0,0,218,7,79,83,69,114,114,111,114,218,7,115,116,
+- 95,109,111,100,101,41,3,114,65,0,0,0,218,4,109,111,
++ 95,109,111,100,101,41,3,114,66,0,0,0,218,4,109,111,
+ 100,101,90,9,115,116,97,116,95,105,110,102,111,114,10,0,
+ 0,0,114,10,0,0,0,114,11,0,0,0,218,18,95,112,
+ 97,116,104,95,105,115,95,109,111,100,101,95,116,121,112,101,
+ 145,0,0,0,115,10,0,0,0,0,2,2,1,12,1,12,
+- 1,8,1,114,79,0,0,0,99,1,0,0,0,0,0,0,
++ 1,8,1,114,80,0,0,0,99,1,0,0,0,0,0,0,
+ 0,0,0,0,0,1,0,0,0,3,0,0,0,67,0,0,
+ 0,115,10,0,0,0,116,0,124,0,100,1,131,2,83,0,
+ 41,2,122,31,82,101,112,108,97,99,101,109,101,110,116,32,
+ 102,111,114,32,111,115,46,112,97,116,104,46,105,115,102,105,
+- 108,101,46,105,0,128,0,0,41,1,114,79,0,0,0,114,
+- 71,0,0,0,114,10,0,0,0,114,10,0,0,0,114,11,
++ 108,101,46,105,0,128,0,0,41,1,114,80,0,0,0,114,
++ 72,0,0,0,114,10,0,0,0,114,10,0,0,0,114,11,
+ 0,0,0,218,12,95,112,97,116,104,95,105,115,102,105,108,
+- 101,154,0,0,0,115,2,0,0,0,0,2,114,80,0,0,
++ 101,154,0,0,0,115,2,0,0,0,0,2,114,81,0,0,
+ 0,99,1,0,0,0,0,0,0,0,0,0,0,0,1,0,
+ 0,0,3,0,0,0,67,0,0,0,115,22,0,0,0,124,
+ 0,115,12,116,0,160,1,161,0,125,0,116,2,124,0,100,
+ 1,131,2,83,0,41,2,122,30,82,101,112,108,97,99,101,
+ 109,101,110,116,32,102,111,114,32,111,115,46,112,97,116,104,
+ 46,105,115,100,105,114,46,105,0,64,0,0,41,3,114,24,
+- 0,0,0,218,6,103,101,116,99,119,100,114,79,0,0,0,
+- 114,71,0,0,0,114,10,0,0,0,114,10,0,0,0,114,
++ 0,0,0,218,6,103,101,116,99,119,100,114,80,0,0,0,
++ 114,72,0,0,0,114,10,0,0,0,114,10,0,0,0,114,
+ 11,0,0,0,218,11,95,112,97,116,104,95,105,115,100,105,
+ 114,159,0,0,0,115,6,0,0,0,0,2,4,1,8,1,
+- 114,82,0,0,0,99,1,0,0,0,0,0,0,0,0,0,
++ 114,83,0,0,0,99,1,0,0,0,0,0,0,0,0,0,
+ 0,0,2,0,0,0,4,0,0,0,67,0,0,0,115,62,
+ 0,0,0,124,0,115,8,100,1,83,0,116,0,160,1,124,
+ 0,161,1,100,2,25,0,160,2,100,3,100,4,161,2,125,
+@@ -308,17 +308,17 @@ const unsigned char _Py_M__importlib_bootstrap_external[] = {
+ 32,102,111,114,32,111,115,46,112,97,116,104,46,105,115,97,
+ 98,115,46,70,114,0,0,0,0,114,2,0,0,0,114,1,
+ 0,0,0,114,4,0,0,0,122,2,92,92,41,6,114,24,
+- 0,0,0,114,56,0,0,0,218,7,114,101,112,108,97,99,
+- 101,114,6,0,0,0,114,29,0,0,0,114,58,0,0,0,
+- 41,2,114,65,0,0,0,114,64,0,0,0,114,10,0,0,
++ 0,0,0,114,57,0,0,0,218,7,114,101,112,108,97,99,
++ 101,114,6,0,0,0,114,30,0,0,0,114,59,0,0,0,
++ 41,2,114,66,0,0,0,114,65,0,0,0,114,10,0,0,
+ 0,114,10,0,0,0,114,11,0,0,0,218,11,95,112,97,
+ 116,104,95,105,115,97,98,115,167,0,0,0,115,8,0,0,
+- 0,0,2,4,1,4,1,22,1,114,85,0,0,0,99,1,
++ 0,0,2,4,1,4,1,22,1,114,86,0,0,0,99,1,
+ 0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,3,
+ 0,0,0,67,0,0,0,115,10,0,0,0,124,0,160,0,
+- 116,1,161,1,83,0,41,1,114,83,0,0,0,41,2,114,
+- 29,0,0,0,114,50,0,0,0,114,71,0,0,0,114,10,
+- 0,0,0,114,10,0,0,0,114,11,0,0,0,114,85,0,
++ 116,1,161,1,83,0,41,1,114,84,0,0,0,41,2,114,
++ 30,0,0,0,114,51,0,0,0,114,72,0,0,0,114,10,
++ 0,0,0,114,10,0,0,0,114,11,0,0,0,114,86,0,
+ 0,0,175,0,0,0,115,2,0,0,0,0,2,233,182,1,
+ 0,0,99,3,0,0,0,0,0,0,0,0,0,0,0,6,
+ 0,0,0,11,0,0,0,67,0,0,0,115,178,0,0,0,
+@@ -344,20 +344,20 @@ const unsigned char _Py_M__importlib_bootstrap_external[] = {
+ 32,111,102,32,116,104,101,10,32,32,32,32,116,101,109,112,
+ 111,114,97,114,121,32,102,105,108,101,32,105,115,32,97,116,
+ 116,101,109,112,116,101,100,46,250,5,123,125,46,123,125,114,
+- 86,0,0,0,90,2,119,98,78,41,13,218,6,102,111,114,
++ 87,0,0,0,90,2,119,98,78,41,13,218,6,102,111,114,
+ 109,97,116,218,2,105,100,114,24,0,0,0,90,4,111,112,
+ 101,110,90,6,79,95,69,88,67,76,90,7,79,95,67,82,
+ 69,65,84,90,8,79,95,87,82,79,78,76,89,218,3,95,
+ 105,111,218,6,70,105,108,101,73,79,218,5,119,114,105,116,
+- 101,114,84,0,0,0,114,76,0,0,0,90,6,117,110,108,
+- 105,110,107,41,6,114,65,0,0,0,114,43,0,0,0,114,
+- 78,0,0,0,90,8,112,97,116,104,95,116,109,112,90,2,
++ 101,114,85,0,0,0,114,77,0,0,0,90,6,117,110,108,
++ 105,110,107,41,6,114,66,0,0,0,114,44,0,0,0,114,
++ 79,0,0,0,90,8,112,97,116,104,95,116,109,112,90,2,
+ 102,100,218,4,102,105,108,101,114,10,0,0,0,114,10,0,
+ 0,0,114,11,0,0,0,218,13,95,119,114,105,116,101,95,
+ 97,116,111,109,105,99,180,0,0,0,115,28,0,0,0,0,
+ 5,16,1,6,1,22,255,4,2,2,3,14,1,40,1,16,
+- 1,12,1,2,1,14,1,12,1,6,1,114,94,0,0,0,
+- 105,97,13,0,0,114,45,0,0,0,114,35,0,0,0,115,
++ 1,12,1,2,1,14,1,12,1,6,1,114,95,0,0,0,
++ 105,97,13,0,0,114,46,0,0,0,114,36,0,0,0,115,
+ 2,0,0,0,13,10,90,11,95,95,112,121,99,97,99,104,
+ 101,95,95,122,4,111,112,116,45,122,3,46,112,121,122,4,
+ 46,112,121,99,41,1,218,12,111,112,116,105,109,105,122,97,
+@@ -446,27 +446,27 @@ const unsigned char _Py_M__importlib_bootstrap_external[] = {
+ 99,104,101,95,116,97,103,32,105,115,32,78,111,110,101,114,
+ 0,0,0,0,122,24,123,33,114,125,32,105,115,32,110,111,
+ 116,32,97,108,112,104,97,110,117,109,101,114,105,99,122,7,
+- 123,125,46,123,125,123,125,114,16,0,0,0,114,45,0,0,
++ 123,125,46,123,125,123,125,114,16,0,0,0,114,46,0,0,
+ 0,41,28,218,9,95,119,97,114,110,105,110,103,115,218,4,
+ 119,97,114,110,218,18,68,101,112,114,101,99,97,116,105,111,
+ 110,87,97,114,110,105,110,103,218,9,84,121,112,101,69,114,
+ 114,111,114,114,24,0,0,0,218,6,102,115,112,97,116,104,
+- 114,74,0,0,0,218,10,114,112,97,114,116,105,116,105,111,
++ 114,75,0,0,0,218,10,114,112,97,114,116,105,116,105,111,
+ 110,114,21,0,0,0,218,14,105,109,112,108,101,109,101,110,
+ 116,97,116,105,111,110,218,9,99,97,99,104,101,95,116,97,
+ 103,218,19,78,111,116,73,109,112,108,101,109,101,110,116,101,
+- 100,69,114,114,111,114,114,62,0,0,0,114,22,0,0,0,
++ 100,69,114,114,111,114,114,63,0,0,0,114,22,0,0,0,
+ 218,8,111,112,116,105,109,105,122,101,218,3,115,116,114,218,
+ 7,105,115,97,108,110,117,109,218,10,86,97,108,117,101,69,
+- 114,114,111,114,114,88,0,0,0,218,4,95,79,80,84,218,
++ 114,114,111,114,114,89,0,0,0,218,4,95,79,80,84,218,
+ 17,66,89,84,69,67,79,68,69,95,83,85,70,70,73,88,
+ 69,83,218,14,112,121,99,97,99,104,101,95,112,114,101,102,
+- 105,120,114,85,0,0,0,114,67,0,0,0,114,81,0,0,
+- 0,114,50,0,0,0,218,6,108,115,116,114,105,112,218,8,
+- 95,80,89,67,65,67,72,69,41,12,114,65,0,0,0,90,
++ 105,120,114,86,0,0,0,114,68,0,0,0,114,82,0,0,
++ 0,114,51,0,0,0,218,6,108,115,116,114,105,112,218,8,
++ 95,80,89,67,65,67,72,69,41,12,114,66,0,0,0,90,
+ 14,100,101,98,117,103,95,111,118,101,114,114,105,100,101,114,
+- 95,0,0,0,218,7,109,101,115,115,97,103,101,218,4,104,
+- 101,97,100,114,66,0,0,0,90,4,98,97,115,101,114,9,
++ 96,0,0,0,218,7,109,101,115,115,97,103,101,218,4,104,
++ 101,97,100,114,67,0,0,0,90,4,98,97,115,101,114,9,
+ 0,0,0,218,4,114,101,115,116,90,3,116,97,103,90,15,
+ 97,108,109,111,115,116,95,102,105,108,101,110,97,109,101,218,
+ 8,102,105,108,101,110,97,109,101,114,10,0,0,0,114,10,
+@@ -476,7 +476,7 @@ const unsigned char _Py_M__importlib_bootstrap_external[] = {
+ 4,1,8,1,12,1,10,1,12,1,16,1,8,1,8,1,
+ 8,1,24,1,8,1,12,1,6,2,8,1,8,1,8,1,
+ 8,1,14,1,14,1,12,1,12,9,10,1,14,5,28,1,
+- 12,4,2,1,4,1,8,1,2,253,4,5,114,120,0,0,
++ 12,4,2,1,4,1,8,1,2,253,4,5,114,121,0,0,
+ 0,99,1,0,0,0,0,0,0,0,0,0,0,0,10,0,
+ 0,0,5,0,0,0,67,0,0,0,115,46,1,0,0,116,
+ 0,106,1,106,2,100,1,117,0,114,20,116,3,100,2,131,
+@@ -521,13 +521,13 @@ const unsigned char _Py_M__importlib_bootstrap_external[] = {
+ 32,105,115,32,78,111,110,101,32,116,104,101,110,32,78,111,
+ 116,73,109,112,108,101,109,101,110,116,101,100,69,114,114,111,
+ 114,32,105,115,32,114,97,105,115,101,100,46,10,10,32,32,
+- 32,32,78,114,97,0,0,0,70,84,122,31,32,110,111,116,
++ 32,32,78,114,98,0,0,0,70,84,122,31,32,110,111,116,
+ 32,98,111,116,116,111,109,45,108,101,118,101,108,32,100,105,
+- 114,101,99,116,111,114,121,32,105,110,32,114,96,0,0,0,
+- 62,2,0,0,0,114,45,0,0,0,233,3,0,0,0,122,
++ 114,101,99,116,111,114,121,32,105,110,32,114,97,0,0,0,
++ 62,2,0,0,0,114,46,0,0,0,233,3,0,0,0,122,
+ 29,101,120,112,101,99,116,101,100,32,111,110,108,121,32,50,
+- 32,111,114,32,51,32,100,111,116,115,32,105,110,32,114,121,
+- 0,0,0,114,45,0,0,0,233,254,255,255,255,122,53,111,
++ 32,111,114,32,51,32,100,111,116,115,32,105,110,32,114,122,
++ 0,0,0,114,46,0,0,0,233,254,255,255,255,122,53,111,
+ 112,116,105,109,105,122,97,116,105,111,110,32,112,111,114,116,
+ 105,111,110,32,111,102,32,102,105,108,101,110,97,109,101,32,
+ 100,111,101,115,32,110,111,116,32,115,116,97,114,116,32,119,
+@@ -535,20 +535,20 @@ const unsigned char _Py_M__importlib_bootstrap_external[] = {
+ 111,110,32,108,101,118,101,108,32,122,29,32,105,115,32,110,
+ 111,116,32,97,110,32,97,108,112,104,97,110,117,109,101,114,
+ 105,99,32,118,97,108,117,101,114,0,0,0,0,41,22,114,
+- 21,0,0,0,114,104,0,0,0,114,105,0,0,0,114,106,
+- 0,0,0,114,24,0,0,0,114,102,0,0,0,114,74,0,
+- 0,0,114,113,0,0,0,114,49,0,0,0,114,50,0,0,
+- 0,114,29,0,0,0,114,59,0,0,0,114,6,0,0,0,
+- 114,115,0,0,0,114,110,0,0,0,218,5,99,111,117,110,
+- 116,218,6,114,115,112,108,105,116,114,111,0,0,0,114,109,
+- 0,0,0,218,9,112,97,114,116,105,116,105,111,110,114,67,
++ 21,0,0,0,114,105,0,0,0,114,106,0,0,0,114,107,
++ 0,0,0,114,24,0,0,0,114,103,0,0,0,114,75,0,
++ 0,0,114,114,0,0,0,114,50,0,0,0,114,51,0,0,
++ 0,114,30,0,0,0,114,60,0,0,0,114,6,0,0,0,
++ 114,116,0,0,0,114,111,0,0,0,218,5,99,111,117,110,
++ 116,218,6,114,115,112,108,105,116,114,112,0,0,0,114,110,
++ 0,0,0,218,9,112,97,114,116,105,116,105,111,110,114,68,
+ 0,0,0,218,15,83,79,85,82,67,69,95,83,85,70,70,
+- 73,88,69,83,41,10,114,65,0,0,0,114,117,0,0,0,
++ 73,88,69,83,41,10,114,66,0,0,0,114,118,0,0,0,
+ 90,16,112,121,99,97,99,104,101,95,102,105,108,101,110,97,
+ 109,101,90,23,102,111,117,110,100,95,105,110,95,112,121,99,
+ 97,99,104,101,95,112,114,101,102,105,120,90,13,115,116,114,
+ 105,112,112,101,100,95,112,97,116,104,90,7,112,121,99,97,
+- 99,104,101,90,9,100,111,116,95,99,111,117,110,116,114,95,
++ 99,104,101,90,9,100,111,116,95,99,111,117,110,116,114,96,
+ 0,0,0,90,9,111,112,116,95,108,101,118,101,108,90,13,
+ 98,97,115,101,95,102,105,108,101,110,97,109,101,114,10,0,
+ 0,0,114,10,0,0,0,114,11,0,0,0,218,17,115,111,
+@@ -557,7 +557,7 @@ const unsigned char _Py_M__importlib_bootstrap_external[] = {
+ 12,1,4,1,10,1,12,1,14,1,16,1,4,1,4,1,
+ 12,1,8,1,8,1,2,255,8,2,10,1,8,1,16,1,
+ 10,1,16,1,10,1,4,1,2,255,8,2,16,1,10,1,
+- 16,2,14,1,114,127,0,0,0,99,1,0,0,0,0,0,
++ 16,2,14,1,114,128,0,0,0,99,1,0,0,0,0,0,
+ 0,0,0,0,0,0,5,0,0,0,9,0,0,0,67,0,
+ 0,0,115,124,0,0,0,116,0,124,0,131,1,100,1,107,
+ 2,114,16,100,2,83,0,124,0,160,1,100,3,161,1,92,
+@@ -579,31 +579,31 @@ const unsigned char _Py_M__importlib_bootstrap_external[] = {
+ 116,95,69,120,101,99,67,111,100,101,77,111,100,117,108,101,
+ 87,105,116,104,70,105,108,101,110,97,109,101,115,40,41,32,
+ 105,110,32,116,104,101,32,67,32,65,80,73,46,10,10,32,
+- 32,32,32,114,0,0,0,0,78,114,96,0,0,0,233,253,
++ 32,32,32,114,0,0,0,0,78,114,97,0,0,0,233,253,
+ 255,255,255,233,255,255,255,255,90,2,112,121,41,7,114,6,
+- 0,0,0,114,103,0,0,0,218,5,108,111,119,101,114,114,
+- 127,0,0,0,114,106,0,0,0,114,110,0,0,0,114,80,
++ 0,0,0,114,104,0,0,0,218,5,108,111,119,101,114,114,
++ 128,0,0,0,114,107,0,0,0,114,111,0,0,0,114,81,
+ 0,0,0,41,5,218,13,98,121,116,101,99,111,100,101,95,
+- 112,97,116,104,114,118,0,0,0,218,1,95,90,9,101,120,
++ 112,97,116,104,114,119,0,0,0,218,1,95,90,9,101,120,
+ 116,101,110,115,105,111,110,218,11,115,111,117,114,99,101,95,
+ 112,97,116,104,114,10,0,0,0,114,10,0,0,0,114,11,
+ 0,0,0,218,15,95,103,101,116,95,115,111,117,114,99,101,
+ 102,105,108,101,216,1,0,0,115,20,0,0,0,0,7,12,
+ 1,4,1,16,1,24,1,4,1,2,1,12,1,16,1,18,
+- 1,114,134,0,0,0,99,1,0,0,0,0,0,0,0,0,
++ 1,114,135,0,0,0,99,1,0,0,0,0,0,0,0,0,
+ 0,0,0,1,0,0,0,8,0,0,0,67,0,0,0,115,
+ 72,0,0,0,124,0,160,0,116,1,116,2,131,1,161,1,
+ 114,46,122,10,116,3,124,0,131,1,87,0,83,0,4,0,
+ 116,4,121,42,1,0,1,0,1,0,89,0,113,68,48,0,
+ 110,22,124,0,160,0,116,1,116,5,131,1,161,1,114,64,
+- 124,0,83,0,100,0,83,0,100,0,83,0,114,69,0,0,
+- 0,41,6,114,58,0,0,0,218,5,116,117,112,108,101,114,
+- 126,0,0,0,114,120,0,0,0,114,106,0,0,0,114,112,
+- 0,0,0,41,1,114,119,0,0,0,114,10,0,0,0,114,
++ 124,0,83,0,100,0,83,0,100,0,83,0,114,70,0,0,
++ 0,41,6,114,59,0,0,0,218,5,116,117,112,108,101,114,
++ 127,0,0,0,114,121,0,0,0,114,107,0,0,0,114,113,
++ 0,0,0,41,1,114,120,0,0,0,114,10,0,0,0,114,
+ 10,0,0,0,114,11,0,0,0,218,11,95,103,101,116,95,
+ 99,97,99,104,101,100,235,1,0,0,115,16,0,0,0,0,
+ 1,14,1,2,1,10,1,12,1,8,1,14,1,4,2,114,
+- 136,0,0,0,99,1,0,0,0,0,0,0,0,0,0,0,
++ 137,0,0,0,99,1,0,0,0,0,0,0,0,0,0,0,
+ 0,2,0,0,0,8,0,0,0,67,0,0,0,115,50,0,
+ 0,0,122,14,116,0,124,0,131,1,106,1,125,1,87,0,
+ 110,22,4,0,116,2,121,36,1,0,1,0,1,0,100,1,
+@@ -611,13 +611,13 @@ const unsigned char _Py_M__importlib_bootstrap_external[] = {
+ 124,1,83,0,41,3,122,51,67,97,108,99,117,108,97,116,
+ 101,32,116,104,101,32,109,111,100,101,32,112,101,114,109,105,
+ 115,115,105,111,110,115,32,102,111,114,32,97,32,98,121,116,
+- 101,99,111,100,101,32,102,105,108,101,46,114,86,0,0,0,
+- 233,128,0,0,0,41,3,114,75,0,0,0,114,77,0,0,
+- 0,114,76,0,0,0,41,2,114,65,0,0,0,114,78,0,
++ 101,99,111,100,101,32,102,105,108,101,46,114,87,0,0,0,
++ 233,128,0,0,0,41,3,114,76,0,0,0,114,78,0,0,
++ 0,114,77,0,0,0,41,2,114,66,0,0,0,114,79,0,
+ 0,0,114,10,0,0,0,114,10,0,0,0,114,11,0,0,
+ 0,218,10,95,99,97,108,99,95,109,111,100,101,247,1,0,
+ 0,115,12,0,0,0,0,2,2,1,14,1,12,1,10,3,
+- 8,1,114,138,0,0,0,99,1,0,0,0,0,0,0,0,
++ 8,1,114,139,0,0,0,99,1,0,0,0,0,0,0,0,
+ 0,0,0,0,3,0,0,0,8,0,0,0,3,0,0,0,
+ 115,66,0,0,0,100,6,135,0,102,1,100,2,100,3,132,
+ 9,125,1,122,10,116,0,106,1,125,2,87,0,110,26,4,
+@@ -648,9 +648,9 @@ const unsigned char _Py_M__importlib_bootstrap_external[] = {
+ 162,1,82,0,105,0,124,3,164,1,142,1,83,0,41,3,
+ 78,122,30,108,111,97,100,101,114,32,102,111,114,32,37,115,
+ 32,99,97,110,110,111,116,32,104,97,110,100,108,101,32,37,
+- 115,169,1,218,4,110,97,109,101,41,2,114,140,0,0,0,
++ 115,169,1,218,4,110,97,109,101,41,2,114,141,0,0,0,
+ 218,11,73,109,112,111,114,116,69,114,114,111,114,41,4,218,
+- 4,115,101,108,102,114,140,0,0,0,218,4,97,114,103,115,
++ 4,115,101,108,102,114,141,0,0,0,218,4,97,114,103,115,
+ 218,6,107,119,97,114,103,115,169,1,218,6,109,101,116,104,
+ 111,100,114,10,0,0,0,114,11,0,0,0,218,19,95,99,
+ 104,101,99,107,95,110,97,109,101,95,119,114,97,112,112,101,
+@@ -670,18 +670,18 @@ const unsigned char _Py_M__importlib_bootstrap_external[] = {
+ 218,7,104,97,115,97,116,116,114,218,7,115,101,116,97,116,
+ 116,114,218,7,103,101,116,97,116,116,114,218,8,95,95,100,
+ 105,99,116,95,95,218,6,117,112,100,97,116,101,41,3,90,
+- 3,110,101,119,90,3,111,108,100,114,84,0,0,0,114,10,
++ 3,110,101,119,90,3,111,108,100,114,85,0,0,0,114,10,
+ 0,0,0,114,10,0,0,0,114,11,0,0,0,218,5,95,
+ 119,114,97,112,22,2,0,0,115,8,0,0,0,0,1,8,
+ 1,10,1,20,1,122,26,95,99,104,101,99,107,95,110,97,
+ 109,101,46,60,108,111,99,97,108,115,62,46,95,119,114,97,
+ 112,41,1,78,41,3,218,10,95,98,111,111,116,115,116,114,
+- 97,112,114,157,0,0,0,218,9,78,97,109,101,69,114,114,
+- 111,114,41,3,114,146,0,0,0,114,147,0,0,0,114,157,
+- 0,0,0,114,10,0,0,0,114,145,0,0,0,114,11,0,
++ 97,112,114,158,0,0,0,218,9,78,97,109,101,69,114,114,
++ 111,114,41,3,114,147,0,0,0,114,148,0,0,0,114,158,
++ 0,0,0,114,10,0,0,0,114,146,0,0,0,114,11,0,
+ 0,0,218,11,95,99,104,101,99,107,95,110,97,109,101,3,
+ 2,0,0,115,14,0,0,0,0,8,14,7,2,1,10,1,
+- 12,2,14,5,10,1,114,160,0,0,0,99,2,0,0,0,
++ 12,2,14,5,10,1,114,161,0,0,0,99,2,0,0,0,
+ 0,0,0,0,0,0,0,0,5,0,0,0,6,0,0,0,
+ 67,0,0,0,115,60,0,0,0,124,0,160,0,124,1,161,
+ 1,92,2,125,2,125,3,124,2,100,1,117,0,114,56,116,
+@@ -701,15 +701,15 @@ const unsigned char _Py_M__importlib_bootstrap_external[] = {
+ 116,105,110,103,32,100,105,114,101,99,116,111,114,121,32,123,
+ 125,58,32,109,105,115,115,105,110,103,32,95,95,105,110,105,
+ 116,95,95,114,0,0,0,0,41,6,218,11,102,105,110,100,
+- 95,108,111,97,100,101,114,114,6,0,0,0,114,98,0,0,
+- 0,114,99,0,0,0,114,88,0,0,0,218,13,73,109,112,
+- 111,114,116,87,97,114,110,105,110,103,41,5,114,142,0,0,
++ 95,108,111,97,100,101,114,114,6,0,0,0,114,99,0,0,
++ 0,114,100,0,0,0,114,89,0,0,0,218,13,73,109,112,
++ 111,114,116,87,97,114,110,105,110,103,41,5,114,143,0,0,
+ 0,218,8,102,117,108,108,110,97,109,101,218,6,108,111,97,
+ 100,101,114,218,8,112,111,114,116,105,111,110,115,218,3,109,
+ 115,103,114,10,0,0,0,114,10,0,0,0,114,11,0,0,
+ 0,218,17,95,102,105,110,100,95,109,111,100,117,108,101,95,
+ 115,104,105,109,31,2,0,0,115,10,0,0,0,0,10,14,
+- 1,16,1,4,1,22,1,114,167,0,0,0,99,3,0,0,
++ 1,16,1,4,1,22,1,114,168,0,0,0,99,3,0,0,
+ 0,0,0,0,0,0,0,0,0,6,0,0,0,4,0,0,
+ 0,67,0,0,0,115,166,0,0,0,124,0,100,1,100,2,
+ 133,2,25,0,125,3,124,3,116,0,107,3,114,64,100,3,
+@@ -759,7 +759,7 @@ const unsigned char _Py_M__importlib_bootstrap_external[] = {
+ 114,111,114,32,105,115,32,114,97,105,115,101,100,32,119,104,
+ 101,110,32,116,104,101,32,100,97,116,97,32,105,115,32,102,
+ 111,117,110,100,32,116,111,32,98,101,32,116,114,117,110,99,
+- 97,116,101,100,46,10,10,32,32,32,32,78,114,34,0,0,
++ 97,116,101,100,46,10,10,32,32,32,32,78,114,35,0,0,
+ 0,122,20,98,97,100,32,109,97,103,105,99,32,110,117,109,
+ 98,101,114,32,105,110,32,122,2,58,32,250,2,123,125,233,
+ 16,0,0,0,122,40,114,101,97,99,104,101,100,32,69,79,
+@@ -767,17 +767,17 @@ const unsigned char _Py_M__importlib_bootstrap_external[] = {
+ 112,121,99,32,104,101,97,100,101,114,32,111,102,32,233,8,
+ 0,0,0,233,252,255,255,255,122,14,105,110,118,97,108,105,
+ 100,32,102,108,97,103,115,32,122,4,32,105,110,32,41,7,
+- 218,12,77,65,71,73,67,95,78,85,77,66,69,82,114,158,
++ 218,12,77,65,71,73,67,95,78,85,77,66,69,82,114,159,
+ 0,0,0,218,16,95,118,101,114,98,111,115,101,95,109,101,
+- 115,115,97,103,101,114,141,0,0,0,114,6,0,0,0,218,
+- 8,69,79,70,69,114,114,111,114,114,44,0,0,0,41,6,
+- 114,43,0,0,0,114,140,0,0,0,218,11,101,120,99,95,
+- 100,101,116,97,105,108,115,90,5,109,97,103,105,99,114,116,
++ 115,115,97,103,101,114,142,0,0,0,114,6,0,0,0,218,
++ 8,69,79,70,69,114,114,111,114,114,45,0,0,0,41,6,
++ 114,44,0,0,0,114,141,0,0,0,218,11,101,120,99,95,
++ 100,101,116,97,105,108,115,90,5,109,97,103,105,99,114,117,
+ 0,0,0,114,22,0,0,0,114,10,0,0,0,114,10,0,
+ 0,0,114,11,0,0,0,218,13,95,99,108,97,115,115,105,
+ 102,121,95,112,121,99,48,2,0,0,115,28,0,0,0,0,
+ 16,12,1,8,1,16,1,12,1,16,1,12,1,10,1,12,
+- 1,8,1,16,2,8,1,16,1,16,1,114,176,0,0,0,
++ 1,8,1,16,2,8,1,16,1,16,1,114,177,0,0,0,
+ 99,5,0,0,0,0,0,0,0,0,0,0,0,6,0,0,
+ 0,4,0,0,0,67,0,0,0,115,120,0,0,0,116,0,
+ 124,0,100,1,100,2,133,2,25,0,131,1,124,1,100,3,
+@@ -820,18 +820,18 @@ const unsigned char _Py_M__importlib_bootstrap_external[] = {
+ 109,112,111,114,116,69,114,114,111,114,32,105,115,32,114,97,
+ 105,115,101,100,32,105,102,32,116,104,101,32,98,121,116,101,
+ 99,111,100,101,32,105,115,32,115,116,97,108,101,46,10,10,
+- 32,32,32,32,114,170,0,0,0,233,12,0,0,0,114,33,
++ 32,32,32,32,114,171,0,0,0,233,12,0,0,0,114,34,
+ 0,0,0,122,22,98,121,116,101,99,111,100,101,32,105,115,
+- 32,115,116,97,108,101,32,102,111,114,32,114,168,0,0,0,
+- 78,114,169,0,0,0,41,4,114,44,0,0,0,114,158,0,
+- 0,0,114,173,0,0,0,114,141,0,0,0,41,6,114,43,
++ 32,115,116,97,108,101,32,102,111,114,32,114,169,0,0,0,
++ 78,114,170,0,0,0,41,4,114,45,0,0,0,114,159,0,
++ 0,0,114,174,0,0,0,114,142,0,0,0,41,6,114,44,
+ 0,0,0,218,12,115,111,117,114,99,101,95,109,116,105,109,
+- 101,218,11,115,111,117,114,99,101,95,115,105,122,101,114,140,
+- 0,0,0,114,175,0,0,0,114,116,0,0,0,114,10,0,
++ 101,218,11,115,111,117,114,99,101,95,115,105,122,101,114,141,
++ 0,0,0,114,176,0,0,0,114,117,0,0,0,114,10,0,
+ 0,0,114,10,0,0,0,114,11,0,0,0,218,23,95,118,
+ 97,108,105,100,97,116,101,95,116,105,109,101,115,116,97,109,
+ 112,95,112,121,99,81,2,0,0,115,16,0,0,0,0,19,
+- 24,1,10,1,12,1,16,1,8,1,22,255,2,2,114,180,
++ 24,1,10,1,12,1,16,1,8,1,22,255,2,2,114,181,
+ 0,0,0,99,4,0,0,0,0,0,0,0,0,0,0,0,
+ 4,0,0,0,4,0,0,0,67,0,0,0,115,42,0,0,
+ 0,124,0,100,1,100,2,133,2,25,0,124,1,107,3,114,
+@@ -868,16 +868,16 @@ const unsigned char _Py_M__importlib_bootstrap_external[] = {
+ 73,109,112,111,114,116,69,114,114,111,114,32,105,115,32,114,
+ 97,105,115,101,100,32,105,102,32,116,104,101,32,98,121,116,
+ 101,99,111,100,101,32,105,115,32,115,116,97,108,101,46,10,
+- 10,32,32,32,32,114,170,0,0,0,114,169,0,0,0,122,
++ 10,32,32,32,32,114,171,0,0,0,114,170,0,0,0,122,
+ 46,104,97,115,104,32,105,110,32,98,121,116,101,99,111,100,
+ 101,32,100,111,101,115,110,39,116,32,109,97,116,99,104,32,
+ 104,97,115,104,32,111,102,32,115,111,117,114,99,101,32,78,
+- 41,1,114,141,0,0,0,41,4,114,43,0,0,0,218,11,
+- 115,111,117,114,99,101,95,104,97,115,104,114,140,0,0,0,
+- 114,175,0,0,0,114,10,0,0,0,114,10,0,0,0,114,
++ 41,1,114,142,0,0,0,41,4,114,44,0,0,0,218,11,
++ 115,111,117,114,99,101,95,104,97,115,104,114,141,0,0,0,
++ 114,176,0,0,0,114,10,0,0,0,114,10,0,0,0,114,
+ 11,0,0,0,218,18,95,118,97,108,105,100,97,116,101,95,
+ 104,97,115,104,95,112,121,99,109,2,0,0,115,12,0,0,
+- 0,0,17,16,1,2,1,8,255,4,2,2,254,114,182,0,
++ 0,0,17,16,1,2,1,8,255,4,2,2,254,114,183,0,
+ 0,0,99,4,0,0,0,0,0,0,0,0,0,0,0,5,
+ 0,0,0,5,0,0,0,67,0,0,0,115,80,0,0,0,
+ 116,0,160,1,124,0,161,1,125,4,116,2,124,4,116,3,
+@@ -890,19 +890,19 @@ const unsigned char _Py_M__importlib_bootstrap_external[] = {
+ 32,97,32,112,121,99,46,122,21,99,111,100,101,32,111,98,
+ 106,101,99,116,32,102,114,111,109,32,123,33,114,125,78,122,
+ 23,78,111,110,45,99,111,100,101,32,111,98,106,101,99,116,
+- 32,105,110,32,123,33,114,125,169,2,114,140,0,0,0,114,
+- 65,0,0,0,41,10,218,7,109,97,114,115,104,97,108,90,
++ 32,105,110,32,123,33,114,125,169,2,114,141,0,0,0,114,
++ 66,0,0,0,41,10,218,7,109,97,114,115,104,97,108,90,
+ 5,108,111,97,100,115,218,10,105,115,105,110,115,116,97,110,
+- 99,101,218,10,95,99,111,100,101,95,116,121,112,101,114,158,
+- 0,0,0,114,173,0,0,0,218,4,95,105,109,112,90,16,
++ 99,101,218,10,95,99,111,100,101,95,116,121,112,101,114,159,
++ 0,0,0,114,174,0,0,0,218,4,95,105,109,112,90,16,
+ 95,102,105,120,95,99,111,95,102,105,108,101,110,97,109,101,
+- 114,141,0,0,0,114,88,0,0,0,41,5,114,43,0,0,
+- 0,114,140,0,0,0,114,131,0,0,0,114,133,0,0,0,
++ 114,142,0,0,0,114,89,0,0,0,41,5,114,44,0,0,
++ 0,114,141,0,0,0,114,132,0,0,0,114,134,0,0,0,
+ 218,4,99,111,100,101,114,10,0,0,0,114,10,0,0,0,
+ 114,11,0,0,0,218,17,95,99,111,109,112,105,108,101,95,
+ 98,121,116,101,99,111,100,101,133,2,0,0,115,18,0,0,
+ 0,0,2,10,1,10,1,12,1,8,1,12,1,4,2,10,
+- 1,4,255,114,189,0,0,0,99,3,0,0,0,0,0,0,
++ 1,4,255,114,190,0,0,0,99,3,0,0,0,0,0,0,
+ 0,0,0,0,0,4,0,0,0,5,0,0,0,67,0,0,
+ 0,115,70,0,0,0,116,0,116,1,131,1,125,3,124,3,
+ 160,2,116,3,100,1,131,1,161,1,1,0,124,3,160,2,
+@@ -912,15 +912,15 @@ const unsigned char _Py_M__importlib_bootstrap_external[] = {
+ 80,114,111,100,117,99,101,32,116,104,101,32,100,97,116,97,
+ 32,102,111,114,32,97,32,116,105,109,101,115,116,97,109,112,
+ 45,98,97,115,101,100,32,112,121,99,46,114,0,0,0,0,
+- 41,6,218,9,98,121,116,101,97,114,114,97,121,114,172,0,
+- 0,0,218,6,101,120,116,101,110,100,114,39,0,0,0,114,
+- 184,0,0,0,218,5,100,117,109,112,115,41,4,114,188,0,
+- 0,0,218,5,109,116,105,109,101,114,179,0,0,0,114,43,
++ 41,6,218,9,98,121,116,101,97,114,114,97,121,114,173,0,
++ 0,0,218,6,101,120,116,101,110,100,114,40,0,0,0,114,
++ 185,0,0,0,218,5,100,117,109,112,115,41,4,114,189,0,
++ 0,0,218,5,109,116,105,109,101,114,180,0,0,0,114,44,
+ 0,0,0,114,10,0,0,0,114,10,0,0,0,114,11,0,
+ 0,0,218,22,95,99,111,100,101,95,116,111,95,116,105,109,
+ 101,115,116,97,109,112,95,112,121,99,146,2,0,0,115,12,
+ 0,0,0,0,2,8,1,14,1,14,1,14,1,16,1,114,
+- 194,0,0,0,84,99,3,0,0,0,0,0,0,0,0,0,
++ 195,0,0,0,84,99,3,0,0,0,0,0,0,0,0,0,
+ 0,0,5,0,0,0,5,0,0,0,67,0,0,0,115,80,
+ 0,0,0,116,0,116,1,131,1,125,3,100,1,124,2,100,
+ 1,62,0,66,0,125,4,124,3,160,2,116,3,124,4,131,
+@@ -930,15 +930,15 @@ const unsigned char _Py_M__importlib_bootstrap_external[] = {
+ 3,83,0,41,3,122,38,80,114,111,100,117,99,101,32,116,
+ 104,101,32,100,97,116,97,32,102,111,114,32,97,32,104,97,
+ 115,104,45,98,97,115,101,100,32,112,121,99,46,114,4,0,
+- 0,0,114,170,0,0,0,41,7,114,190,0,0,0,114,172,
+- 0,0,0,114,191,0,0,0,114,39,0,0,0,114,6,0,
+- 0,0,114,184,0,0,0,114,192,0,0,0,41,5,114,188,
+- 0,0,0,114,181,0,0,0,90,7,99,104,101,99,107,101,
+- 100,114,43,0,0,0,114,22,0,0,0,114,10,0,0,0,
++ 0,0,114,171,0,0,0,41,7,114,191,0,0,0,114,173,
++ 0,0,0,114,192,0,0,0,114,40,0,0,0,114,6,0,
++ 0,0,114,185,0,0,0,114,193,0,0,0,41,5,114,189,
++ 0,0,0,114,182,0,0,0,90,7,99,104,101,99,107,101,
++ 100,114,44,0,0,0,114,22,0,0,0,114,10,0,0,0,
+ 114,10,0,0,0,114,11,0,0,0,218,17,95,99,111,100,
+ 101,95,116,111,95,104,97,115,104,95,112,121,99,156,2,0,
+ 0,115,14,0,0,0,0,2,8,1,12,1,14,1,16,1,
+- 10,1,16,1,114,195,0,0,0,99,1,0,0,0,0,0,
++ 10,1,16,1,114,196,0,0,0,99,1,0,0,0,0,0,
+ 0,0,0,0,0,0,5,0,0,0,6,0,0,0,67,0,
+ 0,0,115,62,0,0,0,100,1,100,2,108,0,125,1,116,
+ 1,160,2,124,0,161,1,106,3,125,2,124,1,160,4,124,
+@@ -953,20 +953,20 @@ const unsigned char _Py_M__importlib_bootstrap_external[] = {
+ 112,111,114,116,32,105,115,32,117,115,101,100,32,105,110,32,
+ 116,104,101,32,100,101,99,111,100,105,110,103,46,10,32,32,
+ 32,32,114,0,0,0,0,78,84,41,7,218,8,116,111,107,
+- 101,110,105,122,101,114,90,0,0,0,90,7,66,121,116,101,
++ 101,110,105,122,101,114,91,0,0,0,90,7,66,121,116,101,
+ 115,73,79,90,8,114,101,97,100,108,105,110,101,90,15,100,
+ 101,116,101,99,116,95,101,110,99,111,100,105,110,103,90,25,
+ 73,110,99,114,101,109,101,110,116,97,108,78,101,119,108,105,
+ 110,101,68,101,99,111,100,101,114,218,6,100,101,99,111,100,
+ 101,41,5,218,12,115,111,117,114,99,101,95,98,121,116,101,
+- 115,114,196,0,0,0,90,21,115,111,117,114,99,101,95,98,
++ 115,114,197,0,0,0,90,21,115,111,117,114,99,101,95,98,
+ 121,116,101,115,95,114,101,97,100,108,105,110,101,218,8,101,
+ 110,99,111,100,105,110,103,90,15,110,101,119,108,105,110,101,
+ 95,100,101,99,111,100,101,114,114,10,0,0,0,114,10,0,
+ 0,0,114,11,0,0,0,218,13,100,101,99,111,100,101,95,
+ 115,111,117,114,99,101,167,2,0,0,115,10,0,0,0,0,
+- 5,8,1,12,1,10,1,12,1,114,200,0,0,0,169,2,
+- 114,164,0,0,0,218,26,115,117,98,109,111,100,117,108,101,
++ 5,8,1,12,1,10,1,12,1,114,201,0,0,0,169,2,
++ 114,165,0,0,0,218,26,115,117,98,109,111,100,117,108,101,
+ 95,115,101,97,114,99,104,95,108,111,99,97,116,105,111,110,
+ 115,99,2,0,0,0,0,0,0,0,2,0,0,0,9,0,
+ 0,0,8,0,0,0,67,0,0,0,115,12,1,0,0,124,
+@@ -1010,19 +1010,19 @@ const unsigned char _Py_M__importlib_bootstrap_external[] = {
+ 122,9,60,117,110,107,110,111,119,110,62,218,12,103,101,116,
+ 95,102,105,108,101,110,97,109,101,169,1,218,6,111,114,105,
+ 103,105,110,84,218,10,105,115,95,112,97,99,107,97,103,101,
+- 114,0,0,0,0,41,17,114,152,0,0,0,114,203,0,0,
+- 0,114,141,0,0,0,114,24,0,0,0,114,102,0,0,0,
+- 114,158,0,0,0,218,10,77,111,100,117,108,101,83,112,101,
++ 114,0,0,0,0,41,17,114,153,0,0,0,114,204,0,0,
++ 0,114,142,0,0,0,114,24,0,0,0,114,103,0,0,0,
++ 114,159,0,0,0,218,10,77,111,100,117,108,101,83,112,101,
+ 99,90,13,95,115,101,116,95,102,105,108,101,97,116,116,114,
+ 218,27,95,103,101,116,95,115,117,112,112,111,114,116,101,100,
+- 95,102,105,108,101,95,108,111,97,100,101,114,115,114,58,0,
+- 0,0,114,135,0,0,0,114,164,0,0,0,218,9,95,80,
+- 79,80,85,76,65,84,69,114,206,0,0,0,114,202,0,0,
+- 0,114,74,0,0,0,114,61,0,0,0,41,9,114,140,0,
+- 0,0,90,8,108,111,99,97,116,105,111,110,114,164,0,0,
+- 0,114,202,0,0,0,218,4,115,112,101,99,218,12,108,111,
++ 95,102,105,108,101,95,108,111,97,100,101,114,115,114,59,0,
++ 0,0,114,136,0,0,0,114,165,0,0,0,218,9,95,80,
++ 79,80,85,76,65,84,69,114,207,0,0,0,114,203,0,0,
++ 0,114,75,0,0,0,114,62,0,0,0,41,9,114,141,0,
++ 0,0,90,8,108,111,99,97,116,105,111,110,114,165,0,0,
++ 0,114,203,0,0,0,218,4,115,112,101,99,218,12,108,111,
+ 97,100,101,114,95,99,108,97,115,115,218,8,115,117,102,102,
+- 105,120,101,115,114,206,0,0,0,90,7,100,105,114,110,97,
++ 105,120,101,115,114,207,0,0,0,90,7,100,105,114,110,97,
+ 109,101,114,10,0,0,0,114,10,0,0,0,114,11,0,0,
+ 0,218,23,115,112,101,99,95,102,114,111,109,95,102,105,108,
+ 101,95,108,111,99,97,116,105,111,110,184,2,0,0,115,62,
+@@ -1030,7 +1030,7 @@ const unsigned char _Py_M__importlib_bootstrap_external[] = {
+ 1,8,2,10,8,16,1,6,3,8,1,14,1,14,1,10,
+ 1,6,1,6,2,4,3,8,2,10,1,2,1,14,1,12,
+ 1,6,2,4,1,8,2,6,1,12,1,6,1,12,1,12,
+- 2,114,213,0,0,0,99,0,0,0,0,0,0,0,0,0,
++ 2,114,214,0,0,0,99,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,4,0,0,0,64,0,0,0,115,
+ 80,0,0,0,101,0,90,1,100,0,90,2,100,1,90,3,
+ 100,2,90,4,100,3,90,5,100,4,90,6,101,7,100,5,
+@@ -1056,11 +1056,11 @@ const unsigned char _Py_M__importlib_bootstrap_external[] = {
+ 160,1,116,0,106,2,124,1,161,2,87,0,83,0,4,0,
+ 116,3,121,48,1,0,1,0,1,0,116,0,160,1,116,0,
+ 106,4,124,1,161,2,6,0,89,0,83,0,48,0,100,0,
+- 83,0,114,69,0,0,0,41,5,218,6,119,105,110,114,101,
++ 83,0,114,70,0,0,0,41,5,218,6,119,105,110,114,101,
+ 103,90,7,79,112,101,110,75,101,121,90,17,72,75,69,89,
+- 95,67,85,82,82,69,78,84,95,85,83,69,82,114,76,0,
++ 95,67,85,82,82,69,78,84,95,85,83,69,82,114,77,0,
+ 0,0,90,18,72,75,69,89,95,76,79,67,65,76,95,77,
+- 65,67,72,73,78,69,41,2,218,3,99,108,115,114,26,0,
++ 65,67,72,73,78,69,41,2,218,3,99,108,115,114,27,0,
+ 0,0,114,10,0,0,0,114,10,0,0,0,114,11,0,0,
+ 0,218,14,95,111,112,101,110,95,114,101,103,105,115,116,114,
+ 121,8,3,0,0,115,8,0,0,0,0,2,2,1,16,1,
+@@ -1077,17 +1077,17 @@ const unsigned char _Py_M__importlib_bootstrap_external[] = {
+ 115,94,48,0,1,0,1,0,1,0,89,0,1,0,87,0,
+ 110,20,4,0,116,9,121,126,1,0,1,0,1,0,89,0,
+ 100,0,83,0,48,0,124,5,83,0,41,5,78,122,5,37,
+- 100,46,37,100,114,45,0,0,0,41,2,114,163,0,0,0,
++ 100,46,37,100,114,46,0,0,0,41,2,114,164,0,0,0,
+ 90,11,115,121,115,95,118,101,114,115,105,111,110,114,14,0,
+ 0,0,41,10,218,11,68,69,66,85,71,95,66,85,73,76,
+ 68,218,18,82,69,71,73,83,84,82,89,95,75,69,89,95,
+ 68,69,66,85,71,218,12,82,69,71,73,83,84,82,89,95,
+- 75,69,89,114,88,0,0,0,114,21,0,0,0,218,12,118,
+- 101,114,115,105,111,110,95,105,110,102,111,114,217,0,0,0,
+- 114,215,0,0,0,90,10,81,117,101,114,121,86,97,108,117,
+- 101,114,76,0,0,0,41,6,114,216,0,0,0,114,163,0,
++ 75,69,89,114,89,0,0,0,114,21,0,0,0,218,12,118,
++ 101,114,115,105,111,110,95,105,110,102,111,114,218,0,0,0,
++ 114,216,0,0,0,90,10,81,117,101,114,121,86,97,108,117,
++ 101,114,77,0,0,0,41,6,114,217,0,0,0,114,164,0,
+ 0,0,90,12,114,101,103,105,115,116,114,121,95,107,101,121,
+- 114,26,0,0,0,90,4,104,107,101,121,218,8,102,105,108,
++ 114,27,0,0,0,90,4,104,107,101,121,218,8,102,105,108,
+ 101,112,97,116,104,114,10,0,0,0,114,10,0,0,0,114,
+ 11,0,0,0,218,16,95,115,101,97,114,99,104,95,114,101,
+ 103,105,115,116,114,121,15,3,0,0,115,24,0,0,0,0,
+@@ -1104,13 +1104,13 @@ const unsigned char _Py_M__importlib_bootstrap_external[] = {
+ 125,5,125,6,124,4,160,4,116,5,124,6,131,1,161,1,
+ 114,62,116,6,106,7,124,1,124,5,124,1,124,4,131,2,
+ 124,4,100,1,141,3,125,7,124,7,2,0,1,0,83,0,
+- 113,62,100,0,83,0,41,2,78,114,204,0,0,0,41,8,
+- 114,223,0,0,0,114,75,0,0,0,114,76,0,0,0,114,
+- 208,0,0,0,114,58,0,0,0,114,135,0,0,0,114,158,
++ 113,62,100,0,83,0,41,2,78,114,205,0,0,0,41,8,
++ 114,224,0,0,0,114,76,0,0,0,114,77,0,0,0,114,
++ 209,0,0,0,114,59,0,0,0,114,136,0,0,0,114,159,
+ 0,0,0,218,16,115,112,101,99,95,102,114,111,109,95,108,
+- 111,97,100,101,114,41,8,114,216,0,0,0,114,163,0,0,
+- 0,114,65,0,0,0,218,6,116,97,114,103,101,116,114,222,
+- 0,0,0,114,164,0,0,0,114,212,0,0,0,114,210,0,
++ 111,97,100,101,114,41,8,114,217,0,0,0,114,164,0,0,
++ 0,114,66,0,0,0,218,6,116,97,114,103,101,116,114,223,
++ 0,0,0,114,165,0,0,0,114,213,0,0,0,114,211,0,
+ 0,0,114,10,0,0,0,114,10,0,0,0,114,11,0,0,
+ 0,218,9,102,105,110,100,95,115,112,101,99,30,3,0,0,
+ 115,28,0,0,0,0,2,10,1,8,1,4,1,2,1,12,
+@@ -1128,23 +1128,23 @@ const unsigned char _Py_M__importlib_bootstrap_external[] = {
+ 32,100,101,112,114,101,99,97,116,101,100,46,32,32,85,115,
+ 101,32,101,120,101,99,95,109,111,100,117,108,101,40,41,32,
+ 105,110,115,116,101,97,100,46,10,10,32,32,32,32,32,32,
+- 32,32,78,169,2,114,226,0,0,0,114,164,0,0,0,169,
+- 4,114,216,0,0,0,114,163,0,0,0,114,65,0,0,0,
+- 114,210,0,0,0,114,10,0,0,0,114,10,0,0,0,114,
++ 32,32,78,169,2,114,227,0,0,0,114,165,0,0,0,169,
++ 4,114,217,0,0,0,114,164,0,0,0,114,66,0,0,0,
++ 114,211,0,0,0,114,10,0,0,0,114,10,0,0,0,114,
+ 11,0,0,0,218,11,102,105,110,100,95,109,111,100,117,108,
+ 101,46,3,0,0,115,8,0,0,0,0,7,12,1,8,1,
+ 6,2,122,33,87,105,110,100,111,119,115,82,101,103,105,115,
+ 116,114,121,70,105,110,100,101,114,46,102,105,110,100,95,109,
+- 111,100,117,108,101,41,2,78,78,41,1,78,41,12,114,149,
+- 0,0,0,114,148,0,0,0,114,150,0,0,0,114,151,0,
+- 0,0,114,220,0,0,0,114,219,0,0,0,114,218,0,0,
+- 0,218,11,99,108,97,115,115,109,101,116,104,111,100,114,217,
+- 0,0,0,114,223,0,0,0,114,226,0,0,0,114,229,0,
++ 111,100,117,108,101,41,2,78,78,41,1,78,41,12,114,150,
++ 0,0,0,114,149,0,0,0,114,151,0,0,0,114,152,0,
++ 0,0,114,221,0,0,0,114,220,0,0,0,114,219,0,0,
++ 0,218,11,99,108,97,115,115,109,101,116,104,111,100,114,218,
++ 0,0,0,114,224,0,0,0,114,227,0,0,0,114,230,0,
+ 0,0,114,10,0,0,0,114,10,0,0,0,114,10,0,0,
+- 0,114,11,0,0,0,114,214,0,0,0,252,2,0,0,115,
++ 0,114,11,0,0,0,114,215,0,0,0,252,2,0,0,115,
+ 28,0,0,0,8,2,4,3,2,255,2,4,2,255,2,3,
+ 4,2,2,1,10,6,2,1,10,14,2,1,12,15,2,1,
+- 114,214,0,0,0,99,0,0,0,0,0,0,0,0,0,0,
++ 114,215,0,0,0,99,0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,2,0,0,0,64,0,0,0,115,48,
+ 0,0,0,101,0,90,1,100,0,90,2,100,1,90,3,100,
+ 2,100,3,132,0,90,4,100,4,100,5,132,0,90,5,100,
+@@ -1170,14 +1170,14 @@ const unsigned char _Py_M__importlib_bootstrap_external[] = {
+ 101,116,117,114,110,101,100,32,98,121,32,103,101,116,95,102,
+ 105,108,101,110,97,109,101,32,104,97,115,32,97,32,102,105,
+ 108,101,110,97,109,101,32,111,102,32,39,95,95,105,110,105,
+- 116,95,95,46,112,121,39,46,114,4,0,0,0,114,96,0,
+- 0,0,114,0,0,0,0,114,45,0,0,0,218,8,95,95,
+- 105,110,105,116,95,95,41,4,114,74,0,0,0,114,203,0,
+- 0,0,114,124,0,0,0,114,103,0,0,0,41,5,114,142,
+- 0,0,0,114,163,0,0,0,114,119,0,0,0,90,13,102,
++ 116,95,95,46,112,121,39,46,114,4,0,0,0,114,97,0,
++ 0,0,114,0,0,0,0,114,46,0,0,0,218,8,95,95,
++ 105,110,105,116,95,95,41,4,114,75,0,0,0,114,204,0,
++ 0,0,114,125,0,0,0,114,104,0,0,0,41,5,114,143,
++ 0,0,0,114,164,0,0,0,114,120,0,0,0,90,13,102,
+ 105,108,101,110,97,109,101,95,98,97,115,101,90,9,116,97,
+ 105,108,95,110,97,109,101,114,10,0,0,0,114,10,0,0,
+- 0,114,11,0,0,0,114,206,0,0,0,65,3,0,0,115,
++ 0,114,11,0,0,0,114,207,0,0,0,65,3,0,0,115,
+ 8,0,0,0,0,3,18,1,16,1,14,1,122,24,95,76,
+ 111,97,100,101,114,66,97,115,105,99,115,46,105,115,95,112,
+ 97,99,107,97,103,101,99,2,0,0,0,0,0,0,0,0,
+@@ -1185,8 +1185,8 @@ const unsigned char _Py_M__importlib_bootstrap_external[] = {
+ 4,0,0,0,100,1,83,0,169,2,122,42,85,115,101,32,
+ 100,101,102,97,117,108,116,32,115,101,109,97,110,116,105,99,
+ 115,32,102,111,114,32,109,111,100,117,108,101,32,99,114,101,
+- 97,116,105,111,110,46,78,114,10,0,0,0,169,2,114,142,
+- 0,0,0,114,210,0,0,0,114,10,0,0,0,114,10,0,
++ 97,116,105,111,110,46,78,114,10,0,0,0,169,2,114,143,
++ 0,0,0,114,211,0,0,0,114,10,0,0,0,114,10,0,
+ 0,0,114,11,0,0,0,218,13,99,114,101,97,116,101,95,
+ 109,111,100,117,108,101,73,3,0,0,115,2,0,0,0,0,
+ 1,122,27,95,76,111,97,100,101,114,66,97,115,105,99,115,
+@@ -1201,12 +1201,12 @@ const unsigned char _Py_M__importlib_bootstrap_external[] = {
+ 110,110,111,116,32,108,111,97,100,32,109,111,100,117,108,101,
+ 32,123,33,114,125,32,119,104,101,110,32,103,101,116,95,99,
+ 111,100,101,40,41,32,114,101,116,117,114,110,115,32,78,111,
+- 110,101,41,8,218,8,103,101,116,95,99,111,100,101,114,149,
+- 0,0,0,114,141,0,0,0,114,88,0,0,0,114,158,0,
++ 110,101,41,8,218,8,103,101,116,95,99,111,100,101,114,150,
++ 0,0,0,114,142,0,0,0,114,89,0,0,0,114,159,0,
+ 0,0,218,25,95,99,97,108,108,95,119,105,116,104,95,102,
+ 114,97,109,101,115,95,114,101,109,111,118,101,100,218,4,101,
+- 120,101,99,114,155,0,0,0,41,3,114,142,0,0,0,218,
+- 6,109,111,100,117,108,101,114,188,0,0,0,114,10,0,0,
++ 120,101,99,114,156,0,0,0,41,3,114,143,0,0,0,218,
++ 6,109,111,100,117,108,101,114,189,0,0,0,114,10,0,0,
+ 0,114,10,0,0,0,114,11,0,0,0,218,11,101,120,101,
+ 99,95,109,111,100,117,108,101,76,3,0,0,115,12,0,0,
+ 0,0,2,12,1,8,1,6,1,4,255,6,2,122,25,95,
+@@ -1216,19 +1216,19 @@ const unsigned char _Py_M__importlib_bootstrap_external[] = {
+ 0,115,12,0,0,0,116,0,160,1,124,0,124,1,161,2,
+ 83,0,41,1,122,26,84,104,105,115,32,109,111,100,117,108,
+ 101,32,105,115,32,100,101,112,114,101,99,97,116,101,100,46,
+- 41,2,114,158,0,0,0,218,17,95,108,111,97,100,95,109,
+- 111,100,117,108,101,95,115,104,105,109,169,2,114,142,0,0,
+- 0,114,163,0,0,0,114,10,0,0,0,114,10,0,0,0,
++ 41,2,114,159,0,0,0,218,17,95,108,111,97,100,95,109,
++ 111,100,117,108,101,95,115,104,105,109,169,2,114,143,0,0,
++ 0,114,164,0,0,0,114,10,0,0,0,114,10,0,0,0,
+ 114,11,0,0,0,218,11,108,111,97,100,95,109,111,100,117,
+ 108,101,84,3,0,0,115,2,0,0,0,0,2,122,25,95,
+ 76,111,97,100,101,114,66,97,115,105,99,115,46,108,111,97,
+- 100,95,109,111,100,117,108,101,78,41,8,114,149,0,0,0,
+- 114,148,0,0,0,114,150,0,0,0,114,151,0,0,0,114,
+- 206,0,0,0,114,235,0,0,0,114,240,0,0,0,114,243,
++ 100,95,109,111,100,117,108,101,78,41,8,114,150,0,0,0,
++ 114,149,0,0,0,114,151,0,0,0,114,152,0,0,0,114,
++ 207,0,0,0,114,236,0,0,0,114,241,0,0,0,114,244,
+ 0,0,0,114,10,0,0,0,114,10,0,0,0,114,10,0,
+- 0,0,114,11,0,0,0,114,231,0,0,0,60,3,0,0,
++ 0,0,114,11,0,0,0,114,232,0,0,0,60,3,0,0,
+ 115,10,0,0,0,8,2,4,3,8,8,8,3,8,8,114,
+- 231,0,0,0,99,0,0,0,0,0,0,0,0,0,0,0,
++ 232,0,0,0,99,0,0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,3,0,0,0,64,0,0,0,115,74,0,
+ 0,0,101,0,90,1,100,0,90,2,100,1,100,2,132,0,
+ 90,3,100,3,100,4,132,0,90,4,100,5,100,6,132,0,
+@@ -1248,8 +1248,8 @@ const unsigned char _Py_M__importlib_bootstrap_external[] = {
+ 32,32,32,82,97,105,115,101,115,32,79,83,69,114,114,111,
+ 114,32,119,104,101,110,32,116,104,101,32,112,97,116,104,32,
+ 99,97,110,110,111,116,32,98,101,32,104,97,110,100,108,101,
+- 100,46,10,32,32,32,32,32,32,32,32,78,41,1,114,76,
+- 0,0,0,169,2,114,142,0,0,0,114,65,0,0,0,114,
++ 100,46,10,32,32,32,32,32,32,32,32,78,41,1,114,77,
++ 0,0,0,169,2,114,143,0,0,0,114,66,0,0,0,114,
+ 10,0,0,0,114,10,0,0,0,114,11,0,0,0,218,10,
+ 112,97,116,104,95,109,116,105,109,101,91,3,0,0,115,2,
+ 0,0,0,0,6,122,23,83,111,117,114,99,101,76,111,97,
+@@ -1283,7 +1283,7 @@ const unsigned char _Py_M__importlib_bootstrap_external[] = {
+ 69,114,114,111,114,32,119,104,101,110,32,116,104,101,32,112,
+ 97,116,104,32,99,97,110,110,111,116,32,98,101,32,104,97,
+ 110,100,108,101,100,46,10,32,32,32,32,32,32,32,32,114,
+- 193,0,0,0,41,1,114,246,0,0,0,114,245,0,0,0,
++ 194,0,0,0,41,1,114,247,0,0,0,114,246,0,0,0,
+ 114,10,0,0,0,114,10,0,0,0,114,11,0,0,0,218,
+ 10,112,97,116,104,95,115,116,97,116,115,99,3,0,0,115,
+ 2,0,0,0,0,12,122,23,83,111,117,114,99,101,76,111,
+@@ -1306,8 +1306,8 @@ const unsigned char _Py_M__importlib_bootstrap_external[] = {
+ 116,108,121,32,116,114,97,110,115,102,101,114,32,112,101,114,
+ 109,105,115,115,105,111,110,115,10,32,32,32,32,32,32,32,
+ 32,41,1,218,8,115,101,116,95,100,97,116,97,41,4,114,
+- 142,0,0,0,114,133,0,0,0,90,10,99,97,99,104,101,
+- 95,112,97,116,104,114,43,0,0,0,114,10,0,0,0,114,
++ 143,0,0,0,114,134,0,0,0,90,10,99,97,99,104,101,
++ 95,112,97,116,104,114,44,0,0,0,114,10,0,0,0,114,
+ 10,0,0,0,114,11,0,0,0,218,15,95,99,97,99,104,
+ 101,95,98,121,116,101,99,111,100,101,113,3,0,0,115,2,
+ 0,0,0,0,8,122,28,83,111,117,114,99,101,76,111,97,
+@@ -1324,9 +1324,9 @@ const unsigned char _Py_M__importlib_bootstrap_external[] = {
+ 111,119,115,32,102,111,114,32,116,104,101,32,119,114,105,116,
+ 105,110,103,32,111,102,32,98,121,116,101,99,111,100,101,32,
+ 102,105,108,101,115,46,10,32,32,32,32,32,32,32,32,78,
+- 114,10,0,0,0,41,3,114,142,0,0,0,114,65,0,0,
+- 0,114,43,0,0,0,114,10,0,0,0,114,10,0,0,0,
+- 114,11,0,0,0,114,248,0,0,0,123,3,0,0,115,2,
++ 114,10,0,0,0,41,3,114,143,0,0,0,114,66,0,0,
++ 0,114,44,0,0,0,114,10,0,0,0,114,10,0,0,0,
++ 114,11,0,0,0,114,249,0,0,0,123,3,0,0,115,2,
+ 0,0,0,0,1,122,21,83,111,117,114,99,101,76,111,97,
+ 100,101,114,46,115,101,116,95,100,97,116,97,99,2,0,0,
+ 0,0,0,0,0,0,0,0,0,5,0,0,0,10,0,0,
+@@ -1342,16 +1342,16 @@ const unsigned char _Py_M__importlib_bootstrap_external[] = {
+ 111,117,114,99,101,46,122,39,115,111,117,114,99,101,32,110,
+ 111,116,32,97,118,97,105,108,97,98,108,101,32,116,104,114,
+ 111,117,103,104,32,103,101,116,95,100,97,116,97,40,41,114,
+- 139,0,0,0,78,41,5,114,203,0,0,0,218,8,103,101,
+- 116,95,100,97,116,97,114,76,0,0,0,114,141,0,0,0,
+- 114,200,0,0,0,41,5,114,142,0,0,0,114,163,0,0,
+- 0,114,65,0,0,0,114,198,0,0,0,218,3,101,120,99,
++ 140,0,0,0,78,41,5,114,204,0,0,0,218,8,103,101,
++ 116,95,100,97,116,97,114,77,0,0,0,114,142,0,0,0,
++ 114,201,0,0,0,41,5,114,143,0,0,0,114,164,0,0,
++ 0,114,66,0,0,0,114,199,0,0,0,218,3,101,120,99,
+ 114,10,0,0,0,114,10,0,0,0,114,11,0,0,0,218,
+ 10,103,101,116,95,115,111,117,114,99,101,130,3,0,0,115,
+ 20,0,0,0,0,2,10,1,2,1,14,1,14,1,4,1,
+ 2,255,4,1,2,255,24,2,122,23,83,111,117,114,99,101,
+ 76,111,97,100,101,114,46,103,101,116,95,115,111,117,114,99,
+- 101,114,129,0,0,0,41,1,218,9,95,111,112,116,105,109,
++ 101,114,130,0,0,0,41,1,218,9,95,111,112,116,105,109,
+ 105,122,101,99,3,0,0,0,0,0,0,0,1,0,0,0,
+ 4,0,0,0,8,0,0,0,67,0,0,0,115,22,0,0,
+ 0,116,0,106,1,116,2,124,1,124,2,100,1,100,2,124,
+@@ -1363,11 +1363,11 @@ const unsigned char _Py_M__importlib_bootstrap_external[] = {
+ 109,101,110,116,32,99,97,110,32,98,101,32,97,110,121,32,
+ 111,98,106,101,99,116,32,116,121,112,101,32,116,104,97,116,
+ 32,99,111,109,112,105,108,101,40,41,32,115,117,112,112,111,
+- 114,116,115,46,10,32,32,32,32,32,32,32,32,114,238,0,
++ 114,116,115,46,10,32,32,32,32,32,32,32,32,114,239,0,
+ 0,0,84,41,2,218,12,100,111,110,116,95,105,110,104,101,
+- 114,105,116,114,107,0,0,0,41,3,114,158,0,0,0,114,
+- 237,0,0,0,218,7,99,111,109,112,105,108,101,41,4,114,
+- 142,0,0,0,114,43,0,0,0,114,65,0,0,0,114,253,
++ 114,105,116,114,108,0,0,0,41,3,114,159,0,0,0,114,
++ 238,0,0,0,218,7,99,111,109,112,105,108,101,41,4,114,
++ 143,0,0,0,114,44,0,0,0,114,66,0,0,0,114,254,
+ 0,0,0,114,10,0,0,0,114,10,0,0,0,114,11,0,
+ 0,0,218,14,115,111,117,114,99,101,95,116,111,95,99,111,
+ 100,101,140,3,0,0,115,6,0,0,0,0,5,12,1,4,
+@@ -1420,33 +1420,33 @@ const unsigned char _Py_M__importlib_bootstrap_external[] = {
+ 98,121,116,101,99,111,100,101,44,32,115,101,116,95,100,97,
+ 116,97,32,109,117,115,116,32,97,108,115,111,32,98,101,32,
+ 105,109,112,108,101,109,101,110,116,101,100,46,10,10,32,32,
+- 32,32,32,32,32,32,78,70,84,114,193,0,0,0,114,183,
+- 0,0,0,114,169,0,0,0,114,4,0,0,0,114,0,0,
+- 0,0,114,45,0,0,0,90,5,110,101,118,101,114,90,6,
++ 32,32,32,32,32,32,78,70,84,114,194,0,0,0,114,184,
++ 0,0,0,114,170,0,0,0,114,4,0,0,0,114,0,0,
++ 0,0,114,46,0,0,0,90,5,110,101,118,101,114,90,6,
+ 97,108,119,97,121,115,218,4,115,105,122,101,122,13,123,125,
+- 32,109,97,116,99,104,101,115,32,123,125,41,3,114,140,0,
+- 0,0,114,131,0,0,0,114,133,0,0,0,122,19,99,111,
++ 32,109,97,116,99,104,101,115,32,123,125,41,3,114,141,0,
++ 0,0,114,132,0,0,0,114,134,0,0,0,122,19,99,111,
+ 100,101,32,111,98,106,101,99,116,32,102,114,111,109,32,123,
+- 125,41,27,114,203,0,0,0,114,120,0,0,0,114,106,0,
+- 0,0,114,247,0,0,0,114,76,0,0,0,114,36,0,0,
+- 0,114,250,0,0,0,114,176,0,0,0,218,10,109,101,109,
+- 111,114,121,118,105,101,119,114,187,0,0,0,90,21,99,104,
++ 125,41,27,114,204,0,0,0,114,121,0,0,0,114,107,0,
++ 0,0,114,248,0,0,0,114,77,0,0,0,114,37,0,0,
++ 0,114,251,0,0,0,114,177,0,0,0,218,10,109,101,109,
++ 111,114,121,118,105,101,119,114,188,0,0,0,90,21,99,104,
+ 101,99,107,95,104,97,115,104,95,98,97,115,101,100,95,112,
+- 121,99,115,114,181,0,0,0,218,17,95,82,65,87,95,77,
+- 65,71,73,67,95,78,85,77,66,69,82,114,182,0,0,0,
+- 114,180,0,0,0,114,141,0,0,0,114,174,0,0,0,114,
+- 158,0,0,0,114,173,0,0,0,114,189,0,0,0,114,0,
++ 121,99,115,114,182,0,0,0,218,17,95,82,65,87,95,77,
++ 65,71,73,67,95,78,85,77,66,69,82,114,183,0,0,0,
++ 114,181,0,0,0,114,142,0,0,0,114,175,0,0,0,114,
++ 159,0,0,0,114,174,0,0,0,114,190,0,0,0,114,1,
+ 1,0,0,114,21,0,0,0,218,19,100,111,110,116,95,119,
+- 114,105,116,101,95,98,121,116,101,99,111,100,101,114,195,0,
+- 0,0,114,194,0,0,0,114,6,0,0,0,114,249,0,0,
+- 0,41,15,114,142,0,0,0,114,163,0,0,0,114,133,0,
+- 0,0,114,178,0,0,0,114,198,0,0,0,114,181,0,0,
++ 114,105,116,101,95,98,121,116,101,99,111,100,101,114,196,0,
++ 0,0,114,195,0,0,0,114,6,0,0,0,114,250,0,0,
++ 0,41,15,114,143,0,0,0,114,164,0,0,0,114,134,0,
++ 0,0,114,179,0,0,0,114,199,0,0,0,114,182,0,0,
+ 0,90,10,104,97,115,104,95,98,97,115,101,100,90,12,99,
+- 104,101,99,107,95,115,111,117,114,99,101,114,131,0,0,0,
+- 218,2,115,116,114,43,0,0,0,114,175,0,0,0,114,22,
++ 104,101,99,107,95,115,111,117,114,99,101,114,132,0,0,0,
++ 218,2,115,116,114,44,0,0,0,114,176,0,0,0,114,22,
+ 0,0,0,90,10,98,121,116,101,115,95,100,97,116,97,90,
+ 11,99,111,100,101,95,111,98,106,101,99,116,114,10,0,0,
+- 0,114,10,0,0,0,114,11,0,0,0,114,236,0,0,0,
++ 0,114,10,0,0,0,114,11,0,0,0,114,237,0,0,0,
+ 148,3,0,0,115,152,0,0,0,0,7,10,1,4,1,4,
+ 1,4,1,4,1,4,1,2,1,12,1,12,1,12,2,2,
+ 1,14,1,12,1,8,2,12,1,2,1,14,1,12,1,6,
+@@ -1458,13 +1458,13 @@ const unsigned char _Py_M__importlib_bootstrap_external[] = {
+ 1,12,1,12,1,18,1,6,255,4,2,6,1,10,1,10,
+ 1,14,2,6,1,6,255,4,2,2,1,18,1,14,1,6,
+ 1,122,21,83,111,117,114,99,101,76,111,97,100,101,114,46,
+- 103,101,116,95,99,111,100,101,78,41,10,114,149,0,0,0,
+- 114,148,0,0,0,114,150,0,0,0,114,246,0,0,0,114,
+- 247,0,0,0,114,249,0,0,0,114,248,0,0,0,114,252,
+- 0,0,0,114,0,1,0,0,114,236,0,0,0,114,10,0,
++ 103,101,116,95,99,111,100,101,78,41,10,114,150,0,0,0,
++ 114,149,0,0,0,114,151,0,0,0,114,247,0,0,0,114,
++ 248,0,0,0,114,250,0,0,0,114,249,0,0,0,114,253,
++ 0,0,0,114,1,1,0,0,114,237,0,0,0,114,10,0,
+ 0,0,114,10,0,0,0,114,10,0,0,0,114,11,0,0,
+- 0,114,244,0,0,0,89,3,0,0,115,14,0,0,0,8,
+- 2,8,8,8,14,8,10,8,7,8,10,14,8,114,244,0,
++ 0,114,245,0,0,0,89,3,0,0,115,14,0,0,0,8,
++ 2,8,8,8,14,8,10,8,7,8,10,14,8,114,245,0,
+ 0,0,99,0,0,0,0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,4,0,0,0,0,0,0,0,115,124,0,0,0,
+ 101,0,90,1,100,0,90,2,100,1,90,3,100,2,100,3,
+@@ -1490,16 +1490,16 @@ const unsigned char _Py_M__importlib_bootstrap_external[] = {
+ 104,101,32,112,97,116,104,32,116,111,32,116,104,101,32,102,
+ 105,108,101,32,102,111,117,110,100,32,98,121,32,116,104,101,
+ 10,32,32,32,32,32,32,32,32,102,105,110,100,101,114,46,
+- 78,114,183,0,0,0,41,3,114,142,0,0,0,114,163,0,
+- 0,0,114,65,0,0,0,114,10,0,0,0,114,10,0,0,
+- 0,114,11,0,0,0,114,232,0,0,0,238,3,0,0,115,
++ 78,114,184,0,0,0,41,3,114,143,0,0,0,114,164,0,
++ 0,0,114,66,0,0,0,114,10,0,0,0,114,10,0,0,
++ 0,114,11,0,0,0,114,233,0,0,0,238,3,0,0,115,
+ 4,0,0,0,0,3,6,1,122,19,70,105,108,101,76,111,
+ 97,100,101,114,46,95,95,105,110,105,116,95,95,99,2,0,
+ 0,0,0,0,0,0,0,0,0,0,2,0,0,0,2,0,
+ 0,0,67,0,0,0,115,24,0,0,0,124,0,106,0,124,
+ 1,106,0,107,2,111,22,124,0,106,1,124,1,106,1,107,
+- 2,83,0,114,69,0,0,0,169,2,218,9,95,95,99,108,
+- 97,115,115,95,95,114,155,0,0,0,169,2,114,142,0,0,
++ 2,83,0,114,70,0,0,0,169,2,218,9,95,95,99,108,
++ 97,115,115,95,95,114,156,0,0,0,169,2,114,143,0,0,
+ 0,90,5,111,116,104,101,114,114,10,0,0,0,114,10,0,
+ 0,0,114,11,0,0,0,218,6,95,95,101,113,95,95,244,
+ 3,0,0,115,6,0,0,0,0,1,12,1,10,255,122,17,
+@@ -1507,8 +1507,8 @@ const unsigned char _Py_M__importlib_bootstrap_external[] = {
+ 95,99,1,0,0,0,0,0,0,0,0,0,0,0,1,0,
+ 0,0,3,0,0,0,67,0,0,0,115,20,0,0,0,116,
+ 0,124,0,106,1,131,1,116,0,124,0,106,2,131,1,65,
+- 0,83,0,114,69,0,0,0,169,3,218,4,104,97,115,104,
+- 114,140,0,0,0,114,65,0,0,0,169,1,114,142,0,0,
++ 0,83,0,114,70,0,0,0,169,3,218,4,104,97,115,104,
++ 114,141,0,0,0,114,66,0,0,0,169,1,114,143,0,0,
+ 0,114,10,0,0,0,114,10,0,0,0,114,11,0,0,0,
+ 218,8,95,95,104,97,115,104,95,95,248,3,0,0,115,2,
+ 0,0,0,0,1,122,19,70,105,108,101,76,111,97,100,101,
+@@ -1522,9 +1522,9 @@ const unsigned char _Py_M__importlib_bootstrap_external[] = {
+ 101,112,114,101,99,97,116,101,100,46,32,32,85,115,101,32,
+ 101,120,101,99,95,109,111,100,117,108,101,40,41,32,105,110,
+ 115,116,101,97,100,46,10,10,32,32,32,32,32,32,32,32,
+- 41,3,218,5,115,117,112,101,114,114,6,1,0,0,114,243,
+- 0,0,0,114,242,0,0,0,169,1,114,8,1,0,0,114,
+- 10,0,0,0,114,11,0,0,0,114,243,0,0,0,251,3,
++ 41,3,218,5,115,117,112,101,114,114,7,1,0,0,114,244,
++ 0,0,0,114,243,0,0,0,169,1,114,9,1,0,0,114,
++ 10,0,0,0,114,11,0,0,0,114,244,0,0,0,251,3,
+ 0,0,115,2,0,0,0,0,10,122,22,70,105,108,101,76,
+ 111,97,100,101,114,46,108,111,97,100,95,109,111,100,117,108,
+ 101,99,2,0,0,0,0,0,0,0,0,0,0,0,2,0,
+@@ -1533,8 +1533,8 @@ const unsigned char _Py_M__importlib_bootstrap_external[] = {
+ 116,104,101,32,112,97,116,104,32,116,111,32,116,104,101,32,
+ 115,111,117,114,99,101,32,102,105,108,101,32,97,115,32,102,
+ 111,117,110,100,32,98,121,32,116,104,101,32,102,105,110,100,
+- 101,114,46,114,71,0,0,0,114,242,0,0,0,114,10,0,
+- 0,0,114,10,0,0,0,114,11,0,0,0,114,203,0,0,
++ 101,114,46,114,72,0,0,0,114,243,0,0,0,114,10,0,
++ 0,0,114,10,0,0,0,114,11,0,0,0,114,204,0,0,
+ 0,7,4,0,0,115,2,0,0,0,0,3,122,23,70,105,
+ 108,101,76,111,97,100,101,114,46,103,101,116,95,102,105,108,
+ 101,110,97,109,101,99,2,0,0,0,0,0,0,0,0,0,
+@@ -1550,20 +1550,20 @@ const unsigned char _Py_M__importlib_bootstrap_external[] = {
+ 0,41,3,122,39,82,101,116,117,114,110,32,116,104,101,32,
+ 100,97,116,97,32,102,114,111,109,32,112,97,116,104,32,97,
+ 115,32,114,97,119,32,98,121,116,101,115,46,78,218,1,114,
+- 41,8,114,185,0,0,0,114,244,0,0,0,218,19,69,120,
++ 41,8,114,186,0,0,0,114,245,0,0,0,218,19,69,120,
+ 116,101,110,115,105,111,110,70,105,108,101,76,111,97,100,101,
+- 114,114,90,0,0,0,90,9,111,112,101,110,95,99,111,100,
+- 101,114,108,0,0,0,90,4,114,101,97,100,114,91,0,0,
+- 0,41,3,114,142,0,0,0,114,65,0,0,0,114,93,0,
++ 114,114,91,0,0,0,90,9,111,112,101,110,95,99,111,100,
++ 101,114,109,0,0,0,90,4,114,101,97,100,114,92,0,0,
++ 0,41,3,114,143,0,0,0,114,66,0,0,0,114,94,0,
+ 0,0,114,10,0,0,0,114,10,0,0,0,114,11,0,0,
+- 0,114,250,0,0,0,12,4,0,0,115,10,0,0,0,0,
++ 0,114,251,0,0,0,12,4,0,0,115,10,0,0,0,0,
+ 2,14,1,16,1,40,2,14,1,122,19,70,105,108,101,76,
+ 111,97,100,101,114,46,103,101,116,95,100,97,116,97,99,2,
+ 0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,3,
+ 0,0,0,67,0,0,0,115,18,0,0,0,124,0,160,0,
+- 124,1,161,1,114,14,124,0,83,0,100,0,83,0,114,69,
+- 0,0,0,41,1,114,206,0,0,0,169,2,114,142,0,0,
+- 0,114,239,0,0,0,114,10,0,0,0,114,10,0,0,0,
++ 124,1,161,1,114,14,124,0,83,0,100,0,83,0,114,70,
++ 0,0,0,41,1,114,207,0,0,0,169,2,114,143,0,0,
++ 0,114,240,0,0,0,114,10,0,0,0,114,10,0,0,0,
+ 114,11,0,0,0,218,19,103,101,116,95,114,101,115,111,117,
+ 114,99,101,95,114,101,97,100,101,114,23,4,0,0,115,6,
+ 0,0,0,0,2,10,1,4,1,122,30,70,105,108,101,76,
+@@ -1573,10 +1573,10 @@ const unsigned char _Py_M__importlib_bootstrap_external[] = {
+ 0,0,115,32,0,0,0,116,0,116,1,124,0,106,2,131,
+ 1,100,1,25,0,124,1,131,2,125,2,116,3,160,4,124,
+ 2,100,2,161,2,83,0,41,3,78,114,0,0,0,0,114,
+- 18,1,0,0,41,5,114,67,0,0,0,114,74,0,0,0,
+- 114,65,0,0,0,114,90,0,0,0,114,91,0,0,0,169,
+- 3,114,142,0,0,0,90,8,114,101,115,111,117,114,99,101,
+- 114,65,0,0,0,114,10,0,0,0,114,10,0,0,0,114,
++ 19,1,0,0,41,5,114,68,0,0,0,114,75,0,0,0,
++ 114,66,0,0,0,114,91,0,0,0,114,92,0,0,0,169,
++ 3,114,143,0,0,0,90,8,114,101,115,111,117,114,99,101,
++ 114,66,0,0,0,114,10,0,0,0,114,10,0,0,0,114,
+ 11,0,0,0,218,13,111,112,101,110,95,114,101,115,111,117,
+ 114,99,101,29,4,0,0,115,4,0,0,0,0,1,20,1,
+ 122,24,70,105,108,101,76,111,97,100,101,114,46,111,112,101,
+@@ -1587,8 +1587,8 @@ const unsigned char _Py_M__importlib_bootstrap_external[] = {
+ 100,1,25,0,124,1,131,2,125,2,124,2,83,0,169,2,
+ 78,114,0,0,0,0,41,5,218,11,105,115,95,114,101,115,
+ 111,117,114,99,101,218,17,70,105,108,101,78,111,116,70,111,
+- 117,110,100,69,114,114,111,114,114,67,0,0,0,114,74,0,
+- 0,0,114,65,0,0,0,114,22,1,0,0,114,10,0,0,
++ 117,110,100,69,114,114,111,114,114,68,0,0,0,114,75,0,
++ 0,0,114,66,0,0,0,114,23,1,0,0,114,10,0,0,
+ 0,114,10,0,0,0,114,11,0,0,0,218,13,114,101,115,
+ 111,117,114,99,101,95,112,97,116,104,33,4,0,0,115,8,
+ 0,0,0,0,1,10,1,4,1,20,1,122,24,70,105,108,
+@@ -1598,33 +1598,33 @@ const unsigned char _Py_M__importlib_bootstrap_external[] = {
+ 0,0,0,116,0,124,1,118,0,114,12,100,1,83,0,116,
+ 1,116,2,124,0,106,3,131,1,100,2,25,0,124,1,131,
+ 2,125,2,116,4,124,2,131,1,83,0,41,3,78,70,114,
+- 0,0,0,0,41,5,114,59,0,0,0,114,67,0,0,0,
+- 114,74,0,0,0,114,65,0,0,0,114,80,0,0,0,169,
+- 3,114,142,0,0,0,114,140,0,0,0,114,65,0,0,0,
++ 0,0,0,0,41,5,114,60,0,0,0,114,68,0,0,0,
++ 114,75,0,0,0,114,66,0,0,0,114,81,0,0,0,169,
++ 3,114,143,0,0,0,114,141,0,0,0,114,66,0,0,0,
+ 114,10,0,0,0,114,10,0,0,0,114,11,0,0,0,114,
+- 25,1,0,0,39,4,0,0,115,8,0,0,0,0,1,8,
++ 26,1,0,0,39,4,0,0,115,8,0,0,0,0,1,8,
+ 1,4,1,20,1,122,22,70,105,108,101,76,111,97,100,101,
+ 114,46,105,115,95,114,101,115,111,117,114,99,101,99,1,0,
+ 0,0,0,0,0,0,0,0,0,0,1,0,0,0,5,0,
+ 0,0,67,0,0,0,115,24,0,0,0,116,0,116,1,160,
+ 2,116,3,124,0,106,4,131,1,100,1,25,0,161,1,131,
+- 1,83,0,114,24,1,0,0,41,5,218,4,105,116,101,114,
+- 114,24,0,0,0,218,7,108,105,115,116,100,105,114,114,74,
+- 0,0,0,114,65,0,0,0,114,13,1,0,0,114,10,0,
++ 1,83,0,114,25,1,0,0,41,5,218,4,105,116,101,114,
++ 114,24,0,0,0,218,7,108,105,115,116,100,105,114,114,75,
++ 0,0,0,114,66,0,0,0,114,14,1,0,0,114,10,0,
+ 0,0,114,10,0,0,0,114,11,0,0,0,218,8,99,111,
+ 110,116,101,110,116,115,45,4,0,0,115,2,0,0,0,0,
+ 1,122,19,70,105,108,101,76,111,97,100,101,114,46,99,111,
+- 110,116,101,110,116,115,41,17,114,149,0,0,0,114,148,0,
+- 0,0,114,150,0,0,0,114,151,0,0,0,114,232,0,0,
+- 0,114,10,1,0,0,114,14,1,0,0,114,160,0,0,0,
+- 114,243,0,0,0,114,203,0,0,0,114,250,0,0,0,114,
+- 21,1,0,0,114,23,1,0,0,114,27,1,0,0,114,25,
+- 1,0,0,114,31,1,0,0,90,13,95,95,99,108,97,115,
++ 110,116,101,110,116,115,41,17,114,150,0,0,0,114,149,0,
++ 0,0,114,151,0,0,0,114,152,0,0,0,114,233,0,0,
++ 0,114,11,1,0,0,114,15,1,0,0,114,161,0,0,0,
++ 114,244,0,0,0,114,204,0,0,0,114,251,0,0,0,114,
++ 22,1,0,0,114,24,1,0,0,114,28,1,0,0,114,26,
++ 1,0,0,114,32,1,0,0,90,13,95,95,99,108,97,115,
+ 115,99,101,108,108,95,95,114,10,0,0,0,114,10,0,0,
+- 0,114,16,1,0,0,114,11,0,0,0,114,6,1,0,0,
++ 0,114,17,1,0,0,114,11,0,0,0,114,7,1,0,0,
+ 233,3,0,0,115,30,0,0,0,8,2,4,3,8,6,8,
+ 4,8,3,2,1,14,11,2,1,10,4,8,11,2,1,10,
+- 5,8,4,8,6,8,6,114,6,1,0,0,99,0,0,0,
++ 5,8,4,8,6,8,6,114,7,1,0,0,99,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,0,0,0,3,0,0,
+ 0,64,0,0,0,115,46,0,0,0,101,0,90,1,100,0,
+ 90,2,100,1,90,3,100,2,100,3,132,0,90,4,100,4,
+@@ -1640,25 +1640,25 @@ const unsigned char _Py_M__importlib_bootstrap_external[] = {
+ 125,2,124,2,106,1,124,2,106,2,100,1,156,2,83,0,
+ 41,2,122,33,82,101,116,117,114,110,32,116,104,101,32,109,
+ 101,116,97,100,97,116,97,32,102,111,114,32,116,104,101,32,
+- 112,97,116,104,46,41,2,114,193,0,0,0,114,1,1,0,
+- 0,41,3,114,75,0,0,0,218,8,115,116,95,109,116,105,
+- 109,101,90,7,115,116,95,115,105,122,101,41,3,114,142,0,
+- 0,0,114,65,0,0,0,114,5,1,0,0,114,10,0,0,
+- 0,114,10,0,0,0,114,11,0,0,0,114,247,0,0,0,
++ 112,97,116,104,46,41,2,114,194,0,0,0,114,2,1,0,
++ 0,41,3,114,76,0,0,0,218,8,115,116,95,109,116,105,
++ 109,101,90,7,115,116,95,115,105,122,101,41,3,114,143,0,
++ 0,0,114,66,0,0,0,114,6,1,0,0,114,10,0,0,
++ 0,114,10,0,0,0,114,11,0,0,0,114,248,0,0,0,
+ 53,4,0,0,115,4,0,0,0,0,2,8,1,122,27,83,
+ 111,117,114,99,101,70,105,108,101,76,111,97,100,101,114,46,
+ 112,97,116,104,95,115,116,97,116,115,99,4,0,0,0,0,
+ 0,0,0,0,0,0,0,5,0,0,0,5,0,0,0,67,
+ 0,0,0,115,24,0,0,0,116,0,124,1,131,1,125,4,
+ 124,0,106,1,124,2,124,3,124,4,100,1,141,3,83,0,
+- 41,2,78,169,1,218,5,95,109,111,100,101,41,2,114,138,
+- 0,0,0,114,248,0,0,0,41,5,114,142,0,0,0,114,
+- 133,0,0,0,114,131,0,0,0,114,43,0,0,0,114,78,
++ 41,2,78,169,1,218,5,95,109,111,100,101,41,2,114,139,
++ 0,0,0,114,249,0,0,0,41,5,114,143,0,0,0,114,
++ 134,0,0,0,114,132,0,0,0,114,44,0,0,0,114,79,
+ 0,0,0,114,10,0,0,0,114,10,0,0,0,114,11,0,
+- 0,0,114,249,0,0,0,58,4,0,0,115,4,0,0,0,
++ 0,0,114,250,0,0,0,58,4,0,0,115,4,0,0,0,
+ 0,2,8,1,122,32,83,111,117,114,99,101,70,105,108,101,
+ 76,111,97,100,101,114,46,95,99,97,99,104,101,95,98,121,
+- 116,101,99,111,100,101,114,86,0,0,0,114,34,1,0,0,
++ 116,101,99,111,100,101,114,87,0,0,0,114,35,1,0,0,
+ 99,3,0,0,0,0,0,0,0,1,0,0,0,9,0,0,
+ 0,11,0,0,0,67,0,0,0,115,252,0,0,0,116,0,
+ 124,1,131,1,92,2,125,4,125,5,103,0,125,6,124,4,
+@@ -1681,26 +1681,26 @@ const unsigned char _Py_M__importlib_bootstrap_external[] = {
+ 111,32,97,32,102,105,108,101,46,122,27,99,111,117,108,100,
+ 32,110,111,116,32,99,114,101,97,116,101,32,123,33,114,125,
+ 58,32,123,33,114,125,78,122,12,99,114,101,97,116,101,100,
+- 32,123,33,114,125,41,12,114,74,0,0,0,114,82,0,0,
+- 0,114,61,0,0,0,218,8,114,101,118,101,114,115,101,100,
+- 114,67,0,0,0,114,24,0,0,0,90,5,109,107,100,105,
++ 32,123,33,114,125,41,12,114,75,0,0,0,114,83,0,0,
++ 0,114,62,0,0,0,218,8,114,101,118,101,114,115,101,100,
++ 114,68,0,0,0,114,24,0,0,0,90,5,109,107,100,105,
+ 114,218,15,70,105,108,101,69,120,105,115,116,115,69,114,114,
+- 111,114,114,76,0,0,0,114,158,0,0,0,114,173,0,0,
+- 0,114,94,0,0,0,41,9,114,142,0,0,0,114,65,0,
+- 0,0,114,43,0,0,0,114,35,1,0,0,218,6,112,97,
+- 114,101,110,116,114,119,0,0,0,114,63,0,0,0,114,68,
+- 0,0,0,114,251,0,0,0,114,10,0,0,0,114,10,0,
+- 0,0,114,11,0,0,0,114,248,0,0,0,63,4,0,0,
++ 111,114,114,77,0,0,0,114,159,0,0,0,114,174,0,0,
++ 0,114,95,0,0,0,41,9,114,143,0,0,0,114,66,0,
++ 0,0,114,44,0,0,0,114,36,1,0,0,218,6,112,97,
++ 114,101,110,116,114,120,0,0,0,114,64,0,0,0,114,69,
++ 0,0,0,114,252,0,0,0,114,10,0,0,0,114,10,0,
++ 0,0,114,11,0,0,0,114,249,0,0,0,63,4,0,0,
+ 115,46,0,0,0,0,2,12,1,4,2,12,1,12,1,12,
+ 2,12,1,10,1,2,1,14,1,12,2,8,1,14,3,6,
+ 1,4,255,4,2,28,1,2,1,12,1,16,1,16,2,8,
+ 1,2,255,122,25,83,111,117,114,99,101,70,105,108,101,76,
+ 111,97,100,101,114,46,115,101,116,95,100,97,116,97,78,41,
+- 7,114,149,0,0,0,114,148,0,0,0,114,150,0,0,0,
+- 114,151,0,0,0,114,247,0,0,0,114,249,0,0,0,114,
+- 248,0,0,0,114,10,0,0,0,114,10,0,0,0,114,10,
+- 0,0,0,114,11,0,0,0,114,32,1,0,0,49,4,0,
+- 0,115,8,0,0,0,8,2,4,2,8,5,8,5,114,32,
++ 7,114,150,0,0,0,114,149,0,0,0,114,151,0,0,0,
++ 114,152,0,0,0,114,248,0,0,0,114,250,0,0,0,114,
++ 249,0,0,0,114,10,0,0,0,114,10,0,0,0,114,10,
++ 0,0,0,114,11,0,0,0,114,33,1,0,0,49,4,0,
++ 0,115,8,0,0,0,8,2,4,2,8,5,8,5,114,33,
+ 1,0,0,99,0,0,0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,2,0,0,0,64,0,0,0,115,32,0,0,
+ 0,101,0,90,1,100,0,90,2,100,1,90,3,100,2,100,
+@@ -1715,13 +1715,13 @@ const unsigned char _Py_M__importlib_bootstrap_external[] = {
+ 124,0,160,1,124,2,161,1,125,3,124,1,124,2,100,1,
+ 156,2,125,4,116,2,124,3,124,1,124,4,131,3,1,0,
+ 116,3,116,4,124,3,131,1,100,2,100,0,133,2,25,0,
+- 124,1,124,2,100,3,141,3,83,0,41,4,78,114,183,0,
+- 0,0,114,169,0,0,0,41,2,114,140,0,0,0,114,131,
+- 0,0,0,41,5,114,203,0,0,0,114,250,0,0,0,114,
+- 176,0,0,0,114,189,0,0,0,114,2,1,0,0,41,5,
+- 114,142,0,0,0,114,163,0,0,0,114,65,0,0,0,114,
+- 43,0,0,0,114,175,0,0,0,114,10,0,0,0,114,10,
+- 0,0,0,114,11,0,0,0,114,236,0,0,0,98,4,0,
++ 124,1,124,2,100,3,141,3,83,0,41,4,78,114,184,0,
++ 0,0,114,170,0,0,0,41,2,114,141,0,0,0,114,132,
++ 0,0,0,41,5,114,204,0,0,0,114,251,0,0,0,114,
++ 177,0,0,0,114,190,0,0,0,114,3,1,0,0,41,5,
++ 114,143,0,0,0,114,164,0,0,0,114,66,0,0,0,114,
++ 44,0,0,0,114,176,0,0,0,114,10,0,0,0,114,10,
++ 0,0,0,114,11,0,0,0,114,237,0,0,0,98,4,0,
+ 0,115,22,0,0,0,0,1,10,1,10,4,2,1,2,254,
+ 6,4,12,1,2,1,14,1,2,1,2,253,122,29,83,111,
+ 117,114,99,101,108,101,115,115,70,105,108,101,76,111,97,100,
+@@ -1730,16 +1730,16 @@ const unsigned char _Py_M__importlib_bootstrap_external[] = {
+ 67,0,0,0,115,4,0,0,0,100,1,83,0,41,2,122,
+ 39,82,101,116,117,114,110,32,78,111,110,101,32,97,115,32,
+ 116,104,101,114,101,32,105,115,32,110,111,32,115,111,117,114,
+- 99,101,32,99,111,100,101,46,78,114,10,0,0,0,114,242,
++ 99,101,32,99,111,100,101,46,78,114,10,0,0,0,114,243,
+ 0,0,0,114,10,0,0,0,114,10,0,0,0,114,11,0,
+- 0,0,114,252,0,0,0,114,4,0,0,115,2,0,0,0,
++ 0,0,114,253,0,0,0,114,4,0,0,115,2,0,0,0,
+ 0,2,122,31,83,111,117,114,99,101,108,101,115,115,70,105,
+ 108,101,76,111,97,100,101,114,46,103,101,116,95,115,111,117,
+- 114,99,101,78,41,6,114,149,0,0,0,114,148,0,0,0,
+- 114,150,0,0,0,114,151,0,0,0,114,236,0,0,0,114,
+- 252,0,0,0,114,10,0,0,0,114,10,0,0,0,114,10,
+- 0,0,0,114,11,0,0,0,114,39,1,0,0,94,4,0,
+- 0,115,6,0,0,0,8,2,4,2,8,16,114,39,1,0,
++ 114,99,101,78,41,6,114,150,0,0,0,114,149,0,0,0,
++ 114,151,0,0,0,114,152,0,0,0,114,237,0,0,0,114,
++ 253,0,0,0,114,10,0,0,0,114,10,0,0,0,114,10,
++ 0,0,0,114,11,0,0,0,114,40,1,0,0,94,4,0,
++ 0,115,6,0,0,0,8,2,4,2,8,16,114,40,1,0,
+ 0,99,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+ 0,0,3,0,0,0,64,0,0,0,115,92,0,0,0,101,
+ 0,90,1,100,0,90,2,100,1,90,3,100,2,100,3,132,
+@@ -1747,7 +1747,7 @@ const unsigned char _Py_M__importlib_bootstrap_external[] = {
+ 0,90,6,100,8,100,9,132,0,90,7,100,10,100,11,132,
+ 0,90,8,100,12,100,13,132,0,90,9,100,14,100,15,132,
+ 0,90,10,100,16,100,17,132,0,90,11,101,12,100,18,100,
+- 19,132,0,131,1,90,13,100,20,83,0,41,21,114,19,1,
++ 19,132,0,131,1,90,13,100,20,83,0,41,21,114,20,1,
+ 0,0,122,93,76,111,97,100,101,114,32,102,111,114,32,101,
+ 120,116,101,110,115,105,111,110,32,109,111,100,117,108,101,115,
+ 46,10,10,32,32,32,32,84,104,101,32,99,111,110,115,116,
+@@ -1759,28 +1759,28 @@ const unsigned char _Py_M__importlib_bootstrap_external[] = {
+ 1,124,0,95,0,116,1,124,2,131,1,115,52,122,18,116,
+ 2,116,3,160,4,161,0,124,2,131,2,125,2,87,0,110,
+ 18,4,0,116,5,121,50,1,0,1,0,1,0,89,0,110,
+- 2,48,0,124,2,124,0,95,6,100,0,83,0,114,69,0,
+- 0,0,41,7,114,140,0,0,0,114,85,0,0,0,114,67,
+- 0,0,0,114,24,0,0,0,114,81,0,0,0,114,76,0,
+- 0,0,114,65,0,0,0,114,28,1,0,0,114,10,0,0,
+- 0,114,10,0,0,0,114,11,0,0,0,114,232,0,0,0,
++ 2,48,0,124,2,124,0,95,6,100,0,83,0,114,70,0,
++ 0,0,41,7,114,141,0,0,0,114,86,0,0,0,114,68,
++ 0,0,0,114,24,0,0,0,114,82,0,0,0,114,77,0,
++ 0,0,114,66,0,0,0,114,29,1,0,0,114,10,0,0,
++ 0,114,10,0,0,0,114,11,0,0,0,114,233,0,0,0,
+ 131,4,0,0,115,14,0,0,0,0,1,6,1,8,1,2,
+ 1,18,1,12,1,6,1,122,28,69,120,116,101,110,115,105,
+ 111,110,70,105,108,101,76,111,97,100,101,114,46,95,95,105,
+ 110,105,116,95,95,99,2,0,0,0,0,0,0,0,0,0,
+ 0,0,2,0,0,0,2,0,0,0,67,0,0,0,115,24,
+ 0,0,0,124,0,106,0,124,1,106,0,107,2,111,22,124,
+- 0,106,1,124,1,106,1,107,2,83,0,114,69,0,0,0,
+- 114,7,1,0,0,114,9,1,0,0,114,10,0,0,0,114,
+- 10,0,0,0,114,11,0,0,0,114,10,1,0,0,140,4,
++ 0,106,1,124,1,106,1,107,2,83,0,114,70,0,0,0,
++ 114,8,1,0,0,114,10,1,0,0,114,10,0,0,0,114,
++ 10,0,0,0,114,11,0,0,0,114,11,1,0,0,140,4,
+ 0,0,115,6,0,0,0,0,1,12,1,10,255,122,26,69,
+ 120,116,101,110,115,105,111,110,70,105,108,101,76,111,97,100,
+ 101,114,46,95,95,101,113,95,95,99,1,0,0,0,0,0,
+ 0,0,0,0,0,0,1,0,0,0,3,0,0,0,67,0,
+ 0,0,115,20,0,0,0,116,0,124,0,106,1,131,1,116,
+- 0,124,0,106,2,131,1,65,0,83,0,114,69,0,0,0,
+- 114,11,1,0,0,114,13,1,0,0,114,10,0,0,0,114,
+- 10,0,0,0,114,11,0,0,0,114,14,1,0,0,144,4,
++ 0,124,0,106,2,131,1,65,0,83,0,114,70,0,0,0,
++ 114,12,1,0,0,114,14,1,0,0,114,10,0,0,0,114,
++ 10,0,0,0,114,11,0,0,0,114,15,1,0,0,144,4,
+ 0,0,115,2,0,0,0,0,1,122,28,69,120,116,101,110,
+ 115,105,111,110,70,105,108,101,76,111,97,100,101,114,46,95,
+ 95,104,97,115,104,95,95,99,2,0,0,0,0,0,0,0,
+@@ -1792,12 +1792,12 @@ const unsigned char _Py_M__importlib_bootstrap_external[] = {
+ 101,100,32,101,120,116,101,110,115,105,111,110,32,109,111,100,
+ 117,108,101,122,38,101,120,116,101,110,115,105,111,110,32,109,
+ 111,100,117,108,101,32,123,33,114,125,32,108,111,97,100,101,
+- 100,32,102,114,111,109,32,123,33,114,125,41,7,114,158,0,
+- 0,0,114,237,0,0,0,114,187,0,0,0,90,14,99,114,
+- 101,97,116,101,95,100,121,110,97,109,105,99,114,173,0,0,
+- 0,114,140,0,0,0,114,65,0,0,0,41,3,114,142,0,
+- 0,0,114,210,0,0,0,114,239,0,0,0,114,10,0,0,
+- 0,114,10,0,0,0,114,11,0,0,0,114,235,0,0,0,
++ 100,32,102,114,111,109,32,123,33,114,125,41,7,114,159,0,
++ 0,0,114,238,0,0,0,114,188,0,0,0,90,14,99,114,
++ 101,97,116,101,95,100,121,110,97,109,105,99,114,174,0,0,
++ 0,114,141,0,0,0,114,66,0,0,0,41,3,114,143,0,
++ 0,0,114,211,0,0,0,114,240,0,0,0,114,10,0,0,
++ 0,114,10,0,0,0,114,11,0,0,0,114,236,0,0,0,
+ 147,4,0,0,115,14,0,0,0,0,2,4,1,6,255,4,
+ 2,6,1,8,255,4,2,122,33,69,120,116,101,110,115,105,
+ 111,110,70,105,108,101,76,111,97,100,101,114,46,99,114,101,
+@@ -1810,11 +1810,11 @@ const unsigned char _Py_M__importlib_bootstrap_external[] = {
+ 116,101,110,115,105,111,110,32,109,111,100,117,108,101,122,40,
+ 101,120,116,101,110,115,105,111,110,32,109,111,100,117,108,101,
+ 32,123,33,114,125,32,101,120,101,99,117,116,101,100,32,102,
+- 114,111,109,32,123,33,114,125,78,41,7,114,158,0,0,0,
+- 114,237,0,0,0,114,187,0,0,0,90,12,101,120,101,99,
+- 95,100,121,110,97,109,105,99,114,173,0,0,0,114,140,0,
+- 0,0,114,65,0,0,0,114,20,1,0,0,114,10,0,0,
+- 0,114,10,0,0,0,114,11,0,0,0,114,240,0,0,0,
++ 114,111,109,32,123,33,114,125,78,41,7,114,159,0,0,0,
++ 114,238,0,0,0,114,188,0,0,0,90,12,101,120,101,99,
++ 95,100,121,110,97,109,105,99,114,174,0,0,0,114,141,0,
++ 0,0,114,66,0,0,0,114,21,1,0,0,114,10,0,0,
++ 0,114,10,0,0,0,114,11,0,0,0,114,241,0,0,0,
+ 155,4,0,0,115,8,0,0,0,0,2,14,1,6,1,8,
+ 255,122,31,69,120,116,101,110,115,105,111,110,70,105,108,101,
+ 76,111,97,100,101,114,46,101,120,101,99,95,109,111,100,117,
+@@ -1829,7 +1829,7 @@ const unsigned char _Py_M__importlib_bootstrap_external[] = {
+ 0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,4,
+ 0,0,0,51,0,0,0,115,26,0,0,0,124,0,93,18,
+ 125,1,136,0,100,0,124,1,23,0,107,2,86,0,1,0,
+- 113,2,100,1,83,0,41,2,114,232,0,0,0,78,114,10,
++ 113,2,100,1,83,0,41,2,114,233,0,0,0,78,114,10,
+ 0,0,0,169,2,114,8,0,0,0,218,6,115,117,102,102,
+ 105,120,169,1,90,9,102,105,108,101,95,110,97,109,101,114,
+ 10,0,0,0,114,11,0,0,0,114,12,0,0,0,164,4,
+@@ -1837,10 +1837,10 @@ const unsigned char _Py_M__importlib_bootstrap_external[] = {
+ 101,110,115,105,111,110,70,105,108,101,76,111,97,100,101,114,
+ 46,105,115,95,112,97,99,107,97,103,101,46,60,108,111,99,
+ 97,108,115,62,46,60,103,101,110,101,120,112,114,62,41,4,
+- 114,74,0,0,0,114,65,0,0,0,218,3,97,110,121,218,
++ 114,75,0,0,0,114,66,0,0,0,218,3,97,110,121,218,
+ 18,69,88,84,69,78,83,73,79,78,95,83,85,70,70,73,
+- 88,69,83,114,242,0,0,0,114,10,0,0,0,114,42,1,
+- 0,0,114,11,0,0,0,114,206,0,0,0,161,4,0,0,
++ 88,69,83,114,243,0,0,0,114,10,0,0,0,114,43,1,
++ 0,0,114,11,0,0,0,114,207,0,0,0,161,4,0,0,
+ 115,8,0,0,0,0,2,14,1,12,1,2,255,122,30,69,
+ 120,116,101,110,115,105,111,110,70,105,108,101,76,111,97,100,
+ 101,114,46,105,115,95,112,97,99,107,97,103,101,99,2,0,
+@@ -1850,8 +1850,8 @@ const unsigned char _Py_M__importlib_bootstrap_external[] = {
+ 115,32,97,110,32,101,120,116,101,110,115,105,111,110,32,109,
+ 111,100,117,108,101,32,99,97,110,110,111,116,32,99,114,101,
+ 97,116,101,32,97,32,99,111,100,101,32,111,98,106,101,99,
+- 116,46,78,114,10,0,0,0,114,242,0,0,0,114,10,0,
+- 0,0,114,10,0,0,0,114,11,0,0,0,114,236,0,0,
++ 116,46,78,114,10,0,0,0,114,243,0,0,0,114,10,0,
++ 0,0,114,10,0,0,0,114,11,0,0,0,114,237,0,0,
+ 0,167,4,0,0,115,2,0,0,0,0,2,122,28,69,120,
+ 116,101,110,115,105,111,110,70,105,108,101,76,111,97,100,101,
+ 114,46,103,101,116,95,99,111,100,101,99,2,0,0,0,0,
+@@ -1860,27 +1860,27 @@ const unsigned char _Py_M__importlib_bootstrap_external[] = {
+ 82,101,116,117,114,110,32,78,111,110,101,32,97,115,32,101,
+ 120,116,101,110,115,105,111,110,32,109,111,100,117,108,101,115,
+ 32,104,97,118,101,32,110,111,32,115,111,117,114,99,101,32,
+- 99,111,100,101,46,78,114,10,0,0,0,114,242,0,0,0,
++ 99,111,100,101,46,78,114,10,0,0,0,114,243,0,0,0,
+ 114,10,0,0,0,114,10,0,0,0,114,11,0,0,0,114,
+- 252,0,0,0,171,4,0,0,115,2,0,0,0,0,2,122,
++ 253,0,0,0,171,4,0,0,115,2,0,0,0,0,2,122,
+ 30,69,120,116,101,110,115,105,111,110,70,105,108,101,76,111,
+ 97,100,101,114,46,103,101,116,95,115,111,117,114,99,101,99,
+ 2,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,
+ 1,0,0,0,67,0,0,0,115,6,0,0,0,124,0,106,
+- 0,83,0,114,17,1,0,0,114,71,0,0,0,114,242,0,
++ 0,83,0,114,18,1,0,0,114,72,0,0,0,114,243,0,
+ 0,0,114,10,0,0,0,114,10,0,0,0,114,11,0,0,
+- 0,114,203,0,0,0,175,4,0,0,115,2,0,0,0,0,
++ 0,114,204,0,0,0,175,4,0,0,115,2,0,0,0,0,
+ 3,122,32,69,120,116,101,110,115,105,111,110,70,105,108,101,
+ 76,111,97,100,101,114,46,103,101,116,95,102,105,108,101,110,
+- 97,109,101,78,41,14,114,149,0,0,0,114,148,0,0,0,
+- 114,150,0,0,0,114,151,0,0,0,114,232,0,0,0,114,
+- 10,1,0,0,114,14,1,0,0,114,235,0,0,0,114,240,
+- 0,0,0,114,206,0,0,0,114,236,0,0,0,114,252,0,
+- 0,0,114,160,0,0,0,114,203,0,0,0,114,10,0,0,
++ 97,109,101,78,41,14,114,150,0,0,0,114,149,0,0,0,
++ 114,151,0,0,0,114,152,0,0,0,114,233,0,0,0,114,
++ 11,1,0,0,114,15,1,0,0,114,236,0,0,0,114,241,
++ 0,0,0,114,207,0,0,0,114,237,0,0,0,114,253,0,
++ 0,0,114,161,0,0,0,114,204,0,0,0,114,10,0,0,
+ 0,114,10,0,0,0,114,10,0,0,0,114,11,0,0,0,
+- 114,19,1,0,0,123,4,0,0,115,22,0,0,0,8,2,
++ 114,20,1,0,0,123,4,0,0,115,22,0,0,0,8,2,
+ 4,6,8,9,8,4,8,3,8,8,8,6,8,6,8,4,
+- 8,4,2,1,114,19,1,0,0,99,0,0,0,0,0,0,
++ 8,4,2,1,114,20,1,0,0,99,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,2,0,0,0,64,0,
+ 0,0,115,104,0,0,0,101,0,90,1,100,0,90,2,100,
+ 1,90,3,100,2,100,3,132,0,90,4,100,4,100,5,132,
+@@ -1912,15 +1912,15 @@ const unsigned char _Py_M__importlib_bootstrap_external[] = {
+ 0,0,0,0,0,0,0,0,0,4,0,0,0,3,0,0,
+ 0,67,0,0,0,115,36,0,0,0,124,1,124,0,95,0,
+ 124,2,124,0,95,1,116,2,124,0,160,3,161,0,131,1,
+- 124,0,95,4,124,3,124,0,95,5,100,0,83,0,114,69,
++ 124,0,95,4,124,3,124,0,95,5,100,0,83,0,114,70,
+ 0,0,0,41,6,218,5,95,110,97,109,101,218,5,95,112,
+- 97,116,104,114,135,0,0,0,218,16,95,103,101,116,95,112,
++ 97,116,104,114,136,0,0,0,218,16,95,103,101,116,95,112,
+ 97,114,101,110,116,95,112,97,116,104,218,17,95,108,97,115,
+ 116,95,112,97,114,101,110,116,95,112,97,116,104,218,12,95,
+- 112,97,116,104,95,102,105,110,100,101,114,169,4,114,142,0,
+- 0,0,114,140,0,0,0,114,65,0,0,0,90,11,112,97,
++ 112,97,116,104,95,102,105,110,100,101,114,169,4,114,143,0,
++ 0,0,114,141,0,0,0,114,66,0,0,0,90,11,112,97,
+ 116,104,95,102,105,110,100,101,114,114,10,0,0,0,114,10,
+- 0,0,0,114,11,0,0,0,114,232,0,0,0,188,4,0,
++ 0,0,0,114,11,0,0,0,114,233,0,0,0,188,4,0,
+ 0,115,8,0,0,0,0,1,6,1,6,1,14,1,122,23,
+ 95,78,97,109,101,115,112,97,99,101,80,97,116,104,46,95,
+ 95,105,110,105,116,95,95,99,1,0,0,0,0,0,0,0,
+@@ -1931,11 +1931,11 @@ const unsigned char _Py_M__importlib_bootstrap_external[] = {
+ 101,116,117,114,110,115,32,97,32,116,117,112,108,101,32,111,
+ 102,32,40,112,97,114,101,110,116,45,109,111,100,117,108,101,
+ 45,110,97,109,101,44,32,112,97,114,101,110,116,45,112,97,
+- 116,104,45,97,116,116,114,45,110,97,109,101,41,114,96,0,
+- 0,0,114,14,0,0,0,41,2,114,21,0,0,0,114,65,
++ 116,104,45,97,116,116,114,45,110,97,109,101,41,114,97,0,
++ 0,0,114,14,0,0,0,41,2,114,21,0,0,0,114,66,
+ 0,0,0,90,8,95,95,112,97,116,104,95,95,41,2,114,
+- 46,1,0,0,114,103,0,0,0,41,4,114,142,0,0,0,
+- 114,38,1,0,0,218,3,100,111,116,90,2,109,101,114,10,
++ 47,1,0,0,114,104,0,0,0,41,4,114,143,0,0,0,
++ 114,39,1,0,0,218,3,100,111,116,90,2,109,101,114,10,
+ 0,0,0,114,10,0,0,0,114,11,0,0,0,218,23,95,
+ 102,105,110,100,95,112,97,114,101,110,116,95,112,97,116,104,
+ 95,110,97,109,101,115,194,4,0,0,115,8,0,0,0,0,
+@@ -1945,13 +1945,13 @@ const unsigned char _Py_M__importlib_bootstrap_external[] = {
+ 1,0,0,0,0,0,0,0,0,0,0,0,3,0,0,0,
+ 3,0,0,0,67,0,0,0,115,28,0,0,0,124,0,160,
+ 0,161,0,92,2,125,1,125,2,116,1,116,2,106,3,124,
+- 1,25,0,124,2,131,2,83,0,114,69,0,0,0,41,4,
+- 114,53,1,0,0,114,154,0,0,0,114,21,0,0,0,218,
+- 7,109,111,100,117,108,101,115,41,3,114,142,0,0,0,90,
++ 1,25,0,124,2,131,2,83,0,114,70,0,0,0,41,4,
++ 114,54,1,0,0,114,155,0,0,0,114,21,0,0,0,218,
++ 7,109,111,100,117,108,101,115,41,3,114,143,0,0,0,90,
+ 18,112,97,114,101,110,116,95,109,111,100,117,108,101,95,110,
+ 97,109,101,90,14,112,97,116,104,95,97,116,116,114,95,110,
+ 97,109,101,114,10,0,0,0,114,10,0,0,0,114,11,0,
+- 0,0,114,48,1,0,0,204,4,0,0,115,4,0,0,0,
++ 0,0,114,49,1,0,0,204,4,0,0,115,4,0,0,0,
+ 0,1,12,1,122,31,95,78,97,109,101,115,112,97,99,101,
+ 80,97,116,104,46,95,103,101,116,95,112,97,114,101,110,116,
+ 95,112,97,116,104,99,1,0,0,0,0,0,0,0,0,0,
+@@ -1961,11 +1961,11 @@ const unsigned char _Py_M__importlib_bootstrap_external[] = {
+ 4,124,1,161,2,125,2,124,2,100,0,117,1,114,68,124,
+ 2,106,5,100,0,117,0,114,68,124,2,106,6,114,68,124,
+ 2,106,6,124,0,95,7,124,1,124,0,95,2,124,0,106,
+- 7,83,0,114,69,0,0,0,41,8,114,135,0,0,0,114,
+- 48,1,0,0,114,49,1,0,0,114,50,1,0,0,114,46,
+- 1,0,0,114,164,0,0,0,114,202,0,0,0,114,47,1,
+- 0,0,41,3,114,142,0,0,0,90,11,112,97,114,101,110,
+- 116,95,112,97,116,104,114,210,0,0,0,114,10,0,0,0,
++ 7,83,0,114,70,0,0,0,41,8,114,136,0,0,0,114,
++ 49,1,0,0,114,50,1,0,0,114,51,1,0,0,114,47,
++ 1,0,0,114,165,0,0,0,114,203,0,0,0,114,48,1,
++ 0,0,41,3,114,143,0,0,0,90,11,112,97,114,101,110,
++ 116,95,112,97,116,104,114,211,0,0,0,114,10,0,0,0,
+ 114,10,0,0,0,114,11,0,0,0,218,12,95,114,101,99,
+ 97,108,99,117,108,97,116,101,208,4,0,0,115,16,0,0,
+ 0,0,2,12,1,10,1,14,3,18,1,6,1,8,1,6,
+@@ -1973,33 +1973,33 @@ const unsigned char _Py_M__importlib_bootstrap_external[] = {
+ 104,46,95,114,101,99,97,108,99,117,108,97,116,101,99,1,
+ 0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,3,
+ 0,0,0,67,0,0,0,115,12,0,0,0,116,0,124,0,
+- 160,1,161,0,131,1,83,0,114,69,0,0,0,41,2,114,
+- 29,1,0,0,114,55,1,0,0,114,13,1,0,0,114,10,
++ 160,1,161,0,131,1,83,0,114,70,0,0,0,41,2,114,
++ 30,1,0,0,114,56,1,0,0,114,14,1,0,0,114,10,
+ 0,0,0,114,10,0,0,0,114,11,0,0,0,218,8,95,
+ 95,105,116,101,114,95,95,221,4,0,0,115,2,0,0,0,
+ 0,1,122,23,95,78,97,109,101,115,112,97,99,101,80,97,
+ 116,104,46,95,95,105,116,101,114,95,95,99,2,0,0,0,
+ 0,0,0,0,0,0,0,0,2,0,0,0,2,0,0,0,
+ 67,0,0,0,115,12,0,0,0,124,0,160,0,161,0,124,
+- 1,25,0,83,0,114,69,0,0,0,169,1,114,55,1,0,
+- 0,41,2,114,142,0,0,0,218,5,105,110,100,101,120,114,
++ 1,25,0,83,0,114,70,0,0,0,169,1,114,56,1,0,
++ 0,41,2,114,143,0,0,0,218,5,105,110,100,101,120,114,
+ 10,0,0,0,114,10,0,0,0,114,11,0,0,0,218,11,
+ 95,95,103,101,116,105,116,101,109,95,95,224,4,0,0,115,
+ 2,0,0,0,0,1,122,26,95,78,97,109,101,115,112,97,
+ 99,101,80,97,116,104,46,95,95,103,101,116,105,116,101,109,
+ 95,95,99,3,0,0,0,0,0,0,0,0,0,0,0,3,
+ 0,0,0,3,0,0,0,67,0,0,0,115,14,0,0,0,
+- 124,2,124,0,106,0,124,1,60,0,100,0,83,0,114,69,
+- 0,0,0,41,1,114,47,1,0,0,41,3,114,142,0,0,
+- 0,114,58,1,0,0,114,65,0,0,0,114,10,0,0,0,
++ 124,2,124,0,106,0,124,1,60,0,100,0,83,0,114,70,
++ 0,0,0,41,1,114,48,1,0,0,41,3,114,143,0,0,
++ 0,114,59,1,0,0,114,66,0,0,0,114,10,0,0,0,
+ 114,10,0,0,0,114,11,0,0,0,218,11,95,95,115,101,
+ 116,105,116,101,109,95,95,227,4,0,0,115,2,0,0,0,
+ 0,1,122,26,95,78,97,109,101,115,112,97,99,101,80,97,
+ 116,104,46,95,95,115,101,116,105,116,101,109,95,95,99,1,
+ 0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,3,
+ 0,0,0,67,0,0,0,115,12,0,0,0,116,0,124,0,
+- 160,1,161,0,131,1,83,0,114,69,0,0,0,41,2,114,
+- 6,0,0,0,114,55,1,0,0,114,13,1,0,0,114,10,
++ 160,1,161,0,131,1,83,0,114,70,0,0,0,41,2,114,
++ 6,0,0,0,114,56,1,0,0,114,14,1,0,0,114,10,
+ 0,0,0,114,10,0,0,0,114,11,0,0,0,218,7,95,
+ 95,108,101,110,95,95,230,4,0,0,115,2,0,0,0,0,
+ 1,122,22,95,78,97,109,101,115,112,97,99,101,80,97,116,
+@@ -2007,37 +2007,37 @@ const unsigned char _Py_M__importlib_bootstrap_external[] = {
+ 0,0,0,0,0,0,1,0,0,0,3,0,0,0,67,0,
+ 0,0,115,12,0,0,0,100,1,160,0,124,0,106,1,161,
+ 1,83,0,41,2,78,122,20,95,78,97,109,101,115,112,97,
+- 99,101,80,97,116,104,40,123,33,114,125,41,41,2,114,88,
+- 0,0,0,114,47,1,0,0,114,13,1,0,0,114,10,0,
++ 99,101,80,97,116,104,40,123,33,114,125,41,41,2,114,89,
++ 0,0,0,114,48,1,0,0,114,14,1,0,0,114,10,0,
+ 0,0,114,10,0,0,0,114,11,0,0,0,218,8,95,95,
+ 114,101,112,114,95,95,233,4,0,0,115,2,0,0,0,0,
+ 1,122,23,95,78,97,109,101,115,112,97,99,101,80,97,116,
+ 104,46,95,95,114,101,112,114,95,95,99,2,0,0,0,0,
+ 0,0,0,0,0,0,0,2,0,0,0,3,0,0,0,67,
+ 0,0,0,115,12,0,0,0,124,1,124,0,160,0,161,0,
+- 118,0,83,0,114,69,0,0,0,114,57,1,0,0,169,2,
+- 114,142,0,0,0,218,4,105,116,101,109,114,10,0,0,0,
++ 118,0,83,0,114,70,0,0,0,114,58,1,0,0,169,2,
++ 114,143,0,0,0,218,4,105,116,101,109,114,10,0,0,0,
+ 114,10,0,0,0,114,11,0,0,0,218,12,95,95,99,111,
+ 110,116,97,105,110,115,95,95,236,4,0,0,115,2,0,0,
+ 0,0,1,122,27,95,78,97,109,101,115,112,97,99,101,80,
+ 97,116,104,46,95,95,99,111,110,116,97,105,110,115,95,95,
+ 99,2,0,0,0,0,0,0,0,0,0,0,0,2,0,0,
+ 0,3,0,0,0,67,0,0,0,115,16,0,0,0,124,0,
+- 106,0,160,1,124,1,161,1,1,0,100,0,83,0,114,69,
+- 0,0,0,41,2,114,47,1,0,0,114,61,0,0,0,114,
+- 63,1,0,0,114,10,0,0,0,114,10,0,0,0,114,11,
+- 0,0,0,114,61,0,0,0,239,4,0,0,115,2,0,0,
++ 106,0,160,1,124,1,161,1,1,0,100,0,83,0,114,70,
++ 0,0,0,41,2,114,48,1,0,0,114,62,0,0,0,114,
++ 64,1,0,0,114,10,0,0,0,114,10,0,0,0,114,11,
++ 0,0,0,114,62,0,0,0,239,4,0,0,115,2,0,0,
+ 0,0,1,122,21,95,78,97,109,101,115,112,97,99,101,80,
+- 97,116,104,46,97,112,112,101,110,100,78,41,15,114,149,0,
+- 0,0,114,148,0,0,0,114,150,0,0,0,114,151,0,0,
+- 0,114,232,0,0,0,114,53,1,0,0,114,48,1,0,0,
+- 114,55,1,0,0,114,56,1,0,0,114,59,1,0,0,114,
+- 60,1,0,0,114,61,1,0,0,114,62,1,0,0,114,65,
+- 1,0,0,114,61,0,0,0,114,10,0,0,0,114,10,0,
+- 0,0,114,10,0,0,0,114,11,0,0,0,114,45,1,0,
++ 97,116,104,46,97,112,112,101,110,100,78,41,15,114,150,0,
++ 0,0,114,149,0,0,0,114,151,0,0,0,114,152,0,0,
++ 0,114,233,0,0,0,114,54,1,0,0,114,49,1,0,0,
++ 114,56,1,0,0,114,57,1,0,0,114,60,1,0,0,114,
++ 61,1,0,0,114,62,1,0,0,114,63,1,0,0,114,66,
++ 1,0,0,114,62,0,0,0,114,10,0,0,0,114,10,0,
++ 0,0,114,10,0,0,0,114,11,0,0,0,114,46,1,0,
+ 0,181,4,0,0,115,24,0,0,0,8,1,4,6,8,6,
+ 8,10,8,4,8,13,8,3,8,3,8,3,8,3,8,3,
+- 8,3,114,45,1,0,0,99,0,0,0,0,0,0,0,0,
++ 8,3,114,46,1,0,0,99,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,3,0,0,0,64,0,0,0,
+ 115,80,0,0,0,101,0,90,1,100,0,90,2,100,1,100,
+ 2,132,0,90,3,101,4,100,3,100,4,132,0,131,1,90,
+@@ -2048,9 +2048,9 @@ const unsigned char _Py_M__importlib_bootstrap_external[] = {
+ 97,99,101,76,111,97,100,101,114,99,4,0,0,0,0,0,
+ 0,0,0,0,0,0,4,0,0,0,4,0,0,0,67,0,
+ 0,0,115,18,0,0,0,116,0,124,1,124,2,124,3,131,
+- 3,124,0,95,1,100,0,83,0,114,69,0,0,0,41,2,
+- 114,45,1,0,0,114,47,1,0,0,114,51,1,0,0,114,
+- 10,0,0,0,114,10,0,0,0,114,11,0,0,0,114,232,
++ 3,124,0,95,1,100,0,83,0,114,70,0,0,0,41,2,
++ 114,46,1,0,0,114,48,1,0,0,114,52,1,0,0,114,
++ 10,0,0,0,114,10,0,0,0,114,11,0,0,0,114,233,
+ 0,0,0,245,4,0,0,115,2,0,0,0,0,1,122,25,
+ 95,78,97,109,101,115,112,97,99,101,76,111,97,100,101,114,
+ 46,95,95,105,110,105,116,95,95,99,2,0,0,0,0,0,
+@@ -2065,47 +2065,47 @@ const unsigned char _Py_M__importlib_bootstrap_external[] = {
+ 32,116,104,101,32,106,111,98,32,105,116,115,101,108,102,46,
+ 10,10,32,32,32,32,32,32,32,32,122,25,60,109,111,100,
+ 117,108,101,32,123,33,114,125,32,40,110,97,109,101,115,112,
+- 97,99,101,41,62,41,2,114,88,0,0,0,114,149,0,0,
+- 0,41,2,114,216,0,0,0,114,239,0,0,0,114,10,0,
++ 97,99,101,41,62,41,2,114,89,0,0,0,114,150,0,0,
++ 0,41,2,114,217,0,0,0,114,240,0,0,0,114,10,0,
+ 0,0,114,10,0,0,0,114,11,0,0,0,218,11,109,111,
+ 100,117,108,101,95,114,101,112,114,248,4,0,0,115,2,0,
+ 0,0,0,7,122,28,95,78,97,109,101,115,112,97,99,101,
+ 76,111,97,100,101,114,46,109,111,100,117,108,101,95,114,101,
+ 112,114,99,2,0,0,0,0,0,0,0,0,0,0,0,2,
+ 0,0,0,1,0,0,0,67,0,0,0,115,4,0,0,0,
+- 100,1,83,0,41,2,78,84,114,10,0,0,0,114,242,0,
++ 100,1,83,0,41,2,78,84,114,10,0,0,0,114,243,0,
+ 0,0,114,10,0,0,0,114,10,0,0,0,114,11,0,0,
+- 0,114,206,0,0,0,1,5,0,0,115,2,0,0,0,0,
++ 0,114,207,0,0,0,1,5,0,0,115,2,0,0,0,0,
+ 1,122,27,95,78,97,109,101,115,112,97,99,101,76,111,97,
+ 100,101,114,46,105,115,95,112,97,99,107,97,103,101,99,2,
+ 0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,1,
+ 0,0,0,67,0,0,0,115,4,0,0,0,100,1,83,0,
+- 41,2,78,114,14,0,0,0,114,10,0,0,0,114,242,0,
++ 41,2,78,114,14,0,0,0,114,10,0,0,0,114,243,0,
+ 0,0,114,10,0,0,0,114,10,0,0,0,114,11,0,0,
+- 0,114,252,0,0,0,4,5,0,0,115,2,0,0,0,0,
++ 0,114,253,0,0,0,4,5,0,0,115,2,0,0,0,0,
+ 1,122,27,95,78,97,109,101,115,112,97,99,101,76,111,97,
+ 100,101,114,46,103,101,116,95,115,111,117,114,99,101,99,2,
+ 0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,6,
+ 0,0,0,67,0,0,0,115,16,0,0,0,116,0,100,1,
+ 100,2,100,3,100,4,100,5,141,4,83,0,41,6,78,114,
+- 14,0,0,0,122,8,60,115,116,114,105,110,103,62,114,238,
+- 0,0,0,84,41,1,114,254,0,0,0,41,1,114,255,0,
+- 0,0,114,242,0,0,0,114,10,0,0,0,114,10,0,0,
+- 0,114,11,0,0,0,114,236,0,0,0,7,5,0,0,115,
++ 14,0,0,0,122,8,60,115,116,114,105,110,103,62,114,239,
++ 0,0,0,84,41,1,114,255,0,0,0,41,1,114,0,1,
++ 0,0,114,243,0,0,0,114,10,0,0,0,114,10,0,0,
++ 0,114,11,0,0,0,114,237,0,0,0,7,5,0,0,115,
+ 2,0,0,0,0,1,122,25,95,78,97,109,101,115,112,97,
+ 99,101,76,111,97,100,101,114,46,103,101,116,95,99,111,100,
+ 101,99,2,0,0,0,0,0,0,0,0,0,0,0,2,0,
+ 0,0,1,0,0,0,67,0,0,0,115,4,0,0,0,100,
+- 1,83,0,114,233,0,0,0,114,10,0,0,0,114,234,0,
++ 1,83,0,114,234,0,0,0,114,10,0,0,0,114,235,0,
+ 0,0,114,10,0,0,0,114,10,0,0,0,114,11,0,0,
+- 0,114,235,0,0,0,10,5,0,0,115,2,0,0,0,0,
++ 0,114,236,0,0,0,10,5,0,0,115,2,0,0,0,0,
+ 1,122,30,95,78,97,109,101,115,112,97,99,101,76,111,97,
+ 100,101,114,46,99,114,101,97,116,101,95,109,111,100,117,108,
+ 101,99,2,0,0,0,0,0,0,0,0,0,0,0,2,0,
+ 0,0,1,0,0,0,67,0,0,0,115,4,0,0,0,100,
+- 0,83,0,114,69,0,0,0,114,10,0,0,0,114,20,1,
++ 0,83,0,114,70,0,0,0,114,10,0,0,0,114,21,1,
+ 0,0,114,10,0,0,0,114,10,0,0,0,114,11,0,0,
+- 0,114,240,0,0,0,13,5,0,0,115,2,0,0,0,0,
++ 0,114,241,0,0,0,13,5,0,0,115,2,0,0,0,0,
+ 1,122,28,95,78,97,109,101,115,112,97,99,101,76,111,97,
+ 100,101,114,46,101,120,101,99,95,109,111,100,117,108,101,99,
+ 2,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,
+@@ -2120,20 +2120,20 @@ const unsigned char _Py_M__importlib_bootstrap_external[] = {
+ 97,100,46,10,10,32,32,32,32,32,32,32,32,122,38,110,
+ 97,109,101,115,112,97,99,101,32,109,111,100,117,108,101,32,
+ 108,111,97,100,101,100,32,119,105,116,104,32,112,97,116,104,
+- 32,123,33,114,125,41,4,114,158,0,0,0,114,173,0,0,
+- 0,114,47,1,0,0,114,241,0,0,0,114,242,0,0,0,
++ 32,123,33,114,125,41,4,114,159,0,0,0,114,174,0,0,
++ 0,114,48,1,0,0,114,242,0,0,0,114,243,0,0,0,
+ 114,10,0,0,0,114,10,0,0,0,114,11,0,0,0,114,
+- 243,0,0,0,16,5,0,0,115,8,0,0,0,0,7,6,
++ 244,0,0,0,16,5,0,0,115,8,0,0,0,0,7,6,
+ 1,4,255,4,2,122,28,95,78,97,109,101,115,112,97,99,
+ 101,76,111,97,100,101,114,46,108,111,97,100,95,109,111,100,
+- 117,108,101,78,41,12,114,149,0,0,0,114,148,0,0,0,
+- 114,150,0,0,0,114,232,0,0,0,114,230,0,0,0,114,
+- 67,1,0,0,114,206,0,0,0,114,252,0,0,0,114,236,
+- 0,0,0,114,235,0,0,0,114,240,0,0,0,114,243,0,
++ 117,108,101,78,41,12,114,150,0,0,0,114,149,0,0,0,
++ 114,151,0,0,0,114,233,0,0,0,114,231,0,0,0,114,
++ 68,1,0,0,114,207,0,0,0,114,253,0,0,0,114,237,
++ 0,0,0,114,236,0,0,0,114,241,0,0,0,114,244,0,
+ 0,0,114,10,0,0,0,114,10,0,0,0,114,10,0,0,
+- 0,114,11,0,0,0,114,66,1,0,0,244,4,0,0,115,
++ 0,114,11,0,0,0,114,67,1,0,0,244,4,0,0,115,
+ 18,0,0,0,8,1,8,3,2,1,10,8,8,3,8,3,
+- 8,3,8,3,8,3,114,66,1,0,0,99,0,0,0,0,
++ 8,3,8,3,8,3,114,67,1,0,0,99,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,0,0,4,0,0,0,
+ 64,0,0,0,115,118,0,0,0,101,0,90,1,100,0,90,
+ 2,100,1,90,3,101,4,100,2,100,3,132,0,131,1,90,
+@@ -2165,10 +2165,10 @@ const unsigned char _Py_M__importlib_bootstrap_external[] = {
+ 110,118,97,108,105,100,97,116,101,95,99,97,99,104,101,115,
+ 41,6,218,4,108,105,115,116,114,21,0,0,0,218,19,112,
+ 97,116,104,95,105,109,112,111,114,116,101,114,95,99,97,99,
+- 104,101,218,5,105,116,101,109,115,114,152,0,0,0,114,69,
+- 1,0,0,41,3,114,216,0,0,0,114,140,0,0,0,218,
++ 104,101,218,5,105,116,101,109,115,114,153,0,0,0,114,70,
++ 1,0,0,41,3,114,217,0,0,0,114,141,0,0,0,218,
+ 6,102,105,110,100,101,114,114,10,0,0,0,114,10,0,0,
+- 0,114,11,0,0,0,114,69,1,0,0,34,5,0,0,115,
++ 0,114,11,0,0,0,114,70,1,0,0,34,5,0,0,115,
+ 10,0,0,0,0,4,22,1,8,1,10,1,10,1,122,28,
+ 80,97,116,104,70,105,110,100,101,114,46,105,110,118,97,108,
+ 105,100,97,116,101,95,99,97,99,104,101,115,99,2,0,0,
+@@ -2184,9 +2184,9 @@ const unsigned char _Py_M__importlib_bootstrap_external[] = {
+ 101,114,32,102,111,114,32,39,112,97,116,104,39,46,78,122,
+ 23,115,121,115,46,112,97,116,104,95,104,111,111,107,115,32,
+ 105,115,32,101,109,112,116,121,41,6,114,21,0,0,0,218,
+- 10,112,97,116,104,95,104,111,111,107,115,114,98,0,0,0,
+- 114,99,0,0,0,114,162,0,0,0,114,141,0,0,0,41,
+- 3,114,216,0,0,0,114,65,0,0,0,90,4,104,111,111,
++ 10,112,97,116,104,95,104,111,111,107,115,114,99,0,0,0,
++ 114,100,0,0,0,114,163,0,0,0,114,142,0,0,0,41,
++ 3,114,217,0,0,0,114,66,0,0,0,90,4,104,111,111,
+ 107,114,10,0,0,0,114,10,0,0,0,114,11,0,0,0,
+ 218,11,95,112,97,116,104,95,104,111,111,107,115,44,5,0,
+ 0,115,16,0,0,0,0,3,16,1,12,1,10,1,2,1,
+@@ -2214,10 +2214,10 @@ const unsigned char _Py_M__importlib_bootstrap_external[] = {
+ 101,114,32,105,115,32,97,118,97,105,108,97,98,108,101,44,
+ 32,115,116,111,114,101,32,78,111,110,101,46,10,10,32,32,
+ 32,32,32,32,32,32,114,14,0,0,0,78,41,7,114,24,
+- 0,0,0,114,81,0,0,0,114,26,1,0,0,114,21,0,
+- 0,0,114,71,1,0,0,218,8,75,101,121,69,114,114,111,
+- 114,114,75,1,0,0,41,3,114,216,0,0,0,114,65,0,
+- 0,0,114,73,1,0,0,114,10,0,0,0,114,10,0,0,
++ 0,0,0,114,82,0,0,0,114,27,1,0,0,114,21,0,
++ 0,0,114,72,1,0,0,218,8,75,101,121,69,114,114,111,
++ 114,114,76,1,0,0,41,3,114,217,0,0,0,114,66,0,
++ 0,0,114,74,1,0,0,114,10,0,0,0,114,10,0,0,
+ 0,114,11,0,0,0,218,20,95,112,97,116,104,95,105,109,
+ 112,111,114,116,101,114,95,99,97,99,104,101,57,5,0,0,
+ 115,22,0,0,0,0,8,8,1,2,1,12,1,12,3,8,
+@@ -2231,11 +2231,11 @@ const unsigned char _Py_M__importlib_bootstrap_external[] = {
+ 125,4,124,3,100,0,117,1,114,60,116,3,160,4,124,1,
+ 124,3,161,2,83,0,116,3,160,5,124,1,100,0,161,2,
+ 125,5,124,4,124,5,95,6,124,5,83,0,41,2,78,114,
+- 161,0,0,0,41,7,114,152,0,0,0,114,161,0,0,0,
+- 114,229,0,0,0,114,158,0,0,0,114,224,0,0,0,114,
+- 207,0,0,0,114,202,0,0,0,41,6,114,216,0,0,0,
+- 114,163,0,0,0,114,73,1,0,0,114,164,0,0,0,114,
+- 165,0,0,0,114,210,0,0,0,114,10,0,0,0,114,10,
++ 162,0,0,0,41,7,114,153,0,0,0,114,162,0,0,0,
++ 114,230,0,0,0,114,159,0,0,0,114,225,0,0,0,114,
++ 208,0,0,0,114,203,0,0,0,41,6,114,217,0,0,0,
++ 114,164,0,0,0,114,74,1,0,0,114,165,0,0,0,114,
++ 166,0,0,0,114,211,0,0,0,114,10,0,0,0,114,10,
+ 0,0,0,114,11,0,0,0,218,16,95,108,101,103,97,99,
+ 121,95,103,101,116,95,115,112,101,99,79,5,0,0,115,18,
+ 0,0,0,0,4,10,1,16,2,10,1,4,1,8,1,12,
+@@ -2257,17 +2257,17 @@ const unsigned char _Py_M__importlib_bootstrap_external[] = {
+ 116,104,101,32,108,111,97,100,101,114,32,111,114,32,110,97,
+ 109,101,115,112,97,99,101,95,112,97,116,104,32,102,111,114,
+ 32,116,104,105,115,32,109,111,100,117,108,101,47,112,97,99,
+- 107,97,103,101,32,110,97,109,101,46,78,114,226,0,0,0,
++ 107,97,103,101,32,110,97,109,101,46,78,114,227,0,0,0,
+ 122,19,115,112,101,99,32,109,105,115,115,105,110,103,32,108,
+- 111,97,100,101,114,41,13,114,185,0,0,0,114,108,0,0,
+- 0,218,5,98,121,116,101,115,114,77,1,0,0,114,152,0,
+- 0,0,114,226,0,0,0,114,78,1,0,0,114,164,0,0,
+- 0,114,202,0,0,0,114,141,0,0,0,114,191,0,0,0,
+- 114,158,0,0,0,114,207,0,0,0,41,9,114,216,0,0,
+- 0,114,163,0,0,0,114,65,0,0,0,114,225,0,0,0,
++ 111,97,100,101,114,41,13,114,186,0,0,0,114,109,0,0,
++ 0,218,5,98,121,116,101,115,114,78,1,0,0,114,153,0,
++ 0,0,114,227,0,0,0,114,79,1,0,0,114,165,0,0,
++ 0,114,203,0,0,0,114,142,0,0,0,114,192,0,0,0,
++ 114,159,0,0,0,114,208,0,0,0,41,9,114,217,0,0,
++ 0,114,164,0,0,0,114,66,0,0,0,114,226,0,0,0,
+ 218,14,110,97,109,101,115,112,97,99,101,95,112,97,116,104,
+- 90,5,101,110,116,114,121,114,73,1,0,0,114,210,0,0,
+- 0,114,165,0,0,0,114,10,0,0,0,114,10,0,0,0,
++ 90,5,101,110,116,114,121,114,74,1,0,0,114,211,0,0,
++ 0,114,166,0,0,0,114,10,0,0,0,114,10,0,0,0,
+ 114,11,0,0,0,218,9,95,103,101,116,95,115,112,101,99,
+ 94,5,0,0,115,40,0,0,0,0,5,4,1,8,1,14,
+ 1,2,1,10,1,8,1,10,1,14,2,12,1,8,1,2,
+@@ -2291,12 +2291,12 @@ const unsigned char _Py_M__importlib_bootstrap_external[] = {
+ 111,111,107,115,32,97,110,100,32,115,121,115,46,112,97,116,
+ 104,95,105,109,112,111,114,116,101,114,95,99,97,99,104,101,
+ 46,10,32,32,32,32,32,32,32,32,78,41,7,114,21,0,
+- 0,0,114,65,0,0,0,114,81,1,0,0,114,164,0,0,
+- 0,114,202,0,0,0,114,205,0,0,0,114,45,1,0,0,
+- 41,6,114,216,0,0,0,114,163,0,0,0,114,65,0,0,
+- 0,114,225,0,0,0,114,210,0,0,0,114,80,1,0,0,
++ 0,0,114,66,0,0,0,114,82,1,0,0,114,165,0,0,
++ 0,114,203,0,0,0,114,206,0,0,0,114,46,1,0,0,
++ 41,6,114,217,0,0,0,114,164,0,0,0,114,66,0,0,
++ 0,114,226,0,0,0,114,211,0,0,0,114,81,1,0,0,
+ 114,10,0,0,0,114,10,0,0,0,114,11,0,0,0,114,
+- 226,0,0,0,126,5,0,0,115,26,0,0,0,0,6,8,
++ 227,0,0,0,126,5,0,0,115,26,0,0,0,0,6,8,
+ 1,6,1,14,1,8,1,4,1,10,1,6,1,4,3,6,
+ 1,16,1,4,2,6,2,122,20,80,97,116,104,70,105,110,
+ 100,101,114,46,102,105,110,100,95,115,112,101,99,99,3,0,
+@@ -2314,9 +2314,9 @@ const unsigned char _Py_M__importlib_bootstrap_external[] = {
+ 116,104,111,100,32,105,115,32,100,101,112,114,101,99,97,116,
+ 101,100,46,32,32,85,115,101,32,102,105,110,100,95,115,112,
+ 101,99,40,41,32,105,110,115,116,101,97,100,46,10,10,32,
+- 32,32,32,32,32,32,32,78,114,227,0,0,0,114,228,0,
++ 32,32,32,32,32,32,32,78,114,228,0,0,0,114,229,0,
+ 0,0,114,10,0,0,0,114,10,0,0,0,114,11,0,0,
+- 0,114,229,0,0,0,150,5,0,0,115,8,0,0,0,0,
++ 0,114,230,0,0,0,150,5,0,0,115,8,0,0,0,0,
+ 8,12,1,8,1,4,1,122,22,80,97,116,104,70,105,110,
+ 100,101,114,46,102,105,110,100,95,109,111,100,117,108,101,99,
+ 1,0,0,0,0,0,0,0,0,0,0,0,4,0,0,0,
+@@ -2344,23 +2344,23 @@ const unsigned char _Py_M__importlib_bootstrap_external[] = {
+ 114,0,0,0,0,41,1,218,18,77,101,116,97,100,97,116,
+ 97,80,97,116,104,70,105,110,100,101,114,41,3,90,18,105,
+ 109,112,111,114,116,108,105,98,46,109,101,116,97,100,97,116,
+- 97,114,82,1,0,0,218,18,102,105,110,100,95,100,105,115,
+- 116,114,105,98,117,116,105,111,110,115,41,4,114,216,0,0,
+- 0,114,143,0,0,0,114,144,0,0,0,114,82,1,0,0,
++ 97,114,83,1,0,0,218,18,102,105,110,100,95,100,105,115,
++ 116,114,105,98,117,116,105,111,110,115,41,4,114,217,0,0,
++ 0,114,144,0,0,0,114,145,0,0,0,114,83,1,0,0,
+ 114,10,0,0,0,114,10,0,0,0,114,11,0,0,0,114,
+- 83,1,0,0,163,5,0,0,115,4,0,0,0,0,10,12,
++ 84,1,0,0,163,5,0,0,115,4,0,0,0,0,10,12,
+ 1,122,29,80,97,116,104,70,105,110,100,101,114,46,102,105,
+ 110,100,95,100,105,115,116,114,105,98,117,116,105,111,110,115,
+- 41,1,78,41,2,78,78,41,1,78,41,13,114,149,0,0,
+- 0,114,148,0,0,0,114,150,0,0,0,114,151,0,0,0,
+- 114,230,0,0,0,114,69,1,0,0,114,75,1,0,0,114,
+- 77,1,0,0,114,78,1,0,0,114,81,1,0,0,114,226,
+- 0,0,0,114,229,0,0,0,114,83,1,0,0,114,10,0,
++ 41,1,78,41,2,78,78,41,1,78,41,13,114,150,0,0,
++ 0,114,149,0,0,0,114,151,0,0,0,114,152,0,0,0,
++ 114,231,0,0,0,114,70,1,0,0,114,76,1,0,0,114,
++ 78,1,0,0,114,79,1,0,0,114,82,1,0,0,114,227,
++ 0,0,0,114,230,0,0,0,114,84,1,0,0,114,10,0,
+ 0,0,114,10,0,0,0,114,10,0,0,0,114,11,0,0,
+- 0,114,68,1,0,0,30,5,0,0,115,34,0,0,0,8,
++ 0,114,69,1,0,0,30,5,0,0,115,34,0,0,0,8,
+ 2,4,2,2,1,10,9,2,1,10,12,2,1,10,21,2,
+ 1,10,14,2,1,12,31,2,1,12,23,2,1,12,12,2,
+- 1,114,68,1,0,0,99,0,0,0,0,0,0,0,0,0,
++ 1,114,69,1,0,0,99,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,3,0,0,0,64,0,0,0,115,
+ 90,0,0,0,101,0,90,1,100,0,90,2,100,1,90,3,
+ 100,2,100,3,132,0,90,4,100,4,100,5,132,0,90,5,
+@@ -2401,23 +2401,23 @@ const unsigned char _Py_M__importlib_bootstrap_external[] = {
+ 110,105,122,101,115,46,99,1,0,0,0,0,0,0,0,0,
+ 0,0,0,2,0,0,0,3,0,0,0,51,0,0,0,115,
+ 22,0,0,0,124,0,93,14,125,1,124,1,136,0,102,2,
+- 86,0,1,0,113,2,100,0,83,0,114,69,0,0,0,114,
+- 10,0,0,0,114,40,1,0,0,169,1,114,164,0,0,0,
++ 86,0,1,0,113,2,100,0,83,0,114,70,0,0,0,114,
++ 10,0,0,0,114,41,1,0,0,169,1,114,165,0,0,0,
+ 114,10,0,0,0,114,11,0,0,0,114,12,0,0,0,192,
+ 5,0,0,114,13,0,0,0,122,38,70,105,108,101,70,105,
+ 110,100,101,114,46,95,95,105,110,105,116,95,95,46,60,108,
+ 111,99,97,108,115,62,46,60,103,101,110,101,120,112,114,62,
+- 114,96,0,0,0,114,129,0,0,0,78,41,11,114,191,0,
+- 0,0,218,8,95,108,111,97,100,101,114,115,114,65,0,0,
+- 0,114,85,0,0,0,114,67,0,0,0,114,24,0,0,0,
+- 114,81,0,0,0,218,11,95,112,97,116,104,95,109,116,105,
++ 114,97,0,0,0,114,130,0,0,0,78,41,11,114,192,0,
++ 0,0,218,8,95,108,111,97,100,101,114,115,114,66,0,0,
++ 0,114,86,0,0,0,114,68,0,0,0,114,24,0,0,0,
++ 114,82,0,0,0,218,11,95,112,97,116,104,95,109,116,105,
+ 109,101,218,3,115,101,116,218,11,95,112,97,116,104,95,99,
+ 97,99,104,101,218,19,95,114,101,108,97,120,101,100,95,112,
+- 97,116,104,95,99,97,99,104,101,41,5,114,142,0,0,0,
+- 114,65,0,0,0,218,14,108,111,97,100,101,114,95,100,101,
+- 116,97,105,108,115,90,7,108,111,97,100,101,114,115,114,212,
+- 0,0,0,114,10,0,0,0,114,85,1,0,0,114,11,0,
+- 0,0,114,232,0,0,0,186,5,0,0,115,20,0,0,0,
++ 97,116,104,95,99,97,99,104,101,41,5,114,143,0,0,0,
++ 114,66,0,0,0,218,14,108,111,97,100,101,114,95,100,101,
++ 116,97,105,108,115,90,7,108,111,97,100,101,114,115,114,213,
++ 0,0,0,114,10,0,0,0,114,86,1,0,0,114,11,0,
++ 0,0,114,233,0,0,0,186,5,0,0,115,20,0,0,0,
+ 0,4,4,1,12,1,26,1,6,2,10,1,10,1,18,1,
+ 6,1,8,1,122,19,70,105,108,101,70,105,110,100,101,114,
+ 46,95,95,105,110,105,116,95,95,99,1,0,0,0,0,0,
+@@ -2425,9 +2425,9 @@ const unsigned char _Py_M__importlib_bootstrap_external[] = {
+ 0,0,115,10,0,0,0,100,1,124,0,95,0,100,2,83,
+ 0,41,3,122,31,73,110,118,97,108,105,100,97,116,101,32,
+ 116,104,101,32,100,105,114,101,99,116,111,114,121,32,109,116,
+- 105,109,101,46,114,129,0,0,0,78,41,1,114,87,1,0,
+- 0,114,13,1,0,0,114,10,0,0,0,114,10,0,0,0,
+- 114,11,0,0,0,114,69,1,0,0,202,5,0,0,115,2,
++ 105,109,101,46,114,130,0,0,0,78,41,1,114,88,1,0,
++ 0,114,14,1,0,0,114,10,0,0,0,114,10,0,0,0,
++ 114,11,0,0,0,114,70,1,0,0,202,5,0,0,115,2,
+ 0,0,0,0,2,122,28,70,105,108,101,70,105,110,100,101,
+ 114,46,105,110,118,97,108,105,100,97,116,101,95,99,97,99,
+ 104,101,115,99,2,0,0,0,0,0,0,0,0,0,0,0,
+@@ -2447,21 +2447,21 @@ const unsigned char _Py_M__importlib_bootstrap_external[] = {
+ 100,32,105,115,32,100,101,112,114,101,99,97,116,101,100,46,
+ 32,32,85,115,101,32,102,105,110,100,95,115,112,101,99,40,
+ 41,32,105,110,115,116,101,97,100,46,10,10,32,32,32,32,
+- 32,32,32,32,78,41,3,114,226,0,0,0,114,164,0,0,
+- 0,114,202,0,0,0,41,3,114,142,0,0,0,114,163,0,
+- 0,0,114,210,0,0,0,114,10,0,0,0,114,10,0,0,
+- 0,114,11,0,0,0,114,161,0,0,0,208,5,0,0,115,
++ 32,32,32,32,78,41,3,114,227,0,0,0,114,165,0,0,
++ 0,114,203,0,0,0,41,3,114,143,0,0,0,114,164,0,
++ 0,0,114,211,0,0,0,114,10,0,0,0,114,10,0,0,
++ 0,114,11,0,0,0,114,162,0,0,0,208,5,0,0,115,
+ 8,0,0,0,0,7,10,1,8,1,8,1,122,22,70,105,
+ 108,101,70,105,110,100,101,114,46,102,105,110,100,95,108,111,
+ 97,100,101,114,99,6,0,0,0,0,0,0,0,0,0,0,
+ 0,7,0,0,0,6,0,0,0,67,0,0,0,115,26,0,
+ 0,0,124,1,124,2,124,3,131,2,125,6,116,0,124,2,
+ 124,3,124,6,124,4,100,1,141,4,83,0,41,2,78,114,
+- 201,0,0,0,41,1,114,213,0,0,0,41,7,114,142,0,
+- 0,0,114,211,0,0,0,114,163,0,0,0,114,65,0,0,
+- 0,90,4,115,109,115,108,114,225,0,0,0,114,164,0,0,
++ 202,0,0,0,41,1,114,214,0,0,0,41,7,114,143,0,
++ 0,0,114,212,0,0,0,114,164,0,0,0,114,66,0,0,
++ 0,90,4,115,109,115,108,114,226,0,0,0,114,165,0,0,
+ 0,114,10,0,0,0,114,10,0,0,0,114,11,0,0,0,
+- 114,81,1,0,0,220,5,0,0,115,8,0,0,0,0,1,
++ 114,82,1,0,0,220,5,0,0,115,8,0,0,0,0,1,
+ 10,1,8,1,2,255,122,20,70,105,108,101,70,105,110,100,
+ 101,114,46,95,103,101,116,95,115,112,101,99,78,99,3,0,
+ 0,0,0,0,0,0,0,0,0,0,14,0,0,0,9,0,
+@@ -2496,28 +2496,28 @@ const unsigned char _Py_M__importlib_bootstrap_external[] = {
+ 32,32,32,82,101,116,117,114,110,115,32,116,104,101,32,109,
+ 97,116,99,104,105,110,103,32,115,112,101,99,44,32,111,114,
+ 32,78,111,110,101,32,105,102,32,110,111,116,32,102,111,117,
+- 110,100,46,10,32,32,32,32,32,32,32,32,70,114,96,0,
+- 0,0,114,45,0,0,0,114,129,0,0,0,114,232,0,0,
++ 110,100,46,10,32,32,32,32,32,32,32,32,70,114,97,0,
++ 0,0,114,46,0,0,0,114,130,0,0,0,114,233,0,0,
+ 0,78,122,9,116,114,121,105,110,103,32,123,125,41,1,90,
+ 9,118,101,114,98,111,115,105,116,121,122,25,112,111,115,115,
+ 105,98,108,101,32,110,97,109,101,115,112,97,99,101,32,102,
+- 111,114,32,123,125,41,23,114,103,0,0,0,114,75,0,0,
+- 0,114,65,0,0,0,114,24,0,0,0,114,81,0,0,0,
+- 114,33,1,0,0,114,76,0,0,0,114,87,1,0,0,218,
+- 11,95,102,105,108,108,95,99,97,99,104,101,114,27,0,0,
+- 0,114,90,1,0,0,114,130,0,0,0,114,89,1,0,0,
+- 114,67,0,0,0,114,86,1,0,0,114,80,0,0,0,114,
+- 81,1,0,0,114,82,0,0,0,114,110,0,0,0,114,158,
+- 0,0,0,114,173,0,0,0,114,207,0,0,0,114,202,0,
+- 0,0,41,14,114,142,0,0,0,114,163,0,0,0,114,225,
++ 111,114,32,123,125,41,23,114,104,0,0,0,114,76,0,0,
++ 0,114,66,0,0,0,114,24,0,0,0,114,82,0,0,0,
++ 114,34,1,0,0,114,77,0,0,0,114,88,1,0,0,218,
++ 11,95,102,105,108,108,95,99,97,99,104,101,114,28,0,0,
++ 0,114,91,1,0,0,114,131,0,0,0,114,90,1,0,0,
++ 114,68,0,0,0,114,87,1,0,0,114,81,0,0,0,114,
++ 82,1,0,0,114,83,0,0,0,114,111,0,0,0,114,159,
++ 0,0,0,114,174,0,0,0,114,208,0,0,0,114,203,0,
++ 0,0,41,14,114,143,0,0,0,114,164,0,0,0,114,226,
+ 0,0,0,90,12,105,115,95,110,97,109,101,115,112,97,99,
+- 101,90,11,116,97,105,108,95,109,111,100,117,108,101,114,193,
++ 101,90,11,116,97,105,108,95,109,111,100,117,108,101,114,194,
+ 0,0,0,90,5,99,97,99,104,101,90,12,99,97,99,104,
+ 101,95,109,111,100,117,108,101,90,9,98,97,115,101,95,112,
+- 97,116,104,114,41,1,0,0,114,211,0,0,0,90,13,105,
++ 97,116,104,114,42,1,0,0,114,212,0,0,0,90,13,105,
+ 110,105,116,95,102,105,108,101,110,97,109,101,90,9,102,117,
+- 108,108,95,112,97,116,104,114,210,0,0,0,114,10,0,0,
+- 0,114,10,0,0,0,114,11,0,0,0,114,226,0,0,0,
++ 108,108,95,112,97,116,104,114,211,0,0,0,114,10,0,0,
++ 0,114,10,0,0,0,114,11,0,0,0,114,227,0,0,0,
+ 225,5,0,0,115,78,0,0,0,0,5,4,1,14,1,2,
+ 1,24,1,12,1,10,1,10,1,8,1,6,2,6,1,6,
+ 1,10,2,6,1,4,2,8,1,12,1,14,1,8,1,10,
+@@ -2543,29 +2543,29 @@ const unsigned char _Py_M__importlib_bootstrap_external[] = {
+ 101,110,116,105,97,108,32,109,111,100,117,108,101,115,32,97,
+ 110,100,32,112,97,99,107,97,103,101,115,32,102,111,114,32,
+ 116,104,105,115,32,100,105,114,101,99,116,111,114,121,46,114,
+- 20,0,0,0,114,96,0,0,0,114,87,0,0,0,99,1,
++ 20,0,0,0,114,97,0,0,0,114,88,0,0,0,99,1,
+ 0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,4,
+ 0,0,0,83,0,0,0,115,20,0,0,0,104,0,124,0,
+ 93,12,125,1,124,1,160,0,161,0,146,2,113,4,83,0,
+- 114,10,0,0,0,41,1,114,130,0,0,0,41,2,114,8,
++ 114,10,0,0,0,41,1,114,131,0,0,0,41,2,114,8,
+ 0,0,0,90,2,102,110,114,10,0,0,0,114,10,0,0,
+ 0,114,11,0,0,0,114,19,0,0,0,49,6,0,0,114,
+ 13,0,0,0,122,41,70,105,108,101,70,105,110,100,101,114,
+ 46,95,102,105,108,108,95,99,97,99,104,101,46,60,108,111,
+ 99,97,108,115,62,46,60,115,101,116,99,111,109,112,62,78,
+- 41,18,114,65,0,0,0,114,24,0,0,0,114,30,1,0,
+- 0,114,81,0,0,0,114,26,1,0,0,218,15,80,101,114,
++ 41,18,114,66,0,0,0,114,24,0,0,0,114,31,1,0,
++ 0,114,82,0,0,0,114,27,1,0,0,218,15,80,101,114,
+ 109,105,115,115,105,111,110,69,114,114,111,114,218,18,78,111,
+ 116,65,68,105,114,101,99,116,111,114,121,69,114,114,111,114,
+- 114,21,0,0,0,114,28,0,0,0,114,29,0,0,0,114,
+- 88,1,0,0,114,89,1,0,0,114,125,0,0,0,114,88,
+- 0,0,0,114,130,0,0,0,218,3,97,100,100,114,30,0,
+- 0,0,114,90,1,0,0,41,9,114,142,0,0,0,114,65,
+- 0,0,0,114,31,1,0,0,90,21,108,111,119,101,114,95,
++ 114,21,0,0,0,114,29,0,0,0,114,30,0,0,0,114,
++ 89,1,0,0,114,90,1,0,0,114,126,0,0,0,114,89,
++ 0,0,0,114,131,0,0,0,218,3,97,100,100,114,31,0,
++ 0,0,114,91,1,0,0,41,9,114,143,0,0,0,114,66,
++ 0,0,0,114,32,1,0,0,90,21,108,111,119,101,114,95,
+ 115,117,102,102,105,120,95,99,111,110,116,101,110,116,115,114,
+- 64,1,0,0,114,140,0,0,0,114,52,1,0,0,114,41,
++ 65,1,0,0,114,141,0,0,0,114,53,1,0,0,114,42,
+ 1,0,0,90,8,110,101,119,95,110,97,109,101,114,10,0,
+- 0,0,114,10,0,0,0,114,11,0,0,0,114,92,1,0,
++ 0,0,114,10,0,0,0,114,11,0,0,0,114,93,1,0,
+ 0,20,6,0,0,115,34,0,0,0,0,2,6,1,2,1,
+ 22,1,18,3,10,3,12,1,12,7,6,1,8,1,16,1,
+ 4,1,18,2,4,1,12,1,6,1,12,1,122,22,70,105,
+@@ -2600,17 +2600,17 @@ const unsigned char _Py_M__importlib_bootstrap_external[] = {
+ 104,105,110,101,114,121,46,70,105,108,101,70,105,110,100,101,
+ 114,46,122,30,111,110,108,121,32,100,105,114,101,99,116,111,
+ 114,105,101,115,32,97,114,101,32,115,117,112,112,111,114,116,
+- 101,100,114,71,0,0,0,41,2,114,82,0,0,0,114,141,
+- 0,0,0,114,71,0,0,0,169,2,114,216,0,0,0,114,
+- 91,1,0,0,114,10,0,0,0,114,11,0,0,0,218,24,
++ 101,100,114,72,0,0,0,41,2,114,83,0,0,0,114,142,
++ 0,0,0,114,72,0,0,0,169,2,114,217,0,0,0,114,
++ 92,1,0,0,114,10,0,0,0,114,11,0,0,0,218,24,
+ 112,97,116,104,95,104,111,111,107,95,102,111,114,95,70,105,
+ 108,101,70,105,110,100,101,114,61,6,0,0,115,6,0,0,
+ 0,0,2,8,1,12,1,122,54,70,105,108,101,70,105,110,
+ 100,101,114,46,112,97,116,104,95,104,111,111,107,46,60,108,
+ 111,99,97,108,115,62,46,112,97,116,104,95,104,111,111,107,
+ 95,102,111,114,95,70,105,108,101,70,105,110,100,101,114,114,
+- 10,0,0,0,41,3,114,216,0,0,0,114,91,1,0,0,
+- 114,97,1,0,0,114,10,0,0,0,114,96,1,0,0,114,
++ 10,0,0,0,41,3,114,217,0,0,0,114,92,1,0,0,
++ 114,98,1,0,0,114,10,0,0,0,114,97,1,0,0,114,
+ 11,0,0,0,218,9,112,97,116,104,95,104,111,111,107,51,
+ 6,0,0,115,4,0,0,0,0,10,14,6,122,20,70,105,
+ 108,101,70,105,110,100,101,114,46,112,97,116,104,95,104,111,
+@@ -2618,19 +2618,19 @@ const unsigned char _Py_M__importlib_bootstrap_external[] = {
+ 0,0,0,3,0,0,0,67,0,0,0,115,12,0,0,0,
+ 100,1,160,0,124,0,106,1,161,1,83,0,41,2,78,122,
+ 16,70,105,108,101,70,105,110,100,101,114,40,123,33,114,125,
+- 41,41,2,114,88,0,0,0,114,65,0,0,0,114,13,1,
++ 41,41,2,114,89,0,0,0,114,66,0,0,0,114,14,1,
+ 0,0,114,10,0,0,0,114,10,0,0,0,114,11,0,0,
+- 0,114,62,1,0,0,69,6,0,0,115,2,0,0,0,0,
++ 0,114,63,1,0,0,69,6,0,0,115,2,0,0,0,0,
+ 1,122,19,70,105,108,101,70,105,110,100,101,114,46,95,95,
+- 114,101,112,114,95,95,41,1,78,41,15,114,149,0,0,0,
+- 114,148,0,0,0,114,150,0,0,0,114,151,0,0,0,114,
+- 232,0,0,0,114,69,1,0,0,114,167,0,0,0,114,229,
+- 0,0,0,114,161,0,0,0,114,81,1,0,0,114,226,0,
+- 0,0,114,92,1,0,0,114,230,0,0,0,114,98,1,0,
+- 0,114,62,1,0,0,114,10,0,0,0,114,10,0,0,0,
+- 114,10,0,0,0,114,11,0,0,0,114,84,1,0,0,177,
++ 114,101,112,114,95,95,41,1,78,41,15,114,150,0,0,0,
++ 114,149,0,0,0,114,151,0,0,0,114,152,0,0,0,114,
++ 233,0,0,0,114,70,1,0,0,114,168,0,0,0,114,230,
++ 0,0,0,114,162,0,0,0,114,82,1,0,0,114,227,0,
++ 0,0,114,93,1,0,0,114,231,0,0,0,114,99,1,0,
++ 0,114,63,1,0,0,114,10,0,0,0,114,10,0,0,0,
++ 114,10,0,0,0,114,11,0,0,0,114,85,1,0,0,177,
+ 5,0,0,115,22,0,0,0,8,2,4,7,8,16,8,4,
+- 4,2,8,12,8,5,10,51,8,31,2,1,10,17,114,84,
++ 4,2,8,12,8,5,10,51,8,31,2,1,10,17,114,85,
+ 1,0,0,99,4,0,0,0,0,0,0,0,0,0,0,0,
+ 6,0,0,0,8,0,0,0,67,0,0,0,115,144,0,0,
+ 0,124,0,160,0,100,1,161,1,125,4,124,0,160,0,100,
+@@ -2643,19 +2643,19 @@ const unsigned char _Py_M__importlib_bootstrap_external[] = {
+ 3,124,0,100,5,60,0,87,0,110,18,4,0,116,5,121,
+ 138,1,0,1,0,1,0,89,0,110,2,48,0,100,0,83,
+ 0,41,6,78,218,10,95,95,108,111,97,100,101,114,95,95,
+- 218,8,95,95,115,112,101,99,95,95,114,85,1,0,0,90,
++ 218,8,95,95,115,112,101,99,95,95,114,86,1,0,0,90,
+ 8,95,95,102,105,108,101,95,95,90,10,95,95,99,97,99,
+- 104,101,100,95,95,41,6,218,3,103,101,116,114,164,0,0,
+- 0,114,39,1,0,0,114,32,1,0,0,114,213,0,0,0,
++ 104,101,100,95,95,41,6,218,3,103,101,116,114,165,0,0,
++ 0,114,40,1,0,0,114,33,1,0,0,114,214,0,0,0,
+ 218,9,69,120,99,101,112,116,105,111,110,41,6,90,2,110,
+- 115,114,140,0,0,0,90,8,112,97,116,104,110,97,109,101,
+- 90,9,99,112,97,116,104,110,97,109,101,114,164,0,0,0,
+- 114,210,0,0,0,114,10,0,0,0,114,10,0,0,0,114,
++ 115,114,141,0,0,0,90,8,112,97,116,104,110,97,109,101,
++ 90,9,99,112,97,116,104,110,97,109,101,114,165,0,0,0,
++ 114,211,0,0,0,114,10,0,0,0,114,10,0,0,0,114,
+ 11,0,0,0,218,14,95,102,105,120,95,117,112,95,109,111,
+ 100,117,108,101,75,6,0,0,115,34,0,0,0,0,2,10,
+ 1,10,1,4,1,4,1,8,1,8,1,12,2,10,1,4,
+ 1,14,1,2,1,8,1,8,1,8,1,12,1,12,2,114,
+- 103,1,0,0,99,0,0,0,0,0,0,0,0,0,0,0,
++ 104,1,0,0,99,0,0,0,0,0,0,0,0,0,0,0,
+ 0,3,0,0,0,3,0,0,0,67,0,0,0,115,38,0,
+ 0,0,116,0,116,1,160,2,161,0,102,2,125,0,116,3,
+ 116,4,102,2,125,1,116,5,116,6,102,2,125,2,124,0,
+@@ -2665,17 +2665,17 @@ const unsigned char _Py_M__importlib_bootstrap_external[] = {
+ 108,111,97,100,101,114,115,46,10,10,32,32,32,32,69,97,
+ 99,104,32,105,116,101,109,32,105,115,32,97,32,116,117,112,
+ 108,101,32,40,108,111,97,100,101,114,44,32,115,117,102,102,
+- 105,120,101,115,41,46,10,32,32,32,32,41,7,114,19,1,
+- 0,0,114,187,0,0,0,218,18,101,120,116,101,110,115,105,
+- 111,110,95,115,117,102,102,105,120,101,115,114,32,1,0,0,
+- 114,126,0,0,0,114,39,1,0,0,114,112,0,0,0,41,
++ 105,120,101,115,41,46,10,32,32,32,32,41,7,114,20,1,
++ 0,0,114,188,0,0,0,218,18,101,120,116,101,110,115,105,
++ 111,110,95,115,117,102,102,105,120,101,115,114,33,1,0,0,
++ 114,127,0,0,0,114,40,1,0,0,114,113,0,0,0,41,
+ 3,90,10,101,120,116,101,110,115,105,111,110,115,90,6,115,
+ 111,117,114,99,101,90,8,98,121,116,101,99,111,100,101,114,
+- 10,0,0,0,114,10,0,0,0,114,11,0,0,0,114,208,
++ 10,0,0,0,114,10,0,0,0,114,11,0,0,0,114,209,
+ 0,0,0,98,6,0,0,115,8,0,0,0,0,5,12,1,
+- 8,1,8,1,114,208,0,0,0,99,1,0,0,0,0,0,
++ 8,1,8,1,114,209,0,0,0,99,1,0,0,0,0,0,
+ 0,0,0,0,0,0,10,0,0,0,9,0,0,0,67,0,
+- 0,0,115,132,1,0,0,124,0,97,0,116,0,106,1,97,
++ 0,0,115,164,1,0,0,124,0,97,0,116,0,106,1,97,
+ 1,116,0,106,2,97,2,116,1,106,3,116,4,25,0,125,
+ 1,100,1,100,2,103,1,102,2,100,3,100,4,100,2,103,
+ 2,102,2,102,2,125,2,124,2,68,0,93,108,92,2,125,
+@@ -2686,20 +2686,22 @@ const unsigned char _Py_M__importlib_bootstrap_external[] = {
+ 6,124,3,161,1,125,6,87,0,1,0,113,170,87,0,113,
+ 52,4,0,116,7,121,158,1,0,1,0,1,0,89,0,113,
+ 52,89,0,113,52,48,0,113,52,116,7,100,8,131,1,130,
+- 1,116,8,124,1,100,9,124,6,131,3,1,0,116,8,124,
+- 1,100,10,124,5,131,3,1,0,116,8,124,1,100,11,100,
+- 12,160,9,124,4,161,1,131,3,1,0,116,8,124,1,100,
+- 13,100,14,100,15,132,0,124,4,68,0,131,1,131,3,1,
+- 0,103,0,100,16,162,1,125,7,124,3,100,3,107,2,144,
+- 1,114,6,124,7,160,10,100,17,161,1,1,0,124,7,68,
++ 1,100,9,124,6,106,8,118,0,114,202,124,4,100,10,100,
++ 10,100,11,133,3,25,0,125,4,124,4,100,7,25,0,125,
++ 5,116,9,124,1,100,12,124,6,131,3,1,0,116,9,124,
++ 1,100,13,124,5,131,3,1,0,116,9,124,1,100,14,100,
++ 15,160,10,124,4,161,1,131,3,1,0,116,9,124,1,100,
++ 16,100,17,100,18,132,0,124,4,68,0,131,1,131,3,1,
++ 0,103,0,100,19,162,1,125,7,124,3,100,3,107,2,144,
++ 1,114,38,124,7,160,11,100,20,161,1,1,0,124,7,68,
+ 0,93,52,125,8,124,8,116,1,106,3,118,1,144,1,114,
+- 38,116,0,160,6,124,8,161,1,125,9,110,10,116,1,106,
+- 3,124,8,25,0,125,9,116,8,124,1,124,8,124,9,131,
+- 3,1,0,144,1,113,10,116,8,124,1,100,18,116,11,131,
+- 0,131,3,1,0,116,12,160,13,116,2,160,14,161,0,161,
+- 1,1,0,124,3,100,3,107,2,144,1,114,128,116,15,160,
+- 10,100,19,161,1,1,0,100,20,116,12,118,0,144,1,114,
+- 128,100,21,116,16,95,17,100,22,83,0,41,23,122,205,83,
++ 70,116,0,160,6,124,8,161,1,125,9,110,10,116,1,106,
++ 3,124,8,25,0,125,9,116,9,124,1,124,8,124,9,131,
++ 3,1,0,144,1,113,42,116,9,124,1,100,21,116,12,131,
++ 0,131,3,1,0,116,13,160,14,116,2,160,15,161,0,161,
++ 1,1,0,124,3,100,3,107,2,144,1,114,160,116,16,160,
++ 11,100,22,161,1,1,0,100,23,116,13,118,0,144,1,114,
++ 160,100,24,116,17,95,18,100,10,83,0,41,25,122,205,83,
+ 101,116,117,112,32,116,104,101,32,112,97,116,104,45,98,97,
+ 115,101,100,32,105,109,112,111,114,116,101,114,115,32,102,111,
+ 114,32,105,109,112,111,114,116,108,105,98,32,98,121,32,105,
+@@ -2724,102 +2726,103 @@ const unsigned char _Py_M__importlib_bootstrap_external[] = {
+ 111,99,97,108,115,62,46,60,103,101,110,101,120,112,114,62,
+ 114,0,0,0,0,122,30,105,109,112,111,114,116,108,105,98,
+ 32,114,101,113,117,105,114,101,115,32,112,111,115,105,120,32,
+- 111,114,32,110,116,114,24,0,0,0,114,59,0,0,0,114,
+- 50,0,0,0,114,14,0,0,0,218,20,95,112,97,116,104,
+- 115,101,112,115,95,119,105,116,104,95,99,111,108,111,110,99,
+- 1,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,
+- 4,0,0,0,83,0,0,0,115,22,0,0,0,104,0,124,
+- 0,93,14,125,1,100,0,124,1,155,0,157,2,146,2,113,
+- 4,83,0,114,15,0,0,0,114,10,0,0,0,114,17,0,
+- 0,0,114,10,0,0,0,114,10,0,0,0,114,11,0,0,
+- 0,114,19,0,0,0,144,6,0,0,114,13,0,0,0,122,
+- 25,95,115,101,116,117,112,46,60,108,111,99,97,108,115,62,
+- 46,60,115,101,116,99,111,109,112,62,41,3,114,90,0,0,
+- 0,114,98,0,0,0,114,184,0,0,0,114,215,0,0,0,
+- 114,27,0,0,0,122,4,46,112,121,119,122,6,95,100,46,
+- 112,121,100,84,78,41,18,114,158,0,0,0,114,21,0,0,
+- 0,114,187,0,0,0,114,54,1,0,0,114,149,0,0,0,
+- 218,3,97,108,108,90,18,95,98,117,105,108,116,105,110,95,
+- 102,114,111,109,95,110,97,109,101,114,141,0,0,0,114,153,
+- 0,0,0,114,62,0,0,0,114,61,0,0,0,114,32,0,
+- 0,0,114,44,1,0,0,114,191,0,0,0,114,104,1,0,
+- 0,114,126,0,0,0,114,214,0,0,0,114,218,0,0,0,
+- 41,10,218,17,95,98,111,111,116,115,116,114,97,112,95,109,
+- 111,100,117,108,101,90,11,115,101,108,102,95,109,111,100,117,
+- 108,101,90,10,111,115,95,100,101,116,97,105,108,115,90,10,
+- 98,117,105,108,116,105,110,95,111,115,114,50,0,0,0,114,
+- 59,0,0,0,90,9,111,115,95,109,111,100,117,108,101,90,
+- 13,98,117,105,108,116,105,110,95,110,97,109,101,115,90,12,
+- 98,117,105,108,116,105,110,95,110,97,109,101,90,14,98,117,
+- 105,108,116,105,110,95,109,111,100,117,108,101,114,10,0,0,
+- 0,114,10,0,0,0,114,11,0,0,0,218,6,95,115,101,
+- 116,117,112,109,6,0,0,115,70,0,0,0,0,8,4,1,
+- 6,1,6,2,10,3,22,1,12,2,22,1,8,1,10,1,
+- 10,1,6,2,2,1,10,1,10,1,12,1,12,2,8,2,
+- 12,1,12,1,18,1,22,3,8,1,10,1,10,1,8,1,
+- 12,1,12,2,10,1,16,3,14,1,14,1,10,1,10,1,
+- 10,1,114,110,1,0,0,99,1,0,0,0,0,0,0,0,
+- 0,0,0,0,2,0,0,0,4,0,0,0,67,0,0,0,
+- 115,50,0,0,0,116,0,124,0,131,1,1,0,116,1,131,
+- 0,125,1,116,2,106,3,160,4,116,5,106,6,124,1,142,
+- 0,103,1,161,1,1,0,116,2,106,7,160,8,116,9,161,
+- 1,1,0,100,1,83,0,41,2,122,41,73,110,115,116,97,
+- 108,108,32,116,104,101,32,112,97,116,104,45,98,97,115,101,
+- 100,32,105,109,112,111,114,116,32,99,111,109,112,111,110,101,
+- 110,116,115,46,78,41,10,114,110,1,0,0,114,208,0,0,
+- 0,114,21,0,0,0,114,74,1,0,0,114,191,0,0,0,
+- 114,84,1,0,0,114,98,1,0,0,218,9,109,101,116,97,
+- 95,112,97,116,104,114,61,0,0,0,114,68,1,0,0,41,
+- 2,114,109,1,0,0,90,17,115,117,112,112,111,114,116,101,
+- 100,95,108,111,97,100,101,114,115,114,10,0,0,0,114,10,
+- 0,0,0,114,11,0,0,0,218,8,95,105,110,115,116,97,
+- 108,108,166,6,0,0,115,8,0,0,0,0,2,8,1,6,
+- 1,20,1,114,112,1,0,0,41,1,114,86,0,0,0,41,
+- 1,78,41,3,78,78,78,41,2,114,0,0,0,0,114,0,
+- 0,0,0,41,1,84,41,1,78,41,1,78,41,81,114,151,
+- 0,0,0,114,187,0,0,0,114,90,0,0,0,114,21,0,
+- 0,0,114,98,0,0,0,114,184,0,0,0,114,28,0,0,
+- 0,90,11,95,77,83,95,87,73,78,68,79,87,83,114,106,
+- 1,0,0,114,24,0,0,0,114,215,0,0,0,114,105,1,
+- 0,0,114,50,0,0,0,114,108,1,0,0,114,59,0,0,
+- 0,114,135,0,0,0,114,57,0,0,0,114,62,0,0,0,
+- 114,107,1,0,0,114,31,0,0,0,90,37,95,67,65,83,
+- 69,95,73,78,83,69,78,83,73,84,73,86,69,95,80,76,
+- 65,84,70,79,82,77,83,95,66,89,84,69,83,95,75,69,
+- 89,114,30,0,0,0,114,32,0,0,0,114,39,0,0,0,
+- 114,44,0,0,0,114,46,0,0,0,114,67,0,0,0,114,
+- 74,0,0,0,114,75,0,0,0,114,79,0,0,0,114,80,
+- 0,0,0,114,82,0,0,0,114,85,0,0,0,114,94,0,
+- 0,0,218,4,116,121,112,101,218,8,95,95,99,111,100,101,
+- 95,95,114,186,0,0,0,114,37,0,0,0,114,172,0,0,
+- 0,114,36,0,0,0,114,41,0,0,0,114,3,1,0,0,
+- 114,115,0,0,0,114,111,0,0,0,114,126,0,0,0,114,
+- 112,0,0,0,90,23,68,69,66,85,71,95,66,89,84,69,
+- 67,79,68,69,95,83,85,70,70,73,88,69,83,90,27,79,
+- 80,84,73,77,73,90,69,68,95,66,89,84,69,67,79,68,
+- 69,95,83,85,70,70,73,88,69,83,114,120,0,0,0,114,
+- 127,0,0,0,114,134,0,0,0,114,136,0,0,0,114,138,
+- 0,0,0,114,160,0,0,0,114,167,0,0,0,114,176,0,
+- 0,0,114,180,0,0,0,114,182,0,0,0,114,189,0,0,
+- 0,114,194,0,0,0,114,195,0,0,0,114,200,0,0,0,
+- 218,6,111,98,106,101,99,116,114,209,0,0,0,114,213,0,
+- 0,0,114,214,0,0,0,114,231,0,0,0,114,244,0,0,
+- 0,114,6,1,0,0,114,32,1,0,0,114,39,1,0,0,
+- 114,44,1,0,0,114,19,1,0,0,114,45,1,0,0,114,
+- 66,1,0,0,114,68,1,0,0,114,84,1,0,0,114,103,
+- 1,0,0,114,208,0,0,0,114,110,1,0,0,114,112,1,
+- 0,0,114,10,0,0,0,114,10,0,0,0,114,10,0,0,
+- 0,114,11,0,0,0,218,8,60,109,111,100,117,108,101,62,
+- 1,0,0,0,115,170,0,0,0,4,22,8,1,8,1,8,
+- 1,8,1,8,3,10,1,4,1,8,1,10,2,8,3,4,
+- 1,10,2,6,2,22,1,8,1,8,1,10,1,14,4,4,
+- 1,4,1,2,1,2,255,4,4,8,17,8,5,8,5,8,
+- 6,4,1,10,30,8,6,8,8,8,10,8,9,8,5,8,
+- 7,6,1,10,8,8,5,10,22,10,127,0,20,16,1,12,
+- 2,4,1,4,2,6,2,6,2,8,2,16,71,8,40,8,
+- 19,8,12,8,12,8,28,8,17,8,33,8,28,8,24,10,
+- 13,10,10,10,11,8,14,6,3,4,1,2,255,12,68,14,
+- 64,14,29,16,127,0,17,14,72,18,45,18,26,4,3,18,
+- 58,14,63,14,42,14,127,0,20,14,127,0,27,10,23,8,
+- 11,8,57,
++ 111,114,32,110,116,90,7,77,83,89,83,84,69,77,78,114,
++ 130,0,0,0,114,24,0,0,0,114,60,0,0,0,114,51,
++ 0,0,0,114,14,0,0,0,218,20,95,112,97,116,104,115,
++ 101,112,115,95,119,105,116,104,95,99,111,108,111,110,99,1,
++ 0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,4,
++ 0,0,0,83,0,0,0,115,22,0,0,0,104,0,124,0,
++ 93,14,125,1,100,0,124,1,155,0,157,2,146,2,113,4,
++ 83,0,114,15,0,0,0,114,10,0,0,0,114,17,0,0,
++ 0,114,10,0,0,0,114,10,0,0,0,114,11,0,0,0,
++ 114,19,0,0,0,148,6,0,0,114,13,0,0,0,122,25,
++ 95,115,101,116,117,112,46,60,108,111,99,97,108,115,62,46,
++ 60,115,101,116,99,111,109,112,62,41,3,114,91,0,0,0,
++ 114,99,0,0,0,114,185,0,0,0,114,216,0,0,0,114,
++ 28,0,0,0,122,4,46,112,121,119,122,6,95,100,46,112,
++ 121,100,84,41,19,114,159,0,0,0,114,21,0,0,0,114,
++ 188,0,0,0,114,55,1,0,0,114,150,0,0,0,218,3,
++ 97,108,108,90,18,95,98,117,105,108,116,105,110,95,102,114,
++ 111,109,95,110,97,109,101,114,142,0,0,0,114,25,0,0,
++ 0,114,154,0,0,0,114,63,0,0,0,114,62,0,0,0,
++ 114,33,0,0,0,114,45,1,0,0,114,192,0,0,0,114,
++ 105,1,0,0,114,127,0,0,0,114,215,0,0,0,114,219,
++ 0,0,0,41,10,218,17,95,98,111,111,116,115,116,114,97,
++ 112,95,109,111,100,117,108,101,90,11,115,101,108,102,95,109,
++ 111,100,117,108,101,90,10,111,115,95,100,101,116,97,105,108,
++ 115,90,10,98,117,105,108,116,105,110,95,111,115,114,51,0,
++ 0,0,114,60,0,0,0,90,9,111,115,95,109,111,100,117,
++ 108,101,90,13,98,117,105,108,116,105,110,95,110,97,109,101,
++ 115,90,12,98,117,105,108,116,105,110,95,110,97,109,101,90,
++ 14,98,117,105,108,116,105,110,95,109,111,100,117,108,101,114,
++ 10,0,0,0,114,10,0,0,0,114,11,0,0,0,218,6,
++ 95,115,101,116,117,112,109,6,0,0,115,76,0,0,0,0,
++ 8,4,1,6,1,6,2,10,3,22,1,12,2,22,1,8,
++ 1,10,1,10,1,6,2,2,1,10,1,10,1,12,1,12,
++ 2,8,2,10,1,14,1,8,2,12,1,12,1,18,1,22,
++ 3,8,1,10,1,10,1,8,1,12,1,12,2,10,1,16,
++ 3,14,1,14,1,10,1,10,1,10,1,114,111,1,0,0,
++ 99,1,0,0,0,0,0,0,0,0,0,0,0,2,0,0,
++ 0,4,0,0,0,67,0,0,0,115,50,0,0,0,116,0,
++ 124,0,131,1,1,0,116,1,131,0,125,1,116,2,106,3,
++ 160,4,116,5,106,6,124,1,142,0,103,1,161,1,1,0,
++ 116,2,106,7,160,8,116,9,161,1,1,0,100,1,83,0,
++ 41,2,122,41,73,110,115,116,97,108,108,32,116,104,101,32,
++ 112,97,116,104,45,98,97,115,101,100,32,105,109,112,111,114,
++ 116,32,99,111,109,112,111,110,101,110,116,115,46,78,41,10,
++ 114,111,1,0,0,114,209,0,0,0,114,21,0,0,0,114,
++ 75,1,0,0,114,192,0,0,0,114,85,1,0,0,114,99,
++ 1,0,0,218,9,109,101,116,97,95,112,97,116,104,114,62,
++ 0,0,0,114,69,1,0,0,41,2,114,110,1,0,0,90,
++ 17,115,117,112,112,111,114,116,101,100,95,108,111,97,100,101,
++ 114,115,114,10,0,0,0,114,10,0,0,0,114,11,0,0,
++ 0,218,8,95,105,110,115,116,97,108,108,170,6,0,0,115,
++ 8,0,0,0,0,2,8,1,6,1,20,1,114,113,1,0,
++ 0,41,1,114,87,0,0,0,41,1,78,41,3,78,78,78,
++ 41,2,114,0,0,0,0,114,0,0,0,0,41,1,84,41,
++ 1,78,41,1,78,41,81,114,152,0,0,0,114,188,0,0,
++ 0,114,91,0,0,0,114,21,0,0,0,114,99,0,0,0,
++ 114,185,0,0,0,114,29,0,0,0,90,11,95,77,83,95,
++ 87,73,78,68,79,87,83,114,107,1,0,0,114,24,0,0,
++ 0,114,216,0,0,0,114,106,1,0,0,114,51,0,0,0,
++ 114,109,1,0,0,114,60,0,0,0,114,136,0,0,0,114,
++ 58,0,0,0,114,63,0,0,0,114,108,1,0,0,114,32,
++ 0,0,0,90,37,95,67,65,83,69,95,73,78,83,69,78,
++ 83,73,84,73,86,69,95,80,76,65,84,70,79,82,77,83,
++ 95,66,89,84,69,83,95,75,69,89,114,31,0,0,0,114,
++ 33,0,0,0,114,40,0,0,0,114,45,0,0,0,114,47,
++ 0,0,0,114,68,0,0,0,114,75,0,0,0,114,76,0,
++ 0,0,114,80,0,0,0,114,81,0,0,0,114,83,0,0,
++ 0,114,86,0,0,0,114,95,0,0,0,218,4,116,121,112,
++ 101,218,8,95,95,99,111,100,101,95,95,114,187,0,0,0,
++ 114,38,0,0,0,114,173,0,0,0,114,37,0,0,0,114,
++ 42,0,0,0,114,4,1,0,0,114,116,0,0,0,114,112,
++ 0,0,0,114,127,0,0,0,114,113,0,0,0,90,23,68,
++ 69,66,85,71,95,66,89,84,69,67,79,68,69,95,83,85,
++ 70,70,73,88,69,83,90,27,79,80,84,73,77,73,90,69,
++ 68,95,66,89,84,69,67,79,68,69,95,83,85,70,70,73,
++ 88,69,83,114,121,0,0,0,114,128,0,0,0,114,135,0,
++ 0,0,114,137,0,0,0,114,139,0,0,0,114,161,0,0,
++ 0,114,168,0,0,0,114,177,0,0,0,114,181,0,0,0,
++ 114,183,0,0,0,114,190,0,0,0,114,195,0,0,0,114,
++ 196,0,0,0,114,201,0,0,0,218,6,111,98,106,101,99,
++ 116,114,210,0,0,0,114,214,0,0,0,114,215,0,0,0,
++ 114,232,0,0,0,114,245,0,0,0,114,7,1,0,0,114,
++ 33,1,0,0,114,40,1,0,0,114,45,1,0,0,114,20,
++ 1,0,0,114,46,1,0,0,114,67,1,0,0,114,69,1,
++ 0,0,114,85,1,0,0,114,104,1,0,0,114,209,0,0,
++ 0,114,111,1,0,0,114,113,1,0,0,114,10,0,0,0,
++ 114,10,0,0,0,114,10,0,0,0,114,11,0,0,0,218,
++ 8,60,109,111,100,117,108,101,62,1,0,0,0,115,170,0,
++ 0,0,4,22,8,1,8,1,8,1,8,1,8,3,10,1,
++ 4,1,8,1,10,2,8,3,4,1,10,2,6,2,22,1,
++ 8,1,8,1,10,1,14,4,4,1,4,1,2,1,2,255,
++ 4,4,8,17,8,5,8,5,8,6,4,1,10,30,8,6,
++ 8,8,8,10,8,9,8,5,8,7,6,1,10,8,8,5,
++ 10,22,10,127,0,20,16,1,12,2,4,1,4,2,6,2,
++ 6,2,8,2,16,71,8,40,8,19,8,12,8,12,8,28,
++ 8,17,8,33,8,28,8,24,10,13,10,10,10,11,8,14,
++ 6,3,4,1,2,255,12,68,14,64,14,29,16,127,0,17,
++ 14,72,18,45,18,26,4,3,18,58,14,63,14,42,14,127,
++ 0,20,14,127,0,27,10,23,8,11,8,61,
+ };
+--
+2.32.0
+
diff --git a/0129-CI-clean-up.patch b/0129-CI-clean-up.patch
new file mode 100644
index 000000000000..ae315b925a1c
--- /dev/null
+++ b/0129-CI-clean-up.patch
@@ -0,0 +1,26 @@
+From 1f588119d6fade355756f06124a246456e7a5c0e Mon Sep 17 00:00:00 2001
+From: Christoph Reiter <reiter.christoph@gmail.com>
+Date: Sun, 1 Aug 2021 16:14:20 +0200
+Subject: [PATCH 129/N] CI: clean up
+
+---
+ .github/workflows/mingw.yml | 3 ---
+ 1 file changed, 3 deletions(-)
+
+diff --git a/.github/workflows/mingw.yml b/.github/workflows/mingw.yml
+index 17aab89..0662196 100644
+--- a/.github/workflows/mingw.yml
++++ b/.github/workflows/mingw.yml
+@@ -74,9 +74,6 @@ jobs:
+ --enable-loadable-sqlite-extensions \
+ --enable-optimizations
+
+- # We patch importlib which is embedded in C headers, so regenerate them
+- make regen-importlib
+-
+ make -j8
+
+ - name: Run Smoke Test (build)
+--
+2.32.0
+
diff --git a/0130-configure.ac-default-to-with-nt-threads-with-mingw.patch b/0130-configure.ac-default-to-with-nt-threads-with-mingw.patch
new file mode 100644
index 000000000000..a9192b00e44b
--- /dev/null
+++ b/0130-configure.ac-default-to-with-nt-threads-with-mingw.patch
@@ -0,0 +1,56 @@
+From 0973babb46f37ae7a2c7cf4f6884ea700802d9a9 Mon Sep 17 00:00:00 2001
+From: Christoph Reiter <reiter.christoph@gmail.com>
+Date: Sun, 1 Aug 2021 18:33:52 +0200
+Subject: [PATCH 130/N] configure.ac: default to --with-nt-threads with mingw
+
+Everything else is untested, so make the default system dependent
+---
+ configure.ac | 21 ++++++++++++++-------
+ 1 file changed, 14 insertions(+), 7 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 82bea12..0497199 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -2215,24 +2215,31 @@ 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_MSG_CHECKING([for --with-nt-threads])
+ AC_ARG_WITH(nt-threads,
+- AS_HELP_STRING([--with-nt-threads], [build with windows threads]),
++ AS_HELP_STRING([--with-nt-threads], [build with windows threads (default is system-dependent)]),
+ [
+ case $withval in
+ no) with_nt_threads=no;;
+ yes) with_nt_threads=yes;;
+ *) with_nt_threads=yes;;
+- esac], [
+- with_nt_threads=no])
++ esac
++], [
++ case $host in
++ *-*-mingw*) with_nt_threads=yes;;
++ *) with_nt_threads=no;;
++ esac
++])
++AC_MSG_RESULT([$with_nt_threads])
++
+ if test $with_nt_threads = yes ; then
++AC_MSG_CHECKING([whether linking with nt-threads work])
+ AC_LINK_IFELSE([
+ AC_LANG_PROGRAM([[]],[[_beginthread(0, 0, 0);]])
+ ],
+- [with_nt_threads=yes],
+- [with_nt_threads=no])
++ [AC_MSG_RESULT([yes])],
++ [AC_MSG_ERROR([failed to link with nt-threads])])
+ fi
+-AC_MSG_RESULT([$with_nt_threads])
+
+ if test $with_nt_threads = yes ; then
+ dnl temporary default flag to avoid additional pthread checks
+--
+2.32.0
+
diff --git a/0131-configure.ac-don-t-check-for-clock_-functions.patch b/0131-configure.ac-don-t-check-for-clock_-functions.patch
new file mode 100644
index 000000000000..e77f120f29a2
--- /dev/null
+++ b/0131-configure.ac-don-t-check-for-clock_-functions.patch
@@ -0,0 +1,36 @@
+From 839f384b8d3f1b77bef639609246f67e979d8159 Mon Sep 17 00:00:00 2001
+From: Christoph Reiter <reiter.christoph@gmail.com>
+Date: Sun, 1 Aug 2021 18:35:17 +0200
+Subject: [PATCH 131/N] configure.ac: don't check for clock_ functions
+
+They shouldn't be exposed on Windows and lead to winpthread being linked in
+---
+ configure.ac | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+diff --git a/configure.ac b/configure.ac
+index 0497199..23dd59b 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -4369,6 +4369,9 @@ char *r = crypt_r("", "", &d);
+ [])
+ )
+
++case $host in
++ *-*-mingw*) ;;
++ *)
+ AC_CHECK_FUNCS(clock_gettime, [], [
+ AC_CHECK_LIB(rt, clock_gettime, [
+ LIBS="$LIBS -lrt"
+@@ -4389,6 +4392,8 @@ AC_CHECK_FUNCS(clock_settime, [], [
+ AC_DEFINE(HAVE_CLOCK_SETTIME, 1)
+ ])
+ ])
++ ;;
++esac
+
+ AC_MSG_CHECKING(for major, minor, and makedev)
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[
+--
+2.32.0
+
diff --git a/0132-CI-clean-up.patch b/0132-CI-clean-up.patch
new file mode 100644
index 000000000000..5375a359a233
--- /dev/null
+++ b/0132-CI-clean-up.patch
@@ -0,0 +1,40 @@
+From e8a5966d9e80ed05b7792c910111db145be24475 Mon Sep 17 00:00:00 2001
+From: Christoph Reiter <reiter.christoph@gmail.com>
+Date: Sun, 1 Aug 2021 18:48:31 +0200
+Subject: [PATCH 132/N] CI: clean up
+
+---
+ .github/workflows/mingw.yml | 3 ---
+ 1 file changed, 3 deletions(-)
+
+diff --git a/.github/workflows/mingw.yml b/.github/workflows/mingw.yml
+index 0662196..f860493 100644
+--- a/.github/workflows/mingw.yml
++++ b/.github/workflows/mingw.yml
+@@ -65,7 +65,6 @@ jobs:
+ --host=${MINGW_CHOST} \
+ --build=${MINGW_CHOST} \
+ --enable-shared \
+- --with-nt-threads \
+ --with-system-expat \
+ --with-system-ffi \
+ --with-system-libmpdec \
+@@ -167,7 +166,6 @@ jobs:
+ --host=x86_64-w64-mingw32 \
+ --build=x86_64-pc-linux-gnu \
+ --enable-shared \
+- --with-nt-threads \
+ --with-system-expat \
+ --with-system-ffi \
+ --with-system-libmpdec \
+@@ -178,7 +176,6 @@ jobs:
+ make -j8
+
+ make install DESTDIR="$(pwd)/install"
+- cp /usr/x86_64-w64-mingw32/bin/libwinpthread-1.dll install/usr/local/bin
+
+ - name: 'Zip files'
+ run: |
+--
+2.32.0
+
diff --git a/0133-smoketests-update.patch b/0133-smoketests-update.patch
new file mode 100644
index 000000000000..0178d817dfe3
--- /dev/null
+++ b/0133-smoketests-update.patch
@@ -0,0 +1,30 @@
+From 61c5a4a14932539b31878de0b60bc98bcba791b9 Mon Sep 17 00:00:00 2001
+From: Christoph Reiter <reiter.christoph@gmail.com>
+Date: Sun, 1 Aug 2021 18:48:43 +0200
+Subject: [PATCH 133/N] smoketests: update
+
+---
+ mingw_smoketests.py | 7 +++++++
+ 1 file changed, 7 insertions(+)
+
+diff --git a/mingw_smoketests.py b/mingw_smoketests.py
+index 3f41855..0b99c88 100644
+--- a/mingw_smoketests.py
++++ b/mingw_smoketests.py
+@@ -57,6 +57,13 @@ class Tests(unittest.TestCase):
+ self.assertFalse(hasattr(sys, 'getdlopenflags'))
+ self.assertFalse([n for n in dir(os) if n.startswith("RTLD_")])
+
++ def test_time_no_unix_stuff(self):
++ import time
++ self.assertFalse([n for n in dir(time) if n.startswith("clock_")])
++ self.assertFalse([n for n in dir(time) if n.startswith("CLOCK_")])
++ self.assertFalse([n for n in dir(time) if n.startswith("pthread_")])
++ self.assertFalse(hasattr(time, 'tzset'))
++
+ def test_strftime(self):
+ import time
+ with self.assertRaises(ValueError):
+--
+2.32.0
+
diff --git a/0134-expanduser-normpath-paths-coming-from-env-vars.patch b/0134-expanduser-normpath-paths-coming-from-env-vars.patch
new file mode 100644
index 000000000000..9b7fb03aa16a
--- /dev/null
+++ b/0134-expanduser-normpath-paths-coming-from-env-vars.patch
@@ -0,0 +1,35 @@
+From 6f3a083adc2e679029614ecb2ce4aa2f066324b1 Mon Sep 17 00:00:00 2001
+From: Christoph Reiter <reiter.christoph@gmail.com>
+Date: Sun, 8 Aug 2021 10:17:35 +0200
+Subject: [PATCH 134/N] expanduser: normpath paths coming from env vars
+
+This makes sure we get the same paths as with related functions in pathlib.
+---
+ Lib/ntpath.py | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/Lib/ntpath.py b/Lib/ntpath.py
+index 77f5614..5d1c6b9 100644
+--- a/Lib/ntpath.py
++++ b/Lib/ntpath.py
+@@ -319,7 +319,7 @@ def expanduser(path):
+ if 'USERPROFILE' in os.environ:
+ userhome = os.environ['USERPROFILE']
+ elif not 'HOMEPATH' in os.environ:
+- return path
++ return os.path.normpath(path)
+ else:
+ try:
+ drive = os.environ['HOMEDRIVE']
+@@ -333,7 +333,7 @@ def expanduser(path):
+ if i != 1: #~user
+ userhome = join(dirname(userhome), path[1:i])
+
+- return userhome + path[i:]
++ return os.path.normpath(userhome) + path[i:]
+
+
+ # Expand paths containing shell variable substitutions.
+--
+2.32.0
+
diff --git a/0135-sysconfig-fix-platlib-purelib-paths.patch b/0135-sysconfig-fix-platlib-purelib-paths.patch
new file mode 100644
index 000000000000..50d1a65e1c80
--- /dev/null
+++ b/0135-sysconfig-fix-platlib-purelib-paths.patch
@@ -0,0 +1,29 @@
+From 86ec35c1c09f3ef98cab669915a9aec7a7ddb275 Mon Sep 17 00:00:00 2001
+From: Christoph Reiter <reiter.christoph@gmail.com>
+Date: Sun, 8 Aug 2021 10:19:01 +0200
+Subject: [PATCH 135/N] sysconfig: fix platlib/purelib paths
+
+make them match what we use in distutils. pip is moving from distutils
+to sysconfig and this is breaking things.
+---
+ Lib/sysconfig.py | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/Lib/sysconfig.py b/Lib/sysconfig.py
+index 854b382..0729dc9 100644
+--- a/Lib/sysconfig.py
++++ b/Lib/sysconfig.py
+@@ -50,8 +50,8 @@ _INSTALL_SCHEMES = {
+ 'nt': {
+ '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}',
++ 'purelib': '{base}/lib/python{py_version_short}/site-packages',
++ 'platlib': '{base}/lib/python{py_version_short}/site-packages',
+ 'include': '{installed_base}/include/python{py_version_short}',
+ 'platinclude': '{installed_base}/include/python{py_version_short}',
+ 'scripts': '{base}/bin',
+--
+2.32.0
+
diff --git a/0136-smoketests-update.patch b/0136-smoketests-update.patch
new file mode 100644
index 000000000000..8874db793f4f
--- /dev/null
+++ b/0136-smoketests-update.patch
@@ -0,0 +1,55 @@
+From 05def4bb6e292c3967ef3b219cc720ae28446272 Mon Sep 17 00:00:00 2001
+From: Christoph Reiter <reiter.christoph@gmail.com>
+Date: Sun, 8 Aug 2021 10:19:57 +0200
+Subject: [PATCH 136/N] smoketests: update
+
+---
+ mingw_smoketests.py | 32 ++++++++++++++++++++++++++++++++
+ 1 file changed, 32 insertions(+)
+
+diff --git a/mingw_smoketests.py b/mingw_smoketests.py
+index 0b99c88..dc26169 100644
+--- a/mingw_smoketests.py
++++ b/mingw_smoketests.py
+@@ -39,6 +39,38 @@ _UCRT = "clang" in sysconfig.get_platform() or "ucrt" in sysconfig.get_platform(
+
+ class Tests(unittest.TestCase):
+
++ def test_userdir_path_sep(self):
++ # Make sure os.path and pathlib use the same path separators
++ from unittest import mock
++ from os.path import expanduser
++ from pathlib import Path
++
++ profiles = ["C:\\foo", "C:/foo"]
++ for profile in profiles:
++ with mock.patch.dict(os.environ, {"USERPROFILE": profile}):
++ self.assertEqual(expanduser("~"), os.path.normpath(expanduser("~")))
++ self.assertEqual(str(Path("~").expanduser()), expanduser("~"))
++ self.assertEqual(str(Path.home()), expanduser("~"))
++
++ def test_sysconfig_schemes(self):
++ # https://github.com/msys2/MINGW-packages/issues/9319
++ import sysconfig
++ from distutils.dist import Distribution
++ from distutils.command.install import install
++
++ names = ['scripts', 'purelib', 'platlib', 'data', 'include']
++ for scheme in ["nt", "nt_user"]:
++ for name in names:
++ c = install(Distribution({"name": "foobar"}))
++ c.user = (scheme == "nt_user")
++ c.finalize_options()
++ if name == "include":
++ dist_path = os.path.dirname(getattr(c, "install_" + "headers"))
++ else:
++ dist_path = getattr(c, "install_" + name)
++ sys_path = sysconfig.get_path(name, scheme)
++ self.assertEqual(dist_path, sys_path, (scheme, name))
++
+ def test_ctypes_find_library(self):
+ from ctypes.util import find_library
+ from ctypes import cdll
+--
+2.32.0
+
diff --git a/PKGBUILD b/PKGBUILD
index 7e574c9fcf6a..b011027ac54f 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -4,8 +4,8 @@
# Contributor: Dr-Shadow <kerdiles.robin@gmail.com>
pkgname=mingw-w64-python
-pkgver=3.8.6
-_pybasever=3.8
+pkgver=3.9.6
+_pybasever=3.9
pkgrel=1
pkgdesc="Next generation of the python high-level scripting language (mingw-w64)"
arch=('any')
@@ -25,17 +25,284 @@ depends=('mingw-w64-crt'
'mingw-w64-mpdecimal'
'mingw-w64-sqlite')
-makedepends=('mingw-w64-configure' 'mingw-w64-wine' 'python')
+makedepends=('mingw-w64-configure' 'mingw-w64-wine' 'python' 'autoconf-archive')
optdepends=('mingw-w64-wine: runtime support')
options=('staticlibs' '!buildflags' '!strip')
source=("https://www.python.org/ftp/python/${pkgver}/Python-${pkgver}.tar.xz"
- "patches.tar.xz"
+ 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
+ 0096-Add-CI-to-Build-and-Test.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
+ 0100-Add-a-test-to-build-C-Ext.patch
+ 0101-Add-some-platform-related-tests.patch
+ 0102-squash-CI-use-O2.patch
+ 0103-squash-Fixup-.rc-handling.patch
+ 0104-squash-Set-MS_DLL_ID.patch
+ 0105-squash-CI-Clean-up.patch
+ 0106-squash-CI-use-srcdir-builddir.patch
+ 0107-squash-fix-srcdir-builddir.patch
+ 0108-build-Cleanup-ncursesw-include-lookup-code.patch
+ 0109-tests-fix-test_bytes.patch
+ 0110-time-fix-strftime-not-raising-for-invalid-year-value.patch
+ 0111-winconsoleio-build-_testconsole-which-is-required-fo.patch
+ 0112-Adjust-Py_WINVER-for-our-Win-7-target.patch
+ 0113-ctypes-find_library-c-should-return-None-with-ucrt.patch
+ 0114-build-Disable-checks-for-dlopen-dlfcn.patch
+ 0115-Fix-install-location-of-the-import-library.patch
+ 0116-Set-MSYS2_ARG_CONV_EXCL-for-the-shared-Python-module.patch
+ 0117-build-Integrate-venvlauncher-build-installation-into.patch
+ 0118-Update-smoketests.patch
+ 0119-CI-clean-up-the-build-enforce-some-tests.patch
+ 0120-1-2-AC_RUN_IFELSE-replace.patch
+ 0121-Add-return-0-to-the-test-code.patch
+ 0122-2-2-AC_RUN_IFELSE-replace.patch
+ 0123-Make-sure-MACHDEP-matches-sys.platform.patch
+ 0124-CI-add-a-cross-build-job.patch
+ 0125-Revert-Adjust-Py_WINVER-for-our-Win-7-target.patch
+ 0126-Set-_WIN32_WINNT-version-in-configure.ac.patch
+ 0127-CI-cleanup.patch
+ 0128-Commit-regenerated-importlib.patch
+ 0129-CI-clean-up.patch
+ 0130-configure.ac-default-to-with-nt-threads-with-mingw.patch
+ 0131-configure.ac-don-t-check-for-clock_-functions.patch
+ 0132-CI-clean-up.patch
+ 0133-smoketests-update.patch
+ 0134-expanduser-normpath-paths-coming-from-env-vars.patch
+ 0135-sysconfig-fix-platlib-purelib-paths.patch
+ 0136-smoketests-update.patch
"wine-python.sh")
-sha1sums=('6ee446eaacf901a3305565bd6569e2de135168e3'
- 'fd5dea1f6f0a887cfdea90c40de3ff327a6b12da'
- 'a024e7fd7eea7984a0d050164a4a015dea762da7')
-sha512sums=('22faec84f6e172e1ac7c6bd6fd37e9b6ae4afc91cf5136aa8cac8ebbed8d18793f9196e8749b8ccc43447cb6c41cb450f65ea72dd363c06dfaeb14e0455f5560'
- 'e6dc81c167c733cba70c6a39530c002d3fd5c753b5b9c707973da27b66b4cb5c3a186bed9834de269eec6e763c7731c3b7aec2bb8736b26686bd89de76127073'
+sha512sums=('01c529e3207738d8771caeb5ed6217e10745c21aa39832fe3185e1c87fdb6aedead97ce38dbb11e02d873654028bd8071c3f345c18452769520723284efe9dc1'
+ '2f1e91391db0f50e7de5562b9166a83b326c9a6f875011d1c503080f43498a0368c50dab07a655fedcd452ba3f769ee695e3253d2fe541cb29884efdaa4993c2'
+ 'f459f75f47ca756cb8bbe411762c733c5d02382d74d68e57b3a54d8eddf405cfa1e55c2ec45773788aba829e9a9548567557c0d2d306b941f2a530964a07e5a5'
+ 'b06ede9530d27583a8d3538b042ed94fe6f29c16d2f1990d1b6763d7ba448ef721accce086529f84b6b5086ddc6aea1c7393b8e1aaa3a42942cd67619846739c'
+ '1b2049a24a539ce4b7ae9d066c5624f42f05067b3a78753f583dd98f02e0455cc5f68d76e09ba3a9616719138533c08fbde598e7c83a93923d67dd018a45b763'
+ '80bdd16b5142a244ab2ceaffb50ae3a1b7b93977def05b6dd244e101a1701f2cc01357e1e756c8c548192141247c20ef198789e6923ce5751062eda2ed44da62'
+ '181ee229d2b64a6305ff00263b574f1331ba02613ab6a9ed502659a960c7beaee161cea003adef65dcacab4cbbb600668756ea1b87fff06401996f455f950573'
+ '0b5e951bd433998a0ceac079aa40a67a0d0ba1679fae2663999eef1024fab5daad5ad67b8e091172aecf0761568b97ac804e51067d83db57b9ab6445562c0737'
+ 'bed18d78b11615ada2063b6246fa501e63dfec5009dd5ee316a39ca6a927fc095762399ecac5c7fb043af4c9a008b145b61ffd7f02b41dbd58a1a9342d1bb202'
+ '2981458b0e6448305f3da4e2b328e666f93495216fe72fe21572af1fb945d2da68318789b7c0d5888e7f255c10c041e98758fe17db58a50b269b81fa00e7591e'
+ '78f54dc07100bc0cd7ecebb7b7976f17dc959a8c894e32e48a04419eddc04b290e7fc25ec3db2c6da730046d5e571bdf2e64c63dbb8569a7a14d36543d13515e'
+ '18244172a9adf349710b8851eae7667926defacb21534ec085b280648effb402e997ca496a52377f8bc10124aa2f8e611f23399cabb719d7493033547b6ad671'
+ '0d7354a0846c2c5e3975f7c757b4c3d30392bef511036416c09c43290ca4f34c506d50bb9e59bdbe0ab29b1757b62767b3cf095c5e5d5cf2eae15583674dcc55'
+ '444cc70ed2a0ac37f82763ecdcf2024d480e6631583b64fbb34976a5b9fff814b61816f681ed4baf24094ddeb81dbffdc68b0342978a5b5f4eb0d37bb3f0d7f4'
+ '16a290ba51c53e902f71b85e8b4bb4f65129b0dc61a571e71c8cf9352307700ddbd6ca9d891c74224ff56eff795face7d228fdf60db3015f3ff61c2e6ce80673'
+ '8b99b6332e12d2f84c3f21d90b7ab946a03fba80cf0cee068bc1958a03514db431971ec7db158f5db37f676e6159e50d60fad07f7d6b303c2852922d4241163b'
+ '014c379e92eecfe2e22888f039bcb5f26d9c23e33ce29e3905e6d3cec2792de71919a1f6517d528820c7babac163b94bffd684a0404673943335e7f9e61132b2'
+ 'f4a97bd111607c7dda2b0b62dd93c137de89e49c1e2c782efca02a1c0536bdc20b9537c1f0464e383e0e1b29d76ad87470b8bb55ad93725d9075bee36dcadb1d'
+ '78db3161f0810c823732302046338a341ee50601b3b6eb9a1eb72f13dc2789eb84c5d8e4c2d9812921b1b7c480c070e1dff5e1bb7236cd278689f200663a82c3'
+ 'f1c5021498addfc076837d94f5ae240cf62a17c9a04f7ec8c9929a25a02fedc0f975f56155be3aa79aa111fb6c01e96b9cfb2a75a81add576884d13fb2b220e6'
+ 'e90da0b8787fdeb9b0c9dc75134e18d23ddbcf0da667402ba80cd43956ee3dc5cc2ffb62a0ff980fe50bb8e7a617a018bc6ba93adffe8d70759a0020ff65749a'
+ '32f8b63d344b9438df8794bd76a4d7e95ce25762c2eb1ca9e2b1eab084386936b09b6ad001d8affdac4d6600143ecb043870ec65c20251f05385e3ebcfd2fc67'
+ '53ed9e2b211f025986e69da484c2583848822ada0dbfcde01f16202a15a5dde133a4df74d7f900642ad7893d79ece91ab75cb7ec921889dc0391fcbb336d6715'
+ '8a7f0c3e7659210618d10d942ba5efab3aa403accc9d360458ad333d7f10656260145e9d0b2588f2cc26f1b2806960a688c565ecf4a9118fd4f071834fa33150'
+ 'ac82ec4597561650f711bef98c94146da8caec5c8c0794d82f7707f6ce89d82dff2b55a91db2c1b778cde11de5cd7350ea57ef4ede2836fad1212ed190affea9'
+ '081b954260767bcb49bc3f8f1f35af15d5b261f69cca6697d95ab57bb191622990ba672de54e09fc692777beb31682d49446e387cdd80b4cd280a6869caa53f2'
+ '9cd710d2b4a2a029bb89473bfe8212cbf16368c795e45be7acfbb4efbd8a45fc01c90387c6e97a8490d4f04a0cfd34ee16aad094463d159b3aee18bc4da1da6b'
+ '7dfd4a36f0ab554edfa6d1be2b1c5892bee41c368cc5e21e0d6126bdca040918068b63fcde07cefcf361d3afee79708ff6631c3f886d85e3b5b60b508a0e67ba'
+ 'a8eede1f4a2844a98be1ff5c7e8eb74b36c8912af9c2381c80e8ec2c19136aed541f3dd4e22de7dd8270b1b11323d6b769b876aaf777f8095aaf431948fd3e73'
+ '166ef0748798b284fbc1aee53fe31af8115ad5de47c47ba288deda43d8e578c3e72b14a4a80df17d13b8af8a59787e84e932910840977e60a80afee21fbddb67'
+ '99f93ac8e1f1c36e09a4bf3aa556c9fa1dc6c4019ba255aded5552950ff769776c7218d1d65b58f09cee8ed56495f841f013f2c693edb079769a62336274605f'
+ 'c12a277de36c04f80f40c9dbecdb4bf1fa55dcbc393d073083039bd0994e53f57dc3fdb8ee52e80a234ed5b6be25e8a02c06675f0d56cedc201d6b6d02fe67b8'
+ '3b5c73ef484f69ad4280078e6e017a5331b9a7f7eb76e52d0883809b5927d63b59fc70233df1bb1253c597693646959dda87112240927840015a91a3c0e53e15'
+ '064e14df2333bce7994711ec9631c3a7a5c1dde8b6a188ac7dbe446cc17789433dafbdd7ae6a1ac9f8475bcc7ba643e76c34218c4c53508ea0b070c6abb5b3d7'
+ '6f61ccbda6d277a7efa787a2271e98404dd1c0e70f5ba92ca36c3a5d85d1be7d278a24f5e7ec911950218d90e2e93337453f474431e76759a02dea0a95433948'
+ 'bcb1d53e89548b0d146f95fd9ec82680dd3ad0b8aba1db7f6c4b576de63c45a764e142370eaae45d798e198e459ef4fe771494701c944754c3729aca4b08a59b'
+ '6eda961b04e1ea775cfeb9fd7451cb1e6521bade46b7671f7c035ac71b9aed6388db627a8b5a4d8945261a772fb0e4b852b5c9dee75f1508509cb1d71cb23145'
+ 'd16762af58a1582d66773e47426f953189415d801af8d47a6968a8e4a87a219bee763292f4ef9bf302186d149fc763841c8f6f17f462ddcde28547cb9a6150d3'
+ 'c2fbfb69a4344f764318ffcb096ad13efb6c00a5f75ee226e88cd2bb90fb0017d5bfdb3fa880f6db1fa522446f64c97c2157fd886f81886904eb233286fb5a71'
+ 'cf28075e8e10ecd9867b7997f6707997c3180151d228809875b6432b44e610784d8647ff3f403196261e993de9184b5f71621e9504d4f54a8c5d52bacce4ceda'
+ 'a8b43befb0ef4b700c1bb22808e4f7b142e2ad0c1ddb3786f7881395b3d34e38dd7d35136c22af5e2f4051fe0d79d97ec0418748ad61eabe97175047d742f39f'
+ 'f0d72cbfc2e6d1b0c93528389b7576221b8a33feeecddfc0653df21b6887ea7ba4dc549044353243e90d0628537e4af6ef890703684aed69d32075889ebd0044'
+ '77e8a08cbc638aa6353f564be5e4fb78ee97a4c2d51c741bcb89bcd95b9d029d97a9bfa251a11b9c84f9f75c41c8327890b8c7a041dd12453094d9a41f0fd1d9'
+ 'b98f8dc0b71bd57be7dcd56b28c9534f4175f0407b0eab178e7642149422045a3242ea1257c4aa949e54dcee163529b50b997774507f09fe2ec17b5401d3f8ae'
+ 'ce40ba66738c5bd1494b06c6b09dd3209afed003c097c5ed3be86cd11e3325364a866fd136679ffa9c84ffc69536f3481b88d05774e06460d56543c116735c79'
+ '578f1c76f928a1f7a1946830f04b9ebe725b8df3d47d542d48fa1c53fd6a3b862208d481215a750113ae11f0c6762b0bbe382820e620187620410d7e8624f9da'
+ '746e8a58e2f6552713334ef4550cb023dab177f5b53bc24cb51255e9a3d655c7734b9441e7396ec004a55d1bc2ce55c352ac394c58213964980334f4d85ad81a'
+ 'a8c13e66d90fe8c75ce146890b38435de0e85984c64dce1e4f118c5fca63efaaafd23911dba1a3f0c8f5a826603573c29ad5ecdadfed2beb436afe67b5ad7272'
+ 'c9ecce52a554955bc62f6baa5d9f2317bf7ffd486182f287eaac401b7216ed6ba00e1a28f7d47991c77abeb43b5fca3f7d33b2b95c4a41b4218bb2d84be275ef'
+ 'd7c5cab9f259d68e75852b58a64c05249c152531a7f89170a22245d22e4b8aa10790f41dfb9aa3e3ca8e0d93bfb310c52d74eed33bc0e6abac6977d2b2565361'
+ '43cd5f37bafa14a4b84d4941fced1d8b6ce93197b33bd674abd0a0ea846eb5c1bd0eda1807b1b4c5de392bfe592769eac7dbcd67fc1f453f72e6bbc2724c2ac0'
+ 'b04d2bc12d36dd0a6846f1394e0f2fe5c33cd4fe1edb0fc946ea3dc3ea2654678a7e01de7c10b28f0fb91350b5a9369caf9d86b2f3bea7d6ff26345374106249'
+ 'c421e9a8feba81910d99c8d9a65615d267ca7e4ba0e15a9c0fb8fbf989e923d56fddc2e2e81febf0f21eaa095d4d74ba7022bcfb8b7bba724b190ea4f14fd14c'
+ '3b238801ee5c3262dc00dc78339ef3d1f8d0526265d2a1c772416cd0fdbbd75161996a7c8959c36a6711a5f88a4cdc215c374d2a5fa7380c0874e15acfb1d356'
+ 'eda88a2aad8f7cbb47d936ce305c03313355a7e4f17ee3d4f476825d96793f3b362a58b4ec3867e6196097dfea02b577e169e1acd2cbdba241642602ec96233e'
+ '19ccbc8ee9e7cfea54df995327e76b4a5777e061f12ebc01b8ce6383b615fd8a656c524ddfbfc0ed03b3b6eefec2c2783a9cb319471f0f59fb17dcc4a6a7d457'
+ '5b8ba80290c1f0abf5185be70887bc919f4fd4b304af88de22603a001986054aba91467310532e9997b20887698a16c4939c5af6237f93603999bc8f29d7ae21'
+ '7170a09d2e4f5393750f0b3aad92816c2b28fb79036b7fb97b90cd907ba63373e5c745cd246ff357e55274de633f2382242ae285ea3a4d4c6cf589e7dda1d849'
+ '72a6c7978044534cdafc8a2ab0000ebc740426943728911084f216255925fcb045c1596190c391b23be23385bc821590314d48db73eeff019219e5b48c66068b'
+ '5166bcc2954aed6ff6097e087fcaf6704d4e24237e80c7ae78f6d3c19fe1a74c64d4282797dd93f2b9656a7e6f01b515fe5e50c7382a2ba70d1f2c0f25de60b1'
+ '2e3d828e7aa06596a9248ea39e7f2dd75f0fe438474fbacbc6515bf529197e2bab55846cb0023a8184c01329c4fb22a0a3cc76c9618281699efc40e6d58c93de'
+ '91ea233217eb507dac62f5a23a33b89b8e042116bb83c4a5b23bcb88a6a80d6390a1bd5e8cc9c3d6432bfc8d9f8f60bf8876863b6e4b0941ad7e42c279a8e7fa'
+ 'b4dd7bbff60416cf94b8d7341841ca9a5c330345c71202eedf2ea7a1d9500d232d678d334d00375d55041454de286c746b21a9181ad06c8991d4d59b503b437d'
+ 'eac1bbc8d254d9e25265601e3604d66800d18c73669f8f0babc8fde516a1268ebea9b57c6daffff54d51c5133c82158347798437e032bed6823f47a3b669fcc0'
+ '61a615eefb2202d194fb2295193f8794f8c5087a6156f5dc0ba6b2dc8bbe9d1a330b9ea760eb5981daf20553a5976365fa598ed38b25e5bbce83dc0827e22611'
+ 'b87952f51881854f841191e58199813f93c5464239af42b284e28ad1701491f580720f70e82e4e6bd373446461850c36033c04466708244f34397c73924af929'
+ 'f7a60f1bdcac0dd6933cf6a08ef049c058d782043fde3d5ce0437955d73e3468ffb2b1a6b7a4da1e4f7fe5354a0c8d96e757848bde234e9b9decde53dba4cd33'
+ '48facfcdbcd8ad369c709f72fd6b61120112ea5de400eefc4aa8a2bfbbca2181828a4ea54773758b82bea46a349edbba8085065590ea3661f3266e387996cb25'
+ 'ee04223922c59ceb235da46ab5b4b043d41df67f55151eafb177d412ed5b810366b76c755c1d1e9beb312e42e559e218af071f0b8f1d5fcdb8299047ee7ff9b0'
+ 'c121a0873f1adf03e5ba80c23400f82cf9d9ff88e5925e3eca6e9749b56dc3ade2c042db5fe9a91d31995fe7d1a1ba0b89c0a71e11eaf603d8a5fc1fea525a68'
+ 'de2020961d20072cfd05ff04ad05217002d65ff4e1a24e88379d1c9fdb73da968556b7d76920acb93ef752e9077b5798f90172ce7dfb56514b0f5aef09029d6e'
+ '6d16c467992bbb320f1ba6c7866dfa6bc5030aece1c5e09e3c088636e0e9460da3b144017c09dc06d8aa82a37237e3cc5b918d861d267780a8e0e92a54c22b53'
+ '63202ee776cade95088a53781022ee049e3ca983d1d2462ffc8170376b6170ad783f51de3936695b319ffb24d439085461f94b354b3616948b748e2f3c039c3e'
+ '5c2990028fce9093b4c938606e765827b4b516bb585537043bafd5278a406e4bca2f94964fad0811137f8d63a853c5456ac69823cef49c2cee8062e82557c4d9'
+ '75e4fbd7d35c7d4382c0f92ffcdc766d11821e429039cee3976a844ea4cb9b0dba7e18db987aa6c16cf12e2c4aec9752167b6d0ca29145f56fa685ecbae519d3'
+ '2e8f8ad0c7abd63c1954d568e10816b47bb4c7a51c8238a247749f823e140447d859e2cc3c937cb1a5c29399a40a7a9f595e5a963c3b8b75e40ea905eb72ac9e'
+ 'a621483763be5cdcb7541b92028563f63ae1e0094a69e04b06723eefdd5758b2e3fc4641418b33944abfa4d194115e1302573b2f6fd54582d3a017fa05281c2b'
+ '4f061b1efe7b6beafec882893bfb2d39b3d84cee8a9fce8d1c0d57e7d9792c6f8ae121ed2e05f6f8156a36b3c6f4b4bc44453476b510a5b6a14119f40e0a05ba'
+ '7f0e20f2faeffb95f4b4d2c6e8863a210bc5daffed8cd78ba1622b4b4ba390d7532b89dec5ad42514072541374905891c7b6d16ace61f2576947c167c582deaa'
+ '35e1a070c7361b99e08cc7440098d0cebac085a4542fa20ee811294cbdb8542269ef78841e86e44daeb6fe35580e637b8dc3caac7fb7c114e73727fb27e7d633'
+ 'e7f831c99ff8384bacd10a649e5fa6ee7926f06eeefb6fc6ee016187808cf246948dff17b005f52fd295035a79d0d50604b7c22992447917c39e724de5ed7208'
+ '7af4894b4fe448c2ff58df17f6bebee3c058e99618bc678a9270d20e6b93b8b8d6f8e58c1478e52f77a0b6ebb5d4829e3cc1e9f6becf3cbcc48734cb53096329'
+ '5ee924adca6ebc77562cf9353a7c810d4cb8f9c4e1a22eac7d4cf25975e9372d7e71b8a7bdba82692a66b7d17307ff5be7d10965310113737a5dde535446f667'
+ '0676b2c4c8e5e076f44feb3cc62eee656376903cc18062dd8adaeaa33c5c5bbc678384796740286b3049aa1d2e543c445f1718fd30e9b7f49e6071d2532d9110'
+ '3149f70d0a8b0d1992b057c6416e915fa387d9880ac7df46ee0613d9e02610ac07ab52d64a2548a259a2dcebd327b801e0362a5b27e3f7770a3ca6e508a8c106'
+ '9d80879db19f8613d04e0ff15d2ea572c59eaf3c9a999350943b7db34afb985da2e7129468c56584f307ce291ebe7b86d2311bc0d786127f2e227f7c78287426'
+ '25419951979253ab0d78711146285f7e5c85683d7bcafd474c752530fc3d380e920d22f2faf0571059388a011a890c2214d91fe0bcb31ae6f0ce131e1bcdab50'
+ 'f9109a1973a99082c19a55b061cf08a483890db92bb2232d90f9b08ef56c9dc5afa084088b31a04ca30e85c32c9793e21c9757106d822f81b62574c3c9f0a8d6'
+ 'b02d032b27d85b820bb2cb11f409f4e57d15e8f32603ed10f0691c6fe71d496b18cea96456e2595e0b0a41e45c798504b079842745082b392bc6e23313ac0738'
+ '6f4f7aff59113cb17f07f4af062d9388af490f6bb1fb4ddbbfebc58ff390113b575b08ff6a7267092345bb5a335749fb2f763b0979d8cee5e3a0c905f06f433e'
+ 'f66dfe7cc661d46509003af8aadf0357272554cc5d0a6f102fd59cf1f3888ea38e5d37a40acb5345677120a6393ed054bdaa97fdc27fa6a5b3b683bf462d2791'
+ '4dd44f7136f9b7dd4ff32853ab6780a0f7fc99731f8c67ba67bcefc01d17473d59f0f1760fe71832ffe0307b4b2eeb3493b4edb507fc1ed419c47dcd08f65b56'
+ 'a7a41122ea5af5148bba296b6fa20e59443ede8a18cf6218a31c1d3ebf09859d10172f3dd95b4080458d0de1dd3a1cd1b1564cb54527e388818a9c7d4c3f3b2a'
+ 'e8c9ad4bf41530f6015113e42f0fedb05b746f6920ffb73c26620b6db298fb4bb7bf64baff52e2d054b2ea4d1efb39a164c3973b0aaf82a7abb23a5df09a9a75'
+ '55b695b99f837449338884cdd64185a68bc8e80c8315548c7aff35ee81dac858cece895cecc1a206edd9eb50b003052dcaf84b1e6b49b7f44669d09e365f58d8'
+ '06bbce5be2330ef8e1a3723b227c84edceca7cb421e80484b66053022ac0ac2b7ef3be634bb037bca4f969866c0c910253bfa347b93bc652e3655df6a6b84945'
+ '05e6eefb297cfdc8562388305a8bd8ac095a2566fe26bd47b92e43d2c65ceea48ce36cd5bc091a7a2748d3e8a71010bb7f8d9598fa76a15e3a940eca82f2bab2'
+ '826b307d3f51b4c9fad52dc51475ec283523a58f5e4ed599d1ff2db7ad2fed6bd7601dfaee6a84939fc40bdea2918c7a0375d5557b4d31cd2af78c750df203e8'
+ 'ac201bfd778e8206446cd2084e9971bae3133b8a86fad8b1ec0391e4435f54d464300e8d693153ab3f490e053725d00edf8f24848ede0511f28a041a166f8694'
+ 'c8f086c3ddaa8761ff84b165bda8f72796580b79064e74c53c133273c5f8e4eb0ce426174a3395bf402e6a0bb4f481e3ced82ed07fd8de1c30f06890fad1b85b'
+ '4e8bf98ec7ee79766aca2ddb65973fe48916a84943b6531683dc0e8964c7fe93afbe022b5188e11e22645482d91ce64250e183ba82ccf23f68e5776b5ace01ad'
+ '6d174ea91cde2d45078a639e99921056e88f9bd5bc5ec0e037b62655cb4cc798fa55c392b789e6c8ef5ffe914eecdc0b3a1d2878d619ba430b5781a634b305fc'
+ 'fc6583dabdf7558879e5c9a2c2da86d91bcfa39583aeb9dc3de9fe70f69f2945ab9b149f13f024b2103bf9b3da7ac87e679167d3deabe87213da839760b73e31'
+ '09413a07437cbe8e5929a23b0317f315e1807750abeba0c809e50ff14953db445d69a88b263efcde267a16db79add7870632e5f70411c98c22af97255678238f'
+ 'e8902aa546ead9a05cba7b5725351af6336f97588b8c73b00cc7bcbd79d5b0358e9d731a8e2b1164d289569cd093bd198f21fe923c51cdd66e15f7341d3e2c43'
+ 'bc3b8bcb596335205b925af5df58625095b896b74504c203c1efdc5fa7ce7e2b0f48241064758f10625a8d340328f34ac0aa6efd4f062afba76897e3449955d7'
+ 'd30dcaa9a11cdd0b3908d209432409e6d46ecd9f8c83d10ba2c016b5fbd8cc74b14d97b20e236149ef6cc8b7c449ff573f65f63e33a72f13c23593a2773d39d8'
+ '953f26172c0e0b5dc63fe3e1f4938cdf1f753be8e0b907e3f8934e76ab09dd705c28297da7b049ab01b2b0a939ab522d465408f8fea6b0bfa997972259a2c113'
+ 'e14329c3f63edb2547a92063e4fcfe6622431ac1e0bbcdab68a4523f5faa30d817574e786085b08791f0d2ebcd5198f7d29f4f8c5748f0a87b8798e7dd5bb974'
+ 'f5a1f28ea40fcb422fdeed18d284ecaab69a45569eda1415d976433e6f50fc0f6e1dfb8b0ae4f074cdd6ccf53d6b0999798190e0a953a13d0d93a5c65a3ebfa8'
+ '5246234f40c23cd3bf3d132692b6ebd25e5a2af1aafa59c34c99c8b93baa61c3dcfef3ab2dfc53c52c2d6962bb10616dea42514d88e341c5c48be0cd9b66aad4'
+ '5020931d834735c3c998ff12f9b4fb876cf175b2405b6a8198ac237960fb68f81a7008bd1862721cffc72e06dd91f76636e68792946bc0a3e7f0cb7e4303a8c9'
+ 'd8bd4a4499805d967d334e80732c1c674f7b7d4420a821b5bdbbf096c9160c081d843e7c7349a64233d3da5bb27fdb3e2fdda11570f2c1c4e08e6e773325516d'
+ '4fd4e90a56ea415f6dbd17b1833e2fc3bf4679d9e158109d9695382b0548fce8de37346c411de074c4075f49752ce36cbad9abf0f17c5a282f7ea1b07f2af6c5'
+ '96c0b3e4ef20ef29dba1d099e7b5152c3593c746aa05d2bc11b2694f63627d810602fdb90d6e4f769dc847606d565cf9317f3cb36ff74ff1fd1de71316127c01'
+ '02df218e0232fb31cbb41ad0da855e8b09b142bfeeb6a6fa73d36b14d4024483b173f39d027e84db8597ec1d647a348902c54e98a80873dd49b0c0319fd3b181'
+ 'c453f43af49a3ada8017ff9c295dbaa3c7360c508fa792d9f110f7913c5642cb0adb5b6d82c04ac4faa31dd93ff43e7d9ec5015adf4008a158626b07cb4e502b'
+ '4f262b536d0751b643e879808121aaa95d1300ea47c6e7e6c0727d392902704eb943242307845030434fdde2b868c29f3728acb76222d3d98ccfdd0ad509766c'
+ 'e123b44352e247cd4c82a01c36c8a356fb2a395c98a853ac4d5451e2018468092cba969db76bb2f7832397365c75a6cdb6dbb4f0e2b39c273ffb3b39874a657f'
+ '649b42db20470c194b15b03c56e73b6170b8d2d30624135e2949fc9c0fcb96dc8b55dc676559514ca9badd662e900558c274d1c8c6382833ec53ac1cb7a486df'
+ 'ccd84813417ef7d9230a794a4e0eb778a236f6d465a999143429d25b0ad65546faf983f2b52cc192204453c25bcfff7fe33816b1cca0e0b81f52892e6038aa5e'
+ '8fe2a5536d144e70b3858561dc19407eb1672aa905eea724f0f8140097659e7c016928b500810c0e5f0eda2d7a1286bb5ffe4501eb9734e26438c6225655b5e7'
+ '1ee6f2c2e3d17876fdd28d4a4e311eba9d45f145a1b36b0a84ebf1a1f1ce90807bb76b7449cbe8de21aa045b43c0b4e4f8968f160d74dd74963f7930b47f9c81'
+ 'e49bca267236c7b543c0839d9ac751c23e82947f9df6de9d758c1727d48e9ff8843c2a2f4f94101fb19e33acc6457f72fa9a59f3f4e39e5ec10feb6093732409'
+ '6fbc925a94e7343688f38ed2d226e17cbfac82b9cd604d15272e51adc6f1133b9804b53f24921315696031fe9fcd34264242d7808955b714c0ae9025999dd338'
+ 'a9a9422062e42b4ae14d0f7edc641d6014e1c574e537c804f52a61efd7843ef1214a2a462ec1da14f9ed2c03c12607d416d62a4b4873310005f6589a48568527'
+ 'd5b5d32201bafdab4aa82ef5920c9e514b3e52f2d7d05385ebbb0101ebbce382ce8c55522a687d4c896cc4665437b4634da9ed0180661a797c644850d47b019c'
+ 'ec8bbff8278e0eff0f708dfaf6fcfc303dcd99dab7fd343312f593d2e8d8794901578e5a13150a21cef02841db76b486c48c01a126b8717e812d77b094e62d43'
+ '6d0be15d5feea6a8e46e892b9b5db2af47d0970c829a6895486c49a0a1aee88adebad54c2ac84dbdb78a80ab05270b7f2744064260c3b96fcab8d7629f0c55f9'
+ 'f6cbed91352c29d618f529cb5ab79ff0acfd236e755641aaece309695e7dac05f4c6beb49b6e54921fc6eb21b22495459cd6e8a84e344e5a7ec1b6314bf1251a'
+ '7cada3319b02a338c5f32eabe99be0f9ea35412759614f31ac77d310d6848a6b938143744d40d07721241d438d01781b456bda1781bfb37d4839a540b600458c'
+ '64d9a43b1ff38813d567f1c2a5ac48ed72907e1438e76188bdfc22bc463eff887f34f5d1ad524aab77d61e358e5b87ed6f05bd9e9e46d66c03cb7e3c0c980ca4'
+ '40852c5f7a2e0cff440ac61cc8d1dd53d3c4641abcf12ba8c87d5a804161c00c7820cdfdf4d3853a145915e0bd2a428a8c868d58bff2377f38c979bd8eb99a55'
+ '79cd9bfb6984ae69560c71dc886adc272688871d95a9bb01da2b154671240b1fcd5e837396796d75a9487803d88cf7af484f932f3fb56402f5a2c7dc3d8e463e'
+ 'b4e6018ac6b546bfbc1b788e20192615eb2f184b209b85e2209cf5976f74cd15c9a63c727455d1ca0e6e1cadc36a908b3e4a1a7efb5b0e453e1f562b4bb9a5e4'
+ 'aecf9e0a168e58db338c0ca12830c42d279b77962735b69c1b2f7cd056e7d2cfafff565e3bd5fd3dca26fd30b3d4f83760a6f191155f7c2a8592934b882a6ec0'
+ 'a2d924fb4c87da54b79549a2d77116c2f29fde7b5ecab059dacc83e0deeaf2e78325cf7d7d97047c85bc66afc672c95da2b83504bc12b0aa1500678af460852b'
'd0fb7f0e1a3d98a170ebea301226ad8caa7ffab9fc0bee224abc31c22875c892b43d3468dffbdd15eb71ca1b5260e039d0fceb21ecc92341b9bb6949d7e9be6a')
_architectures="i686-w64-mingw32 x86_64-w64-mingw32"
@@ -45,7 +312,7 @@ apply_patch_with_msg() {
for _patch in "$@"
do
msg2 "Applying ${_patch}"
- patch -Nbp1 -i "${srcdir}/${pkgver}/${_patch}"
+ patch -Nbp1 -i "${srcdir}/${_patch}"
done
}
@@ -62,154 +329,142 @@ del_file_exists() {
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 \
- 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
- # https://github.com/Alexpux/MINGW-packages/issues/2656
- 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 2050-undo-venv-redirector.patch
- apply_patch_with_msg 2051-set-venv-activate-path-unix.patch
- apply_patch_with_msg 2052-venv-remove-msys-from-env-and-add-exe-prefix.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 extra_fixups.patch
-
- apply_patch_with_msg mingw_host_platform.patch
-
- # fix case
- sed -e "s|MSTcpIP.h|mstcpip.h|g" -i ${srcdir}/Python-${pkgver}/Modules/socketmodule.h
- sed -e "s|Windows.h|windows.h|g" -i ${srcdir}/Python-${pkgver}/Modules/_io/_iomodule.c
- sed -e "s|VersionHelpers.h|versionhelpers.h|g" -i ${srcdir}/Python-${pkgver}/Modules/socketmodule.c
+ 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 \
+ 0096-Add-CI-to-Build-and-Test.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 \
+ 0100-Add-a-test-to-build-C-Ext.patch \
+ 0101-Add-some-platform-related-tests.patch \
+ 0102-squash-CI-use-O2.patch \
+ 0103-squash-Fixup-.rc-handling.patch \
+ 0104-squash-Set-MS_DLL_ID.patch \
+ 0105-squash-CI-Clean-up.patch \
+ 0106-squash-CI-use-srcdir-builddir.patch \
+ 0107-squash-fix-srcdir-builddir.patch \
+ 0108-build-Cleanup-ncursesw-include-lookup-code.patch \
+ 0109-tests-fix-test_bytes.patch \
+ 0110-time-fix-strftime-not-raising-for-invalid-year-value.patch \
+ 0111-winconsoleio-build-_testconsole-which-is-required-fo.patch \
+ 0112-Adjust-Py_WINVER-for-our-Win-7-target.patch \
+ 0113-ctypes-find_library-c-should-return-None-with-ucrt.patch \
+ 0114-build-Disable-checks-for-dlopen-dlfcn.patch \
+ 0115-Fix-install-location-of-the-import-library.patch \
+ 0116-Set-MSYS2_ARG_CONV_EXCL-for-the-shared-Python-module.patch \
+ 0117-build-Integrate-venvlauncher-build-installation-into.patch \
+ 0118-Update-smoketests.patch \
+ 0119-CI-clean-up-the-build-enforce-some-tests.patch \
+ 0120-1-2-AC_RUN_IFELSE-replace.patch \
+ 0121-Add-return-0-to-the-test-code.patch \
+ 0122-2-2-AC_RUN_IFELSE-replace.patch \
+ 0123-Make-sure-MACHDEP-matches-sys.platform.patch \
+ 0124-CI-add-a-cross-build-job.patch \
+ 0125-Revert-Adjust-Py_WINVER-for-our-Win-7-target.patch \
+ 0126-Set-_WIN32_WINNT-version-in-configure.ac.patch \
+ 0127-CI-cleanup.patch \
+ 0128-Commit-regenerated-importlib.patch \
+ 0129-CI-clean-up.patch \
+ 0130-configure.ac-default-to-with-nt-threads-with-mingw.patch \
+ 0131-configure.ac-don-t-check-for-clock_-functions.patch \
+ 0132-CI-clean-up.patch \
+ 0133-smoketests-update.patch \
+ 0134-expanduser-normpath-paths-coming-from-env-vars.patch \
+ 0135-sysconfig-fix-platlib-purelib-paths.patch \
+ 0136-smoketests-update.patch
autoreconf -vfi
}
@@ -256,9 +511,6 @@ build() {
--enable-loadable-sqlite-extensions \
"${_extra_config[@]}" \
OPT=""
-
- # append ${_arch} to windres
- sed -e "s|windres|${_arch}-windres|g" -i ${srcdir}/Python-${pkgver}/build-${_arch}/Makefile
make
@@ -287,9 +539,6 @@ package() {
install -m 644 libpython${_pybasever}.a "$pkgdir"/usr/${_arch}/lib
install -m 644 libpython${_pybasever}.dll.a "$pkgdir"/usr/${_arch}/lib
- # Need for building boost python3 module
- cp -f "${pkgdir}/usr/${_arch}"/lib/python${_pybasever}/config-${VERABI}/libpython${VERABI}.dll.a "${pkgdir}/usr/${_arch}"/lib/libpython${_pybasever}.dll.a
-
# some useful "stuff"
install -dm755 "${pkgdir}/usr/${_arch}"/lib/python${_pybasever}/Tools/{i18n,scripts}
install -m755 "${srcdir}/Python-${pkgver}"/Tools/i18n/{msgfmt,pygettext}.py "${pkgdir}/usr/${_arch}"/lib/python${_pybasever}/Tools/i18n/
@@ -333,11 +582,6 @@ package() {
-e "s/'\/share'/sys.prefix + '\/share'/g" \
-i "${pkgdir}/usr/${_arch}"/lib/python${_pybasever}/_sysconfigdata*.py
- # Correct name of _sysconfigdata__win32_.py and copy both to lib-dynload
- cp -f "${pkgdir}/usr/${_arch}"/lib/python${_pybasever}/_sysconfigdata__win_.py "${pkgdir}/usr/${_arch}"/lib/python${_pybasever}/_sysconfigdata__win32_.py
- cp -f "${pkgdir}/usr/${_arch}"/lib/python${_pybasever}/_sysconfigdata__win_.py "${pkgdir}/usr/${_arch}"/lib/python${_pybasever}/lib-dynload/_sysconfigdata__win_.py
- cp -f "${pkgdir}/usr/${_arch}"/lib/python${_pybasever}/_sysconfigdata__win32_.py "${pkgdir}/usr/${_arch}"/lib/python${_pybasever}/lib-dynload/_sysconfigdata__win32_.py
-
# strip executables and libraries
${_arch}-strip --strip-unneeded "$pkgdir"/usr/${_arch}/bin/*.exe
${_arch}-strip --strip-unneeded "$pkgdir"/usr/${_arch}/bin/*.dll
diff --git a/patches.tar.xz b/patches.tar.xz
deleted file mode 100644
index d0be188ad321..000000000000
--- a/patches.tar.xz
+++ /dev/null
Binary files differ