609 lines
33 KiB
Bash
609 lines
33 KiB
Bash
# Maintainer: Alexey Pavlov <alexpux@gmail.com>
|
|
# Maintainer: Ray Donnelly <mingw.android@gmail.com>
|
|
# Contributor: Saul Ibarra Corretge <saghul@gmail.com>
|
|
# Contributor: Frode Solheim <frode@fs-uae.net>
|
|
|
|
_primary_python="yes"
|
|
_pybasever=3.11
|
|
_realname=python
|
|
|
|
if [[ "${_primary_python}" == "yes" ]]; then
|
|
pkgbase="mingw-w64-${_realname}"
|
|
pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}")
|
|
provides=("${MINGW_PACKAGE_PREFIX}-python3"
|
|
"${MINGW_PACKAGE_PREFIX}-python${_pybasever}")
|
|
conflicts=("${MINGW_PACKAGE_PREFIX}-python3"
|
|
"${MINGW_PACKAGE_PREFIX}-python${_pybasever}"
|
|
"${MINGW_PACKAGE_PREFIX}-python2<2.7.16-7")
|
|
replaces=("${MINGW_PACKAGE_PREFIX}-python3"
|
|
"${MINGW_PACKAGE_PREFIX}-python${_pybasever}")
|
|
else
|
|
pkgbase="mingw-w64-${_realname}${_pybasever}"
|
|
pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}${_pybasever}")
|
|
fi
|
|
pkgver=${_pybasever}.7
|
|
pkgrel=1
|
|
pkgdesc="A high-level scripting language (mingw-w64)"
|
|
arch=('any')
|
|
mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64' 'clang32' 'clangarm64')
|
|
license=('spdx:PSF-2.0')
|
|
url="https://www.python.org/"
|
|
depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs"
|
|
"${MINGW_PACKAGE_PREFIX}-expat"
|
|
"${MINGW_PACKAGE_PREFIX}-bzip2"
|
|
"${MINGW_PACKAGE_PREFIX}-libffi"
|
|
"${MINGW_PACKAGE_PREFIX}-mpdecimal"
|
|
"${MINGW_PACKAGE_PREFIX}-ncurses"
|
|
"${MINGW_PACKAGE_PREFIX}-openssl"
|
|
"${MINGW_PACKAGE_PREFIX}-sqlite3"
|
|
"${MINGW_PACKAGE_PREFIX}-tcl"
|
|
"${MINGW_PACKAGE_PREFIX}-tk"
|
|
"${MINGW_PACKAGE_PREFIX}-zlib"
|
|
"${MINGW_PACKAGE_PREFIX}-xz"
|
|
"${MINGW_PACKAGE_PREFIX}-tzdata")
|
|
makedepends=(
|
|
"${MINGW_PACKAGE_PREFIX}-cc"
|
|
"${MINGW_PACKAGE_PREFIX}-autotools"
|
|
"autoconf-archive"
|
|
)
|
|
#options=('debug' '!strip')
|
|
source=("https://www.python.org/ftp/python/${pkgver%rc?}/Python-${pkgver}.tar.xz"
|
|
0001-sysconfig-make-_sysconfigdata.py-relocatable.patch
|
|
0002-build-add-with-nt-threads-and-make-it-default-on-min.patch
|
|
0003-Define-MS_WINDOWS-and-others-when-compiling-with-MIN.patch
|
|
0004-configure-add-MACHDEP-and-platform-on-MINGW.patch
|
|
0005-Add-default-configuration-for-MINGW.patch
|
|
0006-configure-enable-largefile-support-by-default-for-Mi.patch
|
|
0007-Add-PC-to-CPPFLAGS-and-to-SRCDIRS-on-Mingw.patch
|
|
0008-posixmodule.c-Define-necessary-headers-for-compiling.patch
|
|
0009-Build-winreg-by-default-when-compiling-for-MINGW.patch
|
|
0010-pyport.h-Add-support-for-MINGW.patch
|
|
0011-configure-add-options-so-that-shared-build-is-possib.patch
|
|
0012-Add-dynamic-loading-support-for-MINGW.patch
|
|
0013-Ignore-main-program-for-frozen-scripts-on-MINGW.patch
|
|
0014-Add-missing-library-for-multiprocessing-module.patch
|
|
0015-selectmodule-add-support-for-MINGW.patch
|
|
0016-setup.py-add-libraries-to-fix-compile-of-ctypes-on-M.patch
|
|
0017-Detect-winsock2-and-setup-_socket-module-on-MINGW.patch
|
|
0018-Enable-some-windows-specific-modules.patch
|
|
0019-sysconfig-MINGW-build-extensions-with-GCC.patch
|
|
0020-sysconfig-treat-MINGW-builds-as-POSIX-builds.patch
|
|
0021-Add-support-for-stdcall-without-underscore.patch
|
|
0022-Use-replace-instead-rename-to-avoid-failure-on-windo.patch
|
|
0023-Customize-site-for-MINGW.patch
|
|
0024-add-python-config-sh.patch
|
|
0025-setup.py-add-export_symbols-to-fix-compile-of-ctypes.patch
|
|
0026-mingw-prefer-unix-sep-if-MSYSTEM-environment-variabl.patch
|
|
0027-msys-cygwin-semi-native-build-sysconfig.patch
|
|
0028-sysconfig-mingw-sysconfig-like-posix.patch
|
|
0029-cross-dont-add-multiarch-paths-if-cross-compiling.patch
|
|
0030-mingw-use-backslashes-in-compileall-py.patch
|
|
0031-msys-convert_path-fix-and-root-hack.patch
|
|
0032-mingw-pdcurses_ISPAD.patch
|
|
0033-msys-monkeypatch-os-system-via-sh-exe.patch
|
|
0034-msys-replace-slashes-used-in-io-redirection.patch
|
|
0035-remove_path_max.default.patch
|
|
0036-dont-link-with-gettext.patch
|
|
0037-ctypes-python-dll.patch
|
|
0038-gdbm-module-includes.patch
|
|
0039-use-gnu_printf-in-format.patch
|
|
0040-mingw-fix-ssl-dont-use-enum_certificates.patch
|
|
0041-fix-using-dllhandle-and-winver-mingw.patch
|
|
0042-Add-AMD64-to-sys-config-so-msvccompiler-get_build_ve.patch
|
|
0043-MINGW-link-with-additional-library.patch
|
|
0044-install-msilib.patch
|
|
0045-fix-signal-module-build.patch
|
|
0046-build-build-winconsoleio-and-_testconsole.patch
|
|
0047-expose-sem_unlink.patch
|
|
0048-cygpty-isatty.patch
|
|
0049-disable-broken-gdbm-module.patch
|
|
0050-build-link-win-resource-files-and-build-pythonw.patch
|
|
0051-disable-readline.patch
|
|
0052-fix-isselectable.patch
|
|
0053-_xxsubinterpretersmodule.patch
|
|
0054-configure.ac-fix-inet_pton-check.patch
|
|
0055-set-venv-activate-path-unix.patch
|
|
0056-pass-gen-profile-ldflags.patch
|
|
0057-pkg-config-windows-must-link-ext-with-python-lib.patch
|
|
0058-importlib-bootstrap-path-sep.patch
|
|
0059-pathlib-path-sep.patch
|
|
0060-warnings-fixes.patch
|
|
0061-fix-build-testinternalcapi.patch
|
|
0062-extend-MS_WINDOWS-flag.patch
|
|
0063-clang-arm64.patch
|
|
0064-configure.ac-set-MINGW-stack-reserve.patch
|
|
0065-Don-t-use-os.pathsep-to-find-EOF.patch
|
|
0066-Fix-extension-suffix-for-c-extensions-on-mingw.patch
|
|
0067-Change-the-get_platform-method-in-sysconfig.patch
|
|
0068-distutils-compiler-customize-mingw-cygwin-compilers.patch
|
|
0069-distutils-compiler-enable-new-dtags.patch
|
|
0070-distutils-MINGW-build-extensions-with-GCC.patch
|
|
0071-distutils-use-Mingw32CCompiler-as-default-compiler-f.patch
|
|
0072-distutils-find-import-library.patch
|
|
0073-distutils-avoid-circular-dependency-from-time-module.patch
|
|
0074-distutils-generalization-of-posix-build-in-distutils.patch
|
|
0075-distutils-mingw-sysconfig-like-posix.patch
|
|
0076-distutils-get_versions-fixes.patch
|
|
0077-distutils-install-layout-as-posix.patch
|
|
0078-distutils-msys-convert_path-fix-and-root-hack.patch
|
|
0079-distutils-mingw-build-optimized-ext.patch
|
|
0080-distutils-cygwinccompiler-dont-strip-modules-if-pyde.patch
|
|
0081-distutils-get-compilers-from-env-vars.patch
|
|
0082-distutils-add-windmc-to-cygwinccompiler.patch
|
|
0083-distutils-fix-msvc9-import.patch
|
|
0084-distutils-mingw-add-LIBPL-to-library-dirs.patch
|
|
0085-distutils-Change-the-get_platform-method-in-distutil.patch
|
|
0086-build-Fix-ncursesw-include-lookup.patch
|
|
0087-tests-fix-test_bytes.patch
|
|
0088-time-fix-strftime-not-raising-for-invalid-year-value.patch
|
|
0089-ctypes-find_library-c-should-return-None-with-ucrt.patch
|
|
0090-build-Disable-checks-for-dlopen-dlfcn.patch
|
|
0091-Fix-install-location-of-the-import-library.patch
|
|
0092-Set-MSYS2_ARG_CONV_EXCL-for-the-shared-Python-module.patch
|
|
0093-build-Integrate-venvlauncher-build-installation-into.patch
|
|
0094-configure.ac-set-_WIN32_WINNT-version.patch
|
|
0095-configure.ac-don-t-check-for-clock_-functions.patch
|
|
0096-expanduser-normpath-paths-coming-from-env-vars.patch
|
|
0097-CI-test-the-build-and-add-some-mingw-specific-tests.patch
|
|
0098-Prefer-sysconfig.python_build.patch
|
|
0099-Define-PY3_DLLNAME-to-fix-build.patch
|
|
0100-distutils-remove-checks-for-ancient-gcc-binutils.patch
|
|
0101-distutils-split-CC-env-var-before-passing-to-subproc.patch
|
|
0102-_testconsole.c-Fix-casing-path-sep.patch
|
|
0103-Return-consistent-architecture-markers-for-python-on.patch
|
|
0104-distutils-add-back-gcc_version.patch
|
|
0105-fix-mingw-cross-compiling-in-setup.py.patch
|
|
0106-handle-ncursesw-pkg-config-when-cross-compiling.patch
|
|
0107-mingw_smoketests-fix-_UCRT-condition.patch
|
|
0108-Modify-sys.winver-to-match-upstream.patch
|
|
0109-Change-user-site-packages-path-to-include-the-enviro.patch
|
|
0110-configure-Include-a-header-in-the-check-for-_beginth.patch
|
|
0111-configure.ac-Default-to-without-c-locale-coercion-on.patch
|
|
0112-Fix-failing-tests.patch
|
|
0113-distutils-add-build-root-to-libdirs-when-building-un.patch
|
|
0114-Don-t-change-os.sep-with-an-empty-MSYSTEM-env-var-no.patch
|
|
0115-def-VPATH-when-compiling-Python-sysmodule.c.patch
|
|
0116-Make-_Py_CheckPython3-extern.patch
|
|
0117-link-with-bcrypt.patch
|
|
0118-correctly-find-native-python.patch
|
|
0119-Add-extra-flags-for-_bootstrap_python.patch
|
|
0120-posixmodule-undefine-HAVE_OPENDIR.patch
|
|
0121-getpath.py-add-support-for-mingw.patch
|
|
0122-Don-t-build-_posixsubprocess-on-Windows.patch
|
|
0123-_ssl-link-with-ws2_32.patch
|
|
0124-Fix-building-_socket-module.patch
|
|
0125-Always-normalize-path-in-abspath.patch
|
|
0126-Include-winsock.h-when-checking-for-netdb-function.patch
|
|
0127-include-_multiprocessing-semaphore.c-on-win32.patch
|
|
0128-configure-build-mmap-module-on-win32.patch
|
|
0129-venv-creation-fixes.patch
|
|
0130-move-the-shutdown-function-where-winsock.h-is-includ.patch
|
|
0131-configure.ac-set-BUILDEXEEXT-and-EXEEXT.patch
|
|
0132-configure.ac-fix-building-some-test-modules.patch
|
|
0133-Don-t-convert-sysconfig.get_config_var-VPATH-to-an-a.patch
|
|
0134-Always-convert-to-before-passing-though-pathcch-func.patch
|
|
0135-Build-venvlauncher.exe-from-PC-launcher.c.patch
|
|
0136-getpath.py-fix-dirname.patch
|
|
0137-getpath-use-normpath-on-all-generated-paths.patch
|
|
0138-pathconfig-normpath-sys.path-0.patch
|
|
0139-smoketests-add-some-tests-for-sys-site-paths.patch
|
|
0140-Search-DLLs-only-on-paths-added-using-add_dll_direct.patch
|
|
0141-Allow-picking-up-include-lib-dirs-from-CFLAGS-LDFLAG.patch
|
|
0142-Build-and-install-libpython3.dll.patch
|
|
0143-setup.py-don-t-prepend-the-system-library-directorie.patch
|
|
0144-Port-GetPythonImport-to-mingw.patch
|
|
0145-LoadLibraryExW-make-sure-to-only-use-backslashes-for.patch
|
|
0146-Use-shared-instead-of-mdll.patch
|
|
0147-mingw_smoketests-add-a-test-to-check-if-sysconfig-re.patch
|
|
0148-Makefile-Add-a-dependency-on-LDLIBRARY-for-the-share.patch)
|
|
|
|
# Helper macros to help make tasks easier #
|
|
apply_patch_with_msg() {
|
|
for _patch in "$@"
|
|
do
|
|
msg2 "Applying ${_patch}"
|
|
patch -Nbp1 -i "${srcdir}/${_patch}"
|
|
done
|
|
}
|
|
|
|
prepare() {
|
|
cd "${srcdir}/Python-${pkgver}"
|
|
|
|
apply_patch_with_msg 0001-sysconfig-make-_sysconfigdata.py-relocatable.patch \
|
|
0002-build-add-with-nt-threads-and-make-it-default-on-min.patch \
|
|
0003-Define-MS_WINDOWS-and-others-when-compiling-with-MIN.patch \
|
|
0004-configure-add-MACHDEP-and-platform-on-MINGW.patch \
|
|
0005-Add-default-configuration-for-MINGW.patch \
|
|
0006-configure-enable-largefile-support-by-default-for-Mi.patch \
|
|
0007-Add-PC-to-CPPFLAGS-and-to-SRCDIRS-on-Mingw.patch \
|
|
0008-posixmodule.c-Define-necessary-headers-for-compiling.patch \
|
|
0009-Build-winreg-by-default-when-compiling-for-MINGW.patch \
|
|
0010-pyport.h-Add-support-for-MINGW.patch \
|
|
0011-configure-add-options-so-that-shared-build-is-possib.patch \
|
|
0012-Add-dynamic-loading-support-for-MINGW.patch \
|
|
0013-Ignore-main-program-for-frozen-scripts-on-MINGW.patch \
|
|
0014-Add-missing-library-for-multiprocessing-module.patch \
|
|
0015-selectmodule-add-support-for-MINGW.patch \
|
|
0016-setup.py-add-libraries-to-fix-compile-of-ctypes-on-M.patch \
|
|
0017-Detect-winsock2-and-setup-_socket-module-on-MINGW.patch \
|
|
0018-Enable-some-windows-specific-modules.patch \
|
|
0019-sysconfig-MINGW-build-extensions-with-GCC.patch \
|
|
0020-sysconfig-treat-MINGW-builds-as-POSIX-builds.patch \
|
|
0021-Add-support-for-stdcall-without-underscore.patch \
|
|
0022-Use-replace-instead-rename-to-avoid-failure-on-windo.patch \
|
|
0023-Customize-site-for-MINGW.patch \
|
|
0024-add-python-config-sh.patch \
|
|
0025-setup.py-add-export_symbols-to-fix-compile-of-ctypes.patch \
|
|
0026-mingw-prefer-unix-sep-if-MSYSTEM-environment-variabl.patch \
|
|
0027-msys-cygwin-semi-native-build-sysconfig.patch \
|
|
0028-sysconfig-mingw-sysconfig-like-posix.patch \
|
|
0029-cross-dont-add-multiarch-paths-if-cross-compiling.patch \
|
|
0030-mingw-use-backslashes-in-compileall-py.patch \
|
|
0031-msys-convert_path-fix-and-root-hack.patch \
|
|
0032-mingw-pdcurses_ISPAD.patch \
|
|
0033-msys-monkeypatch-os-system-via-sh-exe.patch \
|
|
0034-msys-replace-slashes-used-in-io-redirection.patch \
|
|
0035-remove_path_max.default.patch \
|
|
0036-dont-link-with-gettext.patch \
|
|
0037-ctypes-python-dll.patch \
|
|
0038-gdbm-module-includes.patch \
|
|
0039-use-gnu_printf-in-format.patch \
|
|
0040-mingw-fix-ssl-dont-use-enum_certificates.patch \
|
|
0041-fix-using-dllhandle-and-winver-mingw.patch \
|
|
0042-Add-AMD64-to-sys-config-so-msvccompiler-get_build_ve.patch \
|
|
0043-MINGW-link-with-additional-library.patch \
|
|
0044-install-msilib.patch \
|
|
0045-fix-signal-module-build.patch \
|
|
0046-build-build-winconsoleio-and-_testconsole.patch \
|
|
0047-expose-sem_unlink.patch \
|
|
0048-cygpty-isatty.patch \
|
|
0049-disable-broken-gdbm-module.patch \
|
|
0050-build-link-win-resource-files-and-build-pythonw.patch \
|
|
0051-disable-readline.patch \
|
|
0052-fix-isselectable.patch \
|
|
0053-_xxsubinterpretersmodule.patch \
|
|
0054-configure.ac-fix-inet_pton-check.patch \
|
|
0055-set-venv-activate-path-unix.patch \
|
|
0056-pass-gen-profile-ldflags.patch \
|
|
0057-pkg-config-windows-must-link-ext-with-python-lib.patch \
|
|
0058-importlib-bootstrap-path-sep.patch \
|
|
0059-pathlib-path-sep.patch \
|
|
0060-warnings-fixes.patch \
|
|
0061-fix-build-testinternalcapi.patch \
|
|
0062-extend-MS_WINDOWS-flag.patch \
|
|
0063-clang-arm64.patch \
|
|
0064-configure.ac-set-MINGW-stack-reserve.patch \
|
|
0065-Don-t-use-os.pathsep-to-find-EOF.patch \
|
|
0066-Fix-extension-suffix-for-c-extensions-on-mingw.patch \
|
|
0067-Change-the-get_platform-method-in-sysconfig.patch \
|
|
0068-distutils-compiler-customize-mingw-cygwin-compilers.patch \
|
|
0069-distutils-compiler-enable-new-dtags.patch \
|
|
0070-distutils-MINGW-build-extensions-with-GCC.patch \
|
|
0071-distutils-use-Mingw32CCompiler-as-default-compiler-f.patch \
|
|
0072-distutils-find-import-library.patch \
|
|
0073-distutils-avoid-circular-dependency-from-time-module.patch \
|
|
0074-distutils-generalization-of-posix-build-in-distutils.patch \
|
|
0075-distutils-mingw-sysconfig-like-posix.patch \
|
|
0076-distutils-get_versions-fixes.patch \
|
|
0077-distutils-install-layout-as-posix.patch \
|
|
0078-distutils-msys-convert_path-fix-and-root-hack.patch \
|
|
0079-distutils-mingw-build-optimized-ext.patch \
|
|
0080-distutils-cygwinccompiler-dont-strip-modules-if-pyde.patch \
|
|
0081-distutils-get-compilers-from-env-vars.patch \
|
|
0082-distutils-add-windmc-to-cygwinccompiler.patch \
|
|
0083-distutils-fix-msvc9-import.patch \
|
|
0084-distutils-mingw-add-LIBPL-to-library-dirs.patch \
|
|
0085-distutils-Change-the-get_platform-method-in-distutil.patch \
|
|
0086-build-Fix-ncursesw-include-lookup.patch \
|
|
0087-tests-fix-test_bytes.patch \
|
|
0088-time-fix-strftime-not-raising-for-invalid-year-value.patch \
|
|
0089-ctypes-find_library-c-should-return-None-with-ucrt.patch \
|
|
0090-build-Disable-checks-for-dlopen-dlfcn.patch \
|
|
0091-Fix-install-location-of-the-import-library.patch \
|
|
0092-Set-MSYS2_ARG_CONV_EXCL-for-the-shared-Python-module.patch \
|
|
0093-build-Integrate-venvlauncher-build-installation-into.patch \
|
|
0094-configure.ac-set-_WIN32_WINNT-version.patch \
|
|
0095-configure.ac-don-t-check-for-clock_-functions.patch \
|
|
0096-expanduser-normpath-paths-coming-from-env-vars.patch \
|
|
0097-CI-test-the-build-and-add-some-mingw-specific-tests.patch \
|
|
0098-Prefer-sysconfig.python_build.patch \
|
|
0099-Define-PY3_DLLNAME-to-fix-build.patch \
|
|
0100-distutils-remove-checks-for-ancient-gcc-binutils.patch \
|
|
0101-distutils-split-CC-env-var-before-passing-to-subproc.patch \
|
|
0102-_testconsole.c-Fix-casing-path-sep.patch \
|
|
0103-Return-consistent-architecture-markers-for-python-on.patch \
|
|
0104-distutils-add-back-gcc_version.patch \
|
|
0105-fix-mingw-cross-compiling-in-setup.py.patch \
|
|
0106-handle-ncursesw-pkg-config-when-cross-compiling.patch \
|
|
0107-mingw_smoketests-fix-_UCRT-condition.patch \
|
|
0108-Modify-sys.winver-to-match-upstream.patch \
|
|
0109-Change-user-site-packages-path-to-include-the-enviro.patch \
|
|
0110-configure-Include-a-header-in-the-check-for-_beginth.patch \
|
|
0111-configure.ac-Default-to-without-c-locale-coercion-on.patch \
|
|
0112-Fix-failing-tests.patch \
|
|
0113-distutils-add-build-root-to-libdirs-when-building-un.patch \
|
|
0114-Don-t-change-os.sep-with-an-empty-MSYSTEM-env-var-no.patch \
|
|
0115-def-VPATH-when-compiling-Python-sysmodule.c.patch \
|
|
0116-Make-_Py_CheckPython3-extern.patch \
|
|
0117-link-with-bcrypt.patch \
|
|
0118-correctly-find-native-python.patch \
|
|
0119-Add-extra-flags-for-_bootstrap_python.patch \
|
|
0120-posixmodule-undefine-HAVE_OPENDIR.patch \
|
|
0121-getpath.py-add-support-for-mingw.patch \
|
|
0122-Don-t-build-_posixsubprocess-on-Windows.patch \
|
|
0123-_ssl-link-with-ws2_32.patch \
|
|
0124-Fix-building-_socket-module.patch \
|
|
0125-Always-normalize-path-in-abspath.patch \
|
|
0126-Include-winsock.h-when-checking-for-netdb-function.patch \
|
|
0127-include-_multiprocessing-semaphore.c-on-win32.patch \
|
|
0128-configure-build-mmap-module-on-win32.patch \
|
|
0129-venv-creation-fixes.patch \
|
|
0130-move-the-shutdown-function-where-winsock.h-is-includ.patch \
|
|
0131-configure.ac-set-BUILDEXEEXT-and-EXEEXT.patch \
|
|
0132-configure.ac-fix-building-some-test-modules.patch \
|
|
0133-Don-t-convert-sysconfig.get_config_var-VPATH-to-an-a.patch \
|
|
0134-Always-convert-to-before-passing-though-pathcch-func.patch \
|
|
0135-Build-venvlauncher.exe-from-PC-launcher.c.patch \
|
|
0136-getpath.py-fix-dirname.patch \
|
|
0137-getpath-use-normpath-on-all-generated-paths.patch \
|
|
0138-pathconfig-normpath-sys.path-0.patch \
|
|
0139-smoketests-add-some-tests-for-sys-site-paths.patch \
|
|
0140-Search-DLLs-only-on-paths-added-using-add_dll_direct.patch \
|
|
0141-Allow-picking-up-include-lib-dirs-from-CFLAGS-LDFLAG.patch \
|
|
0142-Build-and-install-libpython3.dll.patch \
|
|
0143-setup.py-don-t-prepend-the-system-library-directorie.patch \
|
|
0144-Port-GetPythonImport-to-mingw.patch \
|
|
0145-LoadLibraryExW-make-sure-to-only-use-backslashes-for.patch \
|
|
0146-Use-shared-instead-of-mdll.patch \
|
|
0147-mingw_smoketests-add-a-test-to-check-if-sysconfig-re.patch \
|
|
0148-Makefile-Add-a-dependency-on-LDLIBRARY-for-the-share.patch
|
|
|
|
autoreconf -vfi
|
|
}
|
|
|
|
build() {
|
|
declare -a _extra_config
|
|
if check_option "debug" "n"; then
|
|
_extra_config+=("--enable-optimizations")
|
|
# Upstream defaults to -O3, so we can do too
|
|
CFLAGS+=" -O3"
|
|
# FIXME: https://github.com/msys2-contrib/cpython-mingw/issues/10
|
|
# _extra_config+=("--with-lto")
|
|
else
|
|
CFLAGS+=" -O0 -ggdb"
|
|
CXXFLAGS+=" -O0 -ggdb"
|
|
_extra_config+=("--with-pydebug")
|
|
fi
|
|
|
|
case "${CARCH}" in
|
|
i686)
|
|
LDFLAGS+=" -Wl,--large-address-aware"
|
|
;;
|
|
esac
|
|
|
|
mkdir -p "${srcdir}/build-${MSYSTEM}" && cd "${srcdir}/build-${MSYSTEM}"
|
|
|
|
../Python-${pkgver}/configure \
|
|
--prefix=${MINGW_PREFIX} \
|
|
--host=${MINGW_CHOST} \
|
|
--build=${MINGW_CHOST} \
|
|
--enable-shared \
|
|
--with-system-expat \
|
|
--with-system-ffi \
|
|
--with-system-libmpdec \
|
|
--without-ensurepip \
|
|
--enable-loadable-sqlite-extensions \
|
|
--with-tzpath=${MINGW_PREFIX}/share/zoneinfo \
|
|
"${_extra_config[@]}"
|
|
|
|
make
|
|
}
|
|
|
|
check() {
|
|
cd "${srcdir}/build-${MSYSTEM}"
|
|
|
|
# Some basic tests to ensure nothing major or MSYS2 specific features are broken
|
|
./python.exe "../Python-${pkgver}/mingw_smoketests.py"
|
|
MSYSTEM= ./python.exe "../Python-${pkgver}/mingw_smoketests.py"
|
|
}
|
|
|
|
package() {
|
|
cd "${srcdir}/build-${MSYSTEM}"
|
|
|
|
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
|
|
if [[ "${_primary_python}" == "yes" ]]; then
|
|
[[ -d "${pkgdir}${MINGW_PREFIX}"/share/gdb/python3/ ]] || mkdir -p "${pkgdir}${MINGW_PREFIX}"/share/gdb/python3/
|
|
cp -f python.exe-gdb.py "${pkgdir}${MINGW_PREFIX}"/share/gdb/python3/python_gdb.py
|
|
fi
|
|
|
|
# some useful "stuff"
|
|
install -dm755 "${pkgdir}${MINGW_PREFIX}"/lib/python${_pybasever}/Tools/{i18n,scripts}
|
|
install -m755 "${srcdir}/Python-${pkgver}"/Tools/i18n/{msgfmt,pygettext}.py "${pkgdir}${MINGW_PREFIX}"/lib/python${_pybasever}/Tools/i18n/
|
|
install -m755 "${srcdir}/Python-${pkgver}"/Tools/scripts/{README,*py} "${pkgdir}${MINGW_PREFIX}"/lib/python${_pybasever}/Tools/scripts/
|
|
|
|
# fixup shebangs
|
|
for fscripts in 2to3 2to3-${_pybasever} idle3 idle${_pybasever} pydoc3 pydoc${_pybasever}; do
|
|
sed -e '1 { s|^#!.*$|#!/usr/bin/env python'"${_pybasever}"'.exe| }' -i "${pkgdir}${MINGW_PREFIX}"/bin/${fscripts}
|
|
done
|
|
|
|
# default aliases for all scripts/binaries
|
|
if [[ "${_primary_python}" == "yes" ]]; then
|
|
# Default names are aliases for Python now
|
|
cp "${pkgdir}${MINGW_PREFIX}"/bin/python3.exe "${pkgdir}${MINGW_PREFIX}"/bin/python.exe
|
|
cp "${pkgdir}${MINGW_PREFIX}"/bin/python3w.exe "${pkgdir}${MINGW_PREFIX}"/bin/pythonw.exe
|
|
cp "${pkgdir}${MINGW_PREFIX}"/bin/python3-config "${pkgdir}${MINGW_PREFIX}"/bin/python-config
|
|
cp "${pkgdir}${MINGW_PREFIX}"/bin/idle3 "${pkgdir}${MINGW_PREFIX}"/bin/idle
|
|
cp "${pkgdir}${MINGW_PREFIX}"/bin/pydoc3 "${pkgdir}${MINGW_PREFIX}"/bin/pydoc
|
|
fi
|
|
|
|
# delete anything that could conflict with the primary Python
|
|
if [[ "${_primary_python}" != "yes" ]]; then
|
|
rm "${pkgdir}${MINGW_PREFIX}"/bin/python3.exe
|
|
rm "${pkgdir}${MINGW_PREFIX}"/bin/python3w.exe
|
|
rm "${pkgdir}${MINGW_PREFIX}"/bin/python3-config
|
|
rm "${pkgdir}${MINGW_PREFIX}"/bin/idle3
|
|
rm "${pkgdir}${MINGW_PREFIX}"/bin/pydoc3
|
|
rm "${pkgdir}${MINGW_PREFIX}"/bin/2to3
|
|
rm "${pkgdir}${MINGW_PREFIX}"/lib/pkgconfig/python3-embed.pc
|
|
rm "${pkgdir}${MINGW_PREFIX}"/lib/pkgconfig/python3.pc
|
|
rm "${pkgdir}${MINGW_PREFIX}"/share/man/man1/python3.1
|
|
fi
|
|
}
|
|
|
|
sha256sums=('18e1aa7e66ff3a58423d59ed22815a6954e53342122c45df20c96877c062b9b7'
|
|
'b2d643ff47da49e87d34d97a912cfc593197abddd8f4f89c6186ccb3161cbcdb'
|
|
'af89bb43f80a4d95717a7a5549bc8af82968b9c862c0f5dc72da3d7398af5589'
|
|
'5474eb644a1135e4ddd7e7842242ecd140669cee76cb0576322a58370747d389'
|
|
'681bbb2f26430bc15f4aa0da5ab3fd2f473e82f8d7d92a53f887e80a78269f67'
|
|
'bce7876cdd7c6cd320a5b11765a36ac9499701b45ad542fdd76a725008a04fc9'
|
|
'e0a7d65e44ecf36bbbf955a5f0b0e1649dd9335fcd81a3848e69f28d99f2b591'
|
|
'c8c65b354fc5f8ab8b4a85832e57d4872614c4d90d0d9f48237dc2cd4e8a0934'
|
|
'3b93188e982443742ba2946da6d68d42f77e27a244d6040653b966e04da90619'
|
|
'd6c7eb105ec58642283b14a78fba7f03623203b71891c87bebe32565cf78b35f'
|
|
'd3156c57f962bae13a57947aa4c8db398e90584e0f195de6c50bc331c87721c1'
|
|
'184be0313a61ad9b8cdd16b7e21a905bdf838557a08479589787e8612f3b5f89'
|
|
'cb8644f7281ba9c358bffdd57755fb6ebd7677a843ef178de06ff2c38f253f76'
|
|
'f491d31881bbcf889243aaf07bfc005c3e9939f4b6386da56190b7b63b90ec85'
|
|
'afcbb94b1db26267ed805859ba602c288cdfb8dcdac8d609927203c3f562a165'
|
|
'ba45fe608a8d23554efa459e57fb65c6ff8840972c57f9f77e5b0983e3970dbe'
|
|
'1d6d4cc5a113a7dafc5d3a7cbc3097382524284b40e14a2bb169ed6a36df360c'
|
|
'a939c6eeca95674aff933ad490dd7d246dece52113a85923ff7cf818994305b6'
|
|
'370282f8f5f873b3f8cd1285154ef577d6a8226661aaf1e970ec9d082e651331'
|
|
'2db4631aeae45bdb64a75f134fb898fd9292b5fbc5cee43ece98dc4da0d364ca'
|
|
'1877855ec1356fd31c4ce36ed2f994670055d59e49820e194f21c45afedb75c9'
|
|
'ffa3f6a75985e3e8e29ce97789a2195e0eb36bac0873515b5adc9f7cf34e452b'
|
|
'5423b33604f3190fb015e28eb6c821fa32719f7e13736dffe065ed883852fedf'
|
|
'79701c43e76b1f8e4c65e713bea00683b2b27acb8cd310f4704377368936295a'
|
|
'c5916863f07150c834f5ea76b8d365c6d896733af3680ee93828d6494d347851'
|
|
'6570471c329a28ddd358dab7d53c2cffade977a624a2ca32e69df7112b785332'
|
|
'a6053f46e39b20a0cdba115ba57db537d5993107a847ac49775f2487009535ee'
|
|
'46d49cf8717acff0026f6fcbfb3ccc10f54a971c41f17241cc68631edb020705'
|
|
'046bb9877133cc85480edc7b9ed45cc7676234d36ad6e746a06dac8a6edae335'
|
|
'fb85b3d56be4ee5f0c67ec67338660efd0ad0a8800a6c9f27cac1555b5b12ec8'
|
|
'754b83c95578b921f587d908ea534a2a63587db16dc5177237ea7cc8927353c9'
|
|
'aa582bcd40dd9ce5cd87b54571b83a0d3f982370a1adfb822f861cca3b74b11b'
|
|
'90d1cd35f1c3c0dfa5197cd933a96cacea87f4674b0e80ebd8834814c293d257'
|
|
'8c9eb8276d85497d0c0b9d51ca71bd6ffc17a7410d8c0f7209235c549b623bb8'
|
|
'5e426e41d6b536d249d9c3d06ef1f2fef658b5ece52a3388bab2f27c0dcd8b06'
|
|
'e1f4f4fa27b12c15590a9e7ae55ef2f5bfe2d69584bda38af3ec78b81ea60fe3'
|
|
'0c053ff9ef2204d1e31e8ef242de6d0ff738036d76c78ffdc024bb59c4cc2e11'
|
|
'94c837edf5ad2ab853d8bf7bd99e50cee25669f03c04b24a51e20c90f4b4ef10'
|
|
'b5f28ba9e498ee546f196b0c6dcbe36cc9af008b7892a2ea49556a7523f8d4f1'
|
|
'39eb8923ea434f78279143d05da526a840bc133a21abb276a2d13b5fca25136f'
|
|
'453d3bb07b06246b48a549447925b8b8716d0f1ff5fc30cb49b4f5adef35f070'
|
|
'491323a19a0c4fb38247ab3533d9bc79e65e2c76717a9193fc59542d012fd961'
|
|
'88f1c328c599d0b0c0454cbc4ca14750f02cd6b24b392156ed4dacc7e8ae022c'
|
|
'70a505e4296e3be7da2f533f8c50fb2885cd4f47473e913828ba9752034ff3c2'
|
|
'ac51fbd795937e23471eec9e2f0c9935185a10bb4284f132bb4cff00b0552f83'
|
|
'a614d2862a290608c2f5ab48440ab3016b1e5ebc927ffa157ea7a75b3e9c15eb'
|
|
'202f0bf3e60276541832f168266d44975f23edec08b84a5586956f44de076e4f'
|
|
'b7bd8cd0d208eaf3176d72d4586221eb4d738b48c4fea555238606dee3008164'
|
|
'f90890d7795a77bd40101a964207fecd793c015ba889a5313046ef0aed7c91ba'
|
|
'16149f87b0477133bc4014176ea2090d6faf7d48b10154ff30143576ceda7a64'
|
|
'2d40d8017cf64218d383b8e870a0a030677205042b6e6b400ce29fb7399cbf03'
|
|
'2464e47d36bf90a241c03c26b03ef37f8cd8bade54e891370cfcd4b31afdcb5c'
|
|
'21a5a2855a42235adb59f6e5b4dd33d0ee65d5b6b86fd502d875d937c0741f05'
|
|
'c2aff1f9c50f5713a1a21a64a22bc814c8cc74152109e568e1ba35a0a6e50bc5'
|
|
'79979bcbf45da092bace522155cd15063c0546f103ddaa8b63930590b97ccba0'
|
|
'926ed68cefde209de5d3d2caf93b8ae5cd4fa4b79e82e272587d6629bbf0fd2a'
|
|
'9720ac709c9240c620cb9ce87cfb87c2b9a1e4f2771dd550de55693143b4525a'
|
|
'4102cc84f54744123d125fe6356364bd9ee23c825df598df2c30561f8fa18daf'
|
|
'b9713d3b992defa870bacce71eb795b6cc43a5b112d55e4493af69dd16ccb928'
|
|
'117a88c8d677321d0707cc626f3e3dd1cc0c41f1f07ff4df66671d21a6e635f9'
|
|
'2efbe1b0cc03470c0b761c460d394a1f52d86117373bd3ceff4ea92b7322548c'
|
|
'df904c000bc427604c0a90410b29fb85d82a2ab8305b49d934350481b7cb823d'
|
|
'a2a24e8cd96f4b564a604e38b253129cc6d54f21da04b27285d67e72aceba74f'
|
|
'51b9fbcc92888ff8cea8e597569d1b9f51588eccee332bd2cfd970ac40c040bc'
|
|
'ef5bc4568e3de54f60b9fad7bef706ed966c94bfebd8ed7bd11977002e9088c5'
|
|
'974a85181636a4e208fdb39c4f1283420ea39313fb1459d9ec77f76172cdfd99'
|
|
'eb975e61d35112352445949763dd9101edd1343fc34fbd5f76be4d43764bff4b'
|
|
'a8ade04bfe523bc3ef122dfd68accab8a813849695270e1b6bdeed5941f27268'
|
|
'd9100be52b75e6283a95cbda4c2c70e97ad3ad6793739bb327b084979226d2d2'
|
|
'99873e3b3fb2c401f87f7b819f6a13d4522d12f5938534ce18a53748eb522983'
|
|
'4b70e80b848ac03c64d0989cfdb2b8315e37a76b5794fc0d8f71bd7da8c55e51'
|
|
'8af64e2ba29237be3b846d620f402d9102e10894a0c2b3a9773538444b90e178'
|
|
'7aa7bbfc537bd39714a14e45b1974485480a3a8d07c269d15aa1c186248952f8'
|
|
'81ae89ff2a170ec8305dd9ac03be2e74eb216ff8fd413482e0068eb1465ad2bc'
|
|
'132ea4be1ee7347345da91501fcc93db1db87191d0beacba60a16e0417d5ffaa'
|
|
'5dbd22a61e88af64368ca7483a65618cf821afb0aec3d65c0c5bf4bee4460bc7'
|
|
'2d396a2d5d6bfc88578c79c88c4d0820cb5dd72213afe20f45a757613ff397ea'
|
|
'e741ffbaec18bcd1ce867090e9053eafa1ba0fefbcde3b8fea848c3d9c67c426'
|
|
'cb708e690828397262f8a947ad84e45422259e2679c5e61c241bc7877817a9a4'
|
|
'e7dc0b713e31d38397e7fb7de6da38f9808fb7940264da54904aa96eb8c84c60'
|
|
'6025983cadc191bd4696e1eedca1d04fabef243c8ec6fdc6530956437140f811'
|
|
'24dd4c7ec22e748a94fde164567392d15038504246c9435934bb4cf2d7af1d58'
|
|
'32947df6fe06b9c0e3bfa186fb83a385afd7f259cfe500471a1e96675587ffdd'
|
|
'7a0dc761c17c1010470d0c1039bd58f14780ff067611c27eec08f6c2b741fa58'
|
|
'b741b6ec9aa72b510e17f493a8c96cb9d7a5cadb37a1c66ebc413eac22461e99'
|
|
'dae5ab7498890dd679380fba7119dc61eeeab90f8ee8ae635763f3c19a327b0d'
|
|
'34b29d6e5177783e36b73eeaefc743f531abb68a3a4ccda947aaa9adf988f9e0'
|
|
'70e169fdf550183f841860f4eb5bae1d64c077576c9a5850481017a1b8602933'
|
|
'f81085b1ddfa733ede15b3aeffb172b2db9231a6e66fdfa1233c4552156ba316'
|
|
'3fe5c6b62f7350804e681c1d0f827c90a028fabdccb26f516d856e59f60e1070'
|
|
'313df43b2762b10c0a7b36be13db26e89d1e1f8b6bc385b6970367587b0b13fd'
|
|
'8cbe4fe10874bbb91f3b75b5789651e38778108415467d59e9283d4f1f25aa48'
|
|
'9555f140d3ea560ffbb9835e2ca63b4850e490004deed8cb81c2556451a59e96'
|
|
'8d1b8fac8164f47eb5291fd03be9c73767d0d0f6784391d37ea5fb0d0bf24c6c'
|
|
'935bbe2b6908e68b9d192dc03ae2cff76656dd5002540b37415c924bb3f3cf7f'
|
|
'b45223be968e04da1b61aa21d81482df7f09c5d2e751b1c535edeb55523fa501'
|
|
'4a1657a8dd67069155282b6b8d90397a459d59e36ddb56119bb03f8eccbed245'
|
|
'03913fcab11a2e558d8dd5903a9e32e9ebcd8b797d4e242bdcf149de9937c5bc'
|
|
'b01d9975d133bc58273453de9cf120d3cad8b85919fc7d51b9cbc81423c892ac'
|
|
'e3ef85d1d85ee69bf273b71494451f01bc7b242da4e7e596cefdc08d27da98ae'
|
|
'b7c587b9e5668830725ff8ae7cb681f5624411790b879911d2f3c9a118fe4cb6'
|
|
'516dd6297fa68bab228d20079979864b57f23e971605cbfb7e69452979981fdf'
|
|
'cbfdc1ddf6457ed3a21dad7b45801172ab0a853dde6c407b0965b184c3b2ee97'
|
|
'f92ee66bb39a8129fb737cf0cbc54b4e01a25a933651c3732a2b1def72b9661e'
|
|
'28eb6ab808702df3348e55a51bef10ec98b4cd3ff63e4e1714931f0497b3cc4b'
|
|
'eedd6633714f96884180ebfc27ee834255c3fc4cd99aef59feef01d919bc80b6'
|
|
'55fa125b86040891e91271fb115c9f6f50edd113a63fd6c4e8352a67ec34a16c'
|
|
'6ac5e35df2d5d34f15660c01800ff2c07bf21d9e668687bf0b066bb40ab9496a'
|
|
'f3ad841349e7470d86113c906eb47fbd24f4ebd7047285ec0c7b1e50354839bb'
|
|
'91d2d26222d6fa4ef48eb0f07ab68051791497a583a317d9f54beff0eecc1c19'
|
|
'3e5d74ac55d204575dd27c47ef2794aa7a9cbbeb34a758628dc4b71786eb27f2'
|
|
'a727a6a28a776b62e0c8dd87ab44fc78451a518ca2b755bea5fe64f14e294e41'
|
|
'63eb56e0dc926f3f2c208a6697f95e2f731b1ed768ec16e0bddccc2ea06e79d6'
|
|
'4f06d39eb8edd4b56f3680ad5de7e4e6717547481a1451b0c9dfa06f45556edd'
|
|
'e5f46121c73de9192e30de7ac2aa624ccd150aa1ace710c4a8c0999086aa3d0c'
|
|
'235d1c702ce0396430573b890263e3871a3988961a13f24a7a2043bfa7b84c56'
|
|
'58c12420d2956f17c8c1253700c2d2af7009802226e8412493e150c41bee2d5d'
|
|
'4f217752301f09928cf088f50d14b575528a2da942920c8e114145daf63c11c5'
|
|
'cfc60b95bd4e4e473ec3dc2f56a0f279a60224c216efaa703f0557e01dbbcad9'
|
|
'c5fe8c613ed61e554c9a2e65ed87cf809f9286f65ce088f3ceabc6981736d639'
|
|
'eab21711bb7e86569d2c27cfe82cfe2da93387b9fbb6bdb69cd8760e73b59253'
|
|
'de9e6dd9fa8803fbd557e4aa27dfce2cbfd80b3fada66faa1e00edafab8adfb3'
|
|
'8b027efd9767c929efd8ca457839e3a863a727dd964e97d85a8afe702b2c14f1'
|
|
'76c9b313f68256ae1f86fc9a1338535d10c029cf751b360fc5ca0510fe5530cf'
|
|
'37f5ab724d3d3849febd44a42ad00ed389c7499caf577cb69155e4e9d0c58378'
|
|
'586dd9b193b099416c61a58aa7b77e845372954b98204ff95ad70d41489377b9'
|
|
'ea31adbab06f183ed1fdfe39ade5a7aec02fabce7f2f5041e58087b524b36bb4'
|
|
'baeece892f02e80475ed7d7064c50e782901ee1efba953ea79a2ace0a2f0808e'
|
|
'f1189e50e3227af3e1816a516eeed5136d3733cf463c785bf0b4745b28be5c82'
|
|
'8a9a59c0a453a93037b3a1f5f80d4ba54b086275461a4403520d8e6651e0aeed'
|
|
'd15d668234cbc688e2cce78ec601298c2ea1c9991017f25900fe5d3574e8afdd'
|
|
'52fc778a49cd5d62a33b34ce08ea9b7c5045a8f352a1e7231a4c7367b0d45cb0'
|
|
'6df263bd7b360881e962be7399d505effb20387253f154242084f520b38d870a'
|
|
'0f75ee1f0bc8e3f64bb0433445096899631b1f610132e3f436eef03e373ec5c3'
|
|
'6bc64a9c9430fb59eb260ca4c3f8ddf08ec8f815e32fcdde12e1d258628355ad'
|
|
'aa64a98724d64dfcb0550bf4f5f7911aba329df809016482fa8d1781ca68b72d'
|
|
'e58c244b4d68bf21362e7d790c1440dd73818e71235b3ede4335b04b0814dd60'
|
|
'dbed0d19dd0259e9a7d827b15700c09579fab10129888c49484e3f6491bd0730'
|
|
'6f28e917e0bbb56ea87d254363a9debe4892b515a442377f69aea71ef139b3e9'
|
|
'c87c81ca04e5781be9e7669ad5c410c7c390f4e45d9c52ee7170c298383c3440'
|
|
'8af4e4c843dd927f3a715cef726e33efcdc6d3e8511b046e0355f9f86789480f'
|
|
'502395cacd1c6fe6afd774d076832cca60789afe1cae2b47bf8f595881c46502'
|
|
'30961937ad115b3b7fffd582586554d7b3e94d3f44aa7c6ea580ff68de5d1e04'
|
|
'dd9888decab17aefa9daaec28dd6905d04acf5f8195efcdbfffde1b735a47b4f'
|
|
'59f78a525019957d703b349f76aebc3bae31a9360286110dad654499dded54f0'
|
|
'07f49c0e31b91322be476d55bcb6b2d34735da66fb7fbd337ff2868d5f8e61db'
|
|
'92bfeac44d0de98e6efca835f48eea9470b68748b60f13e1c29bd95aaf8978b3'
|
|
'2af8d2ac950018fdba8f157d9aa9aa38f7cbd52caabf16b8f660f003ca54944f'
|
|
'0e3a68314a7f0e01842658caaae35a4c19ed9aa9d680f5c1ca704c97d67194b2')
|