# 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.9
_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}.12
pkgrel=2
pkgdesc="A high-level scripting language (mingw-w64)"
arch=('any')
mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64' 'clang32' 'clangarm64')
license=('PSF')
url="https://www.python.org/"
depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs"
         "${MINGW_PACKAGE_PREFIX}-expat"
         "${MINGW_PACKAGE_PREFIX}-bzip2"
         "${MINGW_PACKAGE_PREFIX}-libffi"
         "${MINGW_PACKAGE_PREFIX}-mpdecimal"
         "${MINGW_PACKAGE_PREFIX}-ncurses"
         "${MINGW_PACKAGE_PREFIX}-openssl"
         "${MINGW_PACKAGE_PREFIX}-sqlite3"
         "${MINGW_PACKAGE_PREFIX}-tcl"
         "${MINGW_PACKAGE_PREFIX}-tk"
         "${MINGW_PACKAGE_PREFIX}-zlib"
         "${MINGW_PACKAGE_PREFIX}-xz"
         "${MINGW_PACKAGE_PREFIX}-tzdata")
makedepends=(
  "${MINGW_PACKAGE_PREFIX}-cc"
  "${MINGW_PACKAGE_PREFIX}-autotools"
  "autoconf-archive"
)
options=('makeflags') # 'debug' '!strip')
source=("https://www.python.org/ftp/python/${pkgver%rc?}/Python-${pkgver}.tar.xz"
        0001-sysconfig-make-_sysconfigdata.py-relocatable.patch
        0002-restore-setup-config.patch
        0003-build-add-with-nt-threads-and-make-it-default-on-min.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-issue6672-v2-Add-Mingw-recognition-to-pyport.h-to-al.patch
        0013-MINGW-configure-for-shared-build.patch
        0014-MINGW-dynamic-loading-support.patch
        0015-MINGW-ignore-main-program-for-frozen-scripts.patch
        0016-MINGW-setup-_multiprocessing-module.patch
        0017-MINGW-setup-select-module.patch
        0018-MINGW-setup-_ctypes-module-with-system-libffi.patch
        0019-MINGW-defect-winsock2-and-setup-_socket-module.patch
        0020-MINGW-exclude-unix-only-modules.patch
        0021-MINGW-setup-msvcrt-and-_winapi-modules.patch
        0022-sysconfig-MINGW-build-extensions-with-GCC.patch
        0023-MINGW-setup-_ssl-module.patch
        0024-MINGW-generalization-of-posix-build-in-sysconfig.py.patch
        0025-MINGW-support-stdcall-without-underscore.patch
        0026-use-replace-instead-rename-to-avoid-failure-on-windo.patch
        0027-MINGW-customize-site.patch
        0028-add-python-config-sh.patch
        0029-cross-darwin-feature.patch
        0030-mingw-system-libffi.patch
        0031-msys-mingw-prefer-unix-sep-if-MSYSTEM.patch
        0032-mingw-use-posix-getpath.patch
        0033-mingw-add-ModuleFileName-dir-to-PATH.patch
        0034-mingw-add-BUILDIN_WIN32_MODULEs-time-msvcrt.patch
        0035-msys-cygwin-semi-native-build-sysconfig.patch
        0036-sysconfig-mingw-sysconfig-like-posix.patch
        0037-build-_winapi-earlier-so-we-can-use-it-in-distutils-.patch
        0038-cross-dont-add-multiarch-paths-if-cross-compiling.patch
        0039-mingw-use-backslashes-in-compileall-py.patch
        0040-msys-convert_path-fix-and-root-hack.patch
        0041-allow-static-tcltk.patch
        0042-mingw-pdcurses_ISPAD.patch
        0043-grammar-fixes.patch
        0044-builddir-fixes.patch
        0045-msys-monkeypatch-os-system-via-sh-exe.patch
        0046-msys-replace-slashes-used-in-io-redirection.patch
        0047-remove_path_max.default.patch
        0048-dont-link-with-gettext.patch
        0049-ctypes-python-dll.patch
        0050-gdbm-module-includes.patch
        0051-use-gnu_printf-in-format.patch
        0052-mingw-fix-ssl-dont-use-enum_certificates.patch
        0053-fix-using-dllhandle-and-winver-mingw.patch
        0054-Add-AMD64-to-sys-config-so-msvccompiler-get_build_ve.patch
        0055-MINGW-link-with-additional-library.patch
        0056-install-msilib.patch
        0057-fix-signal-module-build.patch
        0058-build-build-winconsoleio-and-_testconsole.patch
        0059-expose-sem_unlink.patch
        0060-cygpty-isatty.patch
        0061-disable-broken-gdbm-module.patch
        0062-build-link-win-resource-files-and-build-pythonw.patch
        0063-3.7-mpdec-mingw.patch
        0064-disable-readline.patch
        0065-fix-isselectable.patch
        0066-use-_wcsnicmp-instead-wcsncasecmp.patch
        0067-_xxsubinterpretersmodule.patch
        0068-sqlite3-module-defines.patch
        0069-configure.ac-fix-inet_pton-check.patch
        0070-set-venv-activate-path-unix.patch
        0071-venv-creation-fixes.patch
        0072-pass-gen-profile-ldflags.patch
        0073-pkg-config-windows-must-link-ext-with-python-lib.patch
        0074-importlib-bootstrap-path-sep.patch
        0075-pathlib-path-sep.patch
        0076-warnings-fixes.patch
        0077-fix-build-testinternalcapi.patch
        0078-extend-MS_WINDOWS-flag.patch
        0079-clang-arm64.patch
        0080-configure.ac-set-MINGW-stack-reserve.patch
        0081-Don-t-use-os.pathsep-to-find-EOF.patch
        0082-Fix-extension-suffix-for-c-extensions-on-mingw.patch
        0083-Change-the-get_platform-method-in-sysconfig.patch
        0084-distutils-compiler-customize-mingw-cygwin-compilers.patch
        0085-distutils-compiler-enable-new-dtags.patch
        0086-distutils-MINGW-build-extensions-with-GCC.patch
        0087-distutils-use-Mingw32CCompiler-as-default-compiler-f.patch
        0088-distutils-find-import-library.patch
        0089-distutils-avoid-circular-dependency-from-time-module.patch
        0090-distutils-generalization-of-posix-build-in-distutils.patch
        0091-distutils-mingw-sysconfig-like-posix.patch
        0092-distutils-get_versions-fixes.patch
        0093-distutils-install-layout-as-posix.patch
        0094-distutils-msys-convert_path-fix-and-root-hack.patch
        0095-distutils-mingw-build-optimized-ext.patch
        0096-distutils-cygwinccompiler-dont-strip-modules-if-pyde.patch
        0097-distutils-get-compilers-from-env-vars.patch
        0098-distutils-add-windmc-to-cygwinccompiler.patch
        0099-distutils-fix-msvc9-import.patch
        0100-distutils-mingw-add-LIBPL-to-library-dirs.patch
        0101-distutils-Change-the-get_platform-method-in-distutil.patch
        0102-build-Fix-ncursesw-include-lookup.patch
        0103-tests-fix-test_bytes.patch
        0104-time-fix-strftime-not-raising-for-invalid-year-value.patch
        0105-ctypes-find_library-c-should-return-None-with-ucrt.patch
        0106-build-Disable-checks-for-dlopen-dlfcn.patch
        0107-Fix-install-location-of-the-import-library.patch
        0108-Set-MSYS2_ARG_CONV_EXCL-for-the-shared-Python-module.patch
        0109-build-Integrate-venvlauncher-build-installation-into.patch
        0110-configure.ac-set-_WIN32_WINNT-version.patch
        0111-configure.ac-don-t-check-for-clock_-functions.patch
        0112-expanduser-normpath-paths-coming-from-env-vars.patch
        0113-Add-support-for-Windows-7-Python-3.9.patch
        0114-CI-test-the-build-and-add-some-mingw-specific-tests.patch
        0115-decimal-backport-build-fixes.patch
        0116-smoketests-test-that-_decimal-exists.patch
        0117-Prefer-sysconfig.python_build.patch
        0118-distutils-remove-checks-for-ancient-gcc-binutils.patch
        0119-distutils-split-CC-env-var-before-passing-to-subproc.patch
        0120-_testconsole.c-Fix-casing-path-sep.patch
        0121-Return-consistent-architecture-markers-for-python-on.patch
        0122-distutils-add-back-gcc_version.patch
        0123-fix-mingw-cross-compiling-in-setup.py.patch
        0124-Use-actions-setup-python-for-setting-up-correct-vers.patch
        0125-Fix-buffer-overflow-in-Py_GetSepW.patch
        0126-Remove-unnecessary-strlen-in-Py_NormalizeSepsW.patch
        0127-handle-ncursesw-pkg-config-when-cross-compiling.patch
        0128-Use-CC-instead-of-cc.patch
        0129-bpo-46811-Make-test-suite-support-Expat-2.4.5-GH-314.patch
        0130-Avoid-using-sysconfig-in-site.py.patch
        0131-Commit-regenerated-importlib.patch
        0132-configure-Include-a-header-in-the-check-for-_beginth.patch
        0133-configure.ac-Default-to-without-c-locale-coercion-on.patch
        0134-CI-remove-without-c-locale-coercion.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-restore-setup-config.patch \
  0003-build-add-with-nt-threads-and-make-it-default-on-min.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-issue6672-v2-Add-Mingw-recognition-to-pyport.h-to-al.patch \
  0013-MINGW-configure-for-shared-build.patch \
  0014-MINGW-dynamic-loading-support.patch \
  0015-MINGW-ignore-main-program-for-frozen-scripts.patch \
  0016-MINGW-setup-_multiprocessing-module.patch \
  0017-MINGW-setup-select-module.patch \
  0018-MINGW-setup-_ctypes-module-with-system-libffi.patch \
  0019-MINGW-defect-winsock2-and-setup-_socket-module.patch \
  0020-MINGW-exclude-unix-only-modules.patch \
  0021-MINGW-setup-msvcrt-and-_winapi-modules.patch \
  0022-sysconfig-MINGW-build-extensions-with-GCC.patch \
  0023-MINGW-setup-_ssl-module.patch \
  0024-MINGW-generalization-of-posix-build-in-sysconfig.py.patch \
  0025-MINGW-support-stdcall-without-underscore.patch \
  0026-use-replace-instead-rename-to-avoid-failure-on-windo.patch \
  0027-MINGW-customize-site.patch \
  0028-add-python-config-sh.patch \
  0029-cross-darwin-feature.patch \
  0030-mingw-system-libffi.patch \
  0031-msys-mingw-prefer-unix-sep-if-MSYSTEM.patch \
  0032-mingw-use-posix-getpath.patch \
  0033-mingw-add-ModuleFileName-dir-to-PATH.patch \
  0034-mingw-add-BUILDIN_WIN32_MODULEs-time-msvcrt.patch \
  0035-msys-cygwin-semi-native-build-sysconfig.patch \
  0036-sysconfig-mingw-sysconfig-like-posix.patch \
  0037-build-_winapi-earlier-so-we-can-use-it-in-distutils-.patch \
  0038-cross-dont-add-multiarch-paths-if-cross-compiling.patch \
  0039-mingw-use-backslashes-in-compileall-py.patch \
  0040-msys-convert_path-fix-and-root-hack.patch \
  0041-allow-static-tcltk.patch \
  0042-mingw-pdcurses_ISPAD.patch \
  0043-grammar-fixes.patch \
  0044-builddir-fixes.patch \
  0045-msys-monkeypatch-os-system-via-sh-exe.patch \
  0046-msys-replace-slashes-used-in-io-redirection.patch \
  0047-remove_path_max.default.patch \
  0048-dont-link-with-gettext.patch \
  0049-ctypes-python-dll.patch \
  0050-gdbm-module-includes.patch \
  0051-use-gnu_printf-in-format.patch \
  0052-mingw-fix-ssl-dont-use-enum_certificates.patch \
  0053-fix-using-dllhandle-and-winver-mingw.patch \
  0054-Add-AMD64-to-sys-config-so-msvccompiler-get_build_ve.patch \
  0055-MINGW-link-with-additional-library.patch \
  0056-install-msilib.patch \
  0057-fix-signal-module-build.patch \
  0058-build-build-winconsoleio-and-_testconsole.patch \
  0059-expose-sem_unlink.patch \
  0060-cygpty-isatty.patch \
  0061-disable-broken-gdbm-module.patch \
  0062-build-link-win-resource-files-and-build-pythonw.patch \
  0063-3.7-mpdec-mingw.patch \
  0064-disable-readline.patch \
  0065-fix-isselectable.patch \
  0066-use-_wcsnicmp-instead-wcsncasecmp.patch \
  0067-_xxsubinterpretersmodule.patch \
  0068-sqlite3-module-defines.patch \
  0069-configure.ac-fix-inet_pton-check.patch \
  0070-set-venv-activate-path-unix.patch \
  0071-venv-creation-fixes.patch \
  0072-pass-gen-profile-ldflags.patch \
  0073-pkg-config-windows-must-link-ext-with-python-lib.patch \
  0074-importlib-bootstrap-path-sep.patch \
  0075-pathlib-path-sep.patch \
  0076-warnings-fixes.patch \
  0077-fix-build-testinternalcapi.patch \
  0078-extend-MS_WINDOWS-flag.patch \
  0079-clang-arm64.patch \
  0080-configure.ac-set-MINGW-stack-reserve.patch \
  0081-Don-t-use-os.pathsep-to-find-EOF.patch \
  0082-Fix-extension-suffix-for-c-extensions-on-mingw.patch \
  0083-Change-the-get_platform-method-in-sysconfig.patch \
  0084-distutils-compiler-customize-mingw-cygwin-compilers.patch \
  0085-distutils-compiler-enable-new-dtags.patch \
  0086-distutils-MINGW-build-extensions-with-GCC.patch \
  0087-distutils-use-Mingw32CCompiler-as-default-compiler-f.patch \
  0088-distutils-find-import-library.patch \
  0089-distutils-avoid-circular-dependency-from-time-module.patch \
  0090-distutils-generalization-of-posix-build-in-distutils.patch \
  0091-distutils-mingw-sysconfig-like-posix.patch \
  0092-distutils-get_versions-fixes.patch \
  0093-distutils-install-layout-as-posix.patch \
  0094-distutils-msys-convert_path-fix-and-root-hack.patch \
  0095-distutils-mingw-build-optimized-ext.patch \
  0096-distutils-cygwinccompiler-dont-strip-modules-if-pyde.patch \
  0097-distutils-get-compilers-from-env-vars.patch \
  0098-distutils-add-windmc-to-cygwinccompiler.patch \
  0099-distutils-fix-msvc9-import.patch \
  0100-distutils-mingw-add-LIBPL-to-library-dirs.patch \
  0101-distutils-Change-the-get_platform-method-in-distutil.patch \
  0102-build-Fix-ncursesw-include-lookup.patch \
  0103-tests-fix-test_bytes.patch \
  0104-time-fix-strftime-not-raising-for-invalid-year-value.patch \
  0105-ctypes-find_library-c-should-return-None-with-ucrt.patch \
  0106-build-Disable-checks-for-dlopen-dlfcn.patch \
  0107-Fix-install-location-of-the-import-library.patch \
  0108-Set-MSYS2_ARG_CONV_EXCL-for-the-shared-Python-module.patch \
  0109-build-Integrate-venvlauncher-build-installation-into.patch \
  0110-configure.ac-set-_WIN32_WINNT-version.patch \
  0111-configure.ac-don-t-check-for-clock_-functions.patch \
  0112-expanduser-normpath-paths-coming-from-env-vars.patch \
  0113-Add-support-for-Windows-7-Python-3.9.patch \
  0114-CI-test-the-build-and-add-some-mingw-specific-tests.patch \
  0115-decimal-backport-build-fixes.patch \
  0116-smoketests-test-that-_decimal-exists.patch \
  0117-Prefer-sysconfig.python_build.patch \
  0118-distutils-remove-checks-for-ancient-gcc-binutils.patch \
  0119-distutils-split-CC-env-var-before-passing-to-subproc.patch \
  0120-_testconsole.c-Fix-casing-path-sep.patch \
  0121-Return-consistent-architecture-markers-for-python-on.patch \
  0122-distutils-add-back-gcc_version.patch \
  0123-fix-mingw-cross-compiling-in-setup.py.patch \
  0124-Use-actions-setup-python-for-setting-up-correct-vers.patch \
  0125-Fix-buffer-overflow-in-Py_GetSepW.patch \
  0126-Remove-unnecessary-strlen-in-Py_NormalizeSepsW.patch \
  0127-handle-ncursesw-pkg-config-when-cross-compiling.patch \
  0128-Use-CC-instead-of-cc.patch \
  0129-bpo-46811-Make-test-suite-support-Expat-2.4.5-GH-314.patch \
  0130-Avoid-using-sysconfig-in-site.py.patch \
  0131-Commit-regenerated-importlib.patch \
  0132-configure-Include-a-header-in-the-check-for-_beginth.patch \
  0133-configure.ac-Default-to-without-c-locale-coercion-on.patch \
  0134-CI-remove-without-c-locale-coercion.patch
 
  autoreconf -vfi
}

build() {
  declare -a _extra_config
  if check_option "debug" "n"; then
    _extra_config+=("--enable-optimizations")
    # FIXME: https://github.com/msys2-contrib/cpython-mingw/issues/10
    # _extra_config+=("--with-lto")
  else
    CFLAGS+=" -O0 -ggdb"
    CXXFLAGS+=" -O0 -ggdb"
    _extra_config+=("--with-pydebug")
  fi

  [[ -d "${srcdir}/build-${CARCH}" ]] && rm -rf "${srcdir}/build-${CARCH}"
  mkdir -p "${srcdir}/build-${CARCH}" && cd "${srcdir}/build-${CARCH}"

  ../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-${CARCH}"

  # 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-${CARCH}"

  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 -i "s|$(cygpath -w ${MINGW_PREFIX} | sed 's|\\|\\\\|g')/bin/python${_pybasever}.exe|/usr/bin/env python${_pybasever}.exe|g" \
      "${pkgdir}${MINGW_PREFIX}"/bin/${fscripts}
  done

  # default 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=('2cd94b20670e4159c6d9ab57f91dbf255b97d8c1a1451d1c35f4ec1968adf971'
            'e2ba922e130c24c448aac8c487653687ce9b3f459e178904be3748b2d54cf1ea'
            '067ed869b2beacdd604bed076f13a2bb447d8364194546c96c86a19301030ff2'
            'e43c421776ab9a15ad78772d1a5c5f8dcc89ae2d31bd64b5632d575d4d9c352a'
            '57cfa64b5b3bdea30d428643a455852d16dc2a5b9f97ca038da9ed8d9e621ed3'
            '4e9046e9b8cae235d910eabc551f42f11db4f9b769544b5217d6a6e354543903'
            '4701b6274850e2149a2194fb3f70d1498581ec37de32d46d384aee48c5d7ac61'
            'cb8ae8057ced0b94be79e195d6df64e23bb4e436f53727a713503faee67d027a'
            '3b79155cbd5d164158e132ad2b70fad288a8323b6f2dfadca420220be4839df3'
            '1418b24cf76046fdcb9d8dbf84de9bb3c99fc2916dccb719fb6478881a465c33'
            'd47f3a067b9b9ffc3375d7deefe1eb87e30acb10e3b6723290e4c1ea9aebef71'
            '6a270d412a5ef26a002cd67d998d5456af6963abf27d2c9b767726660660f493'
            '079b906e1e94fbc43a1f498a626d1be2e85f36c090ad9300b185bc526bad529c'
            '6d277821a017e325133d7d3a6bc58465fa1c157635a772205069be815649b3e3'
            'c37dc1fa659b751ee6b38ceb6133d12be9078e9d2f9f07bb2dffeb0ee94e5867'
            '2380ffa8ee39ee53f32cf9d5a0b9efab95439f52ee5946f2b00701ab8ec40979'
            '6065bb75e67c40d058c51f5d85f306527490f94582b2ca738194c113cbc40dd8'
            '2bfe430818919cb468867fa21d77f03cf4c20869f971c11828edc61fd854ea8b'
            'ce3935b2bcbd801cea6628732580b5a81eb093fd9f47a55f29d06015c943576d'
            '7864f202327e4e205ce759b6d90671b7a8f381ede7cdacd47381d59392d424f7'
            '08b8e0c404cb2c5a046d613cc89289c47f8511fc1a29bb965ef957b6d6c0aec8'
            '860589d36a0119f93bcf247e8711826ca656f586ecc62953aadfa22428af29f8'
            'c728eea714a47c29c27d84a5a2865310cc59b1739c684f053fee13014cf22eca'
            '6b7a526e4a68844a74dea82f45a2027e1d20d71b4b6b60de395191314c2005f2'
            '4209376ea53450585963436128425102eaae02822d95ffa4241a8c750d5570f3'
            'ae4c50955be07ffe7a572233d3cef9509dcc4b27d44cb05bffb56d733c712ef8'
            '8ba73c256cabd9c203364dbf1cc2fcd428998334ec95cc98c2681d2f49cce29a'
            'd8d217f68efdbbaf8ea1a89af911d72801e74c1659abf365f060fe95e8f8a8ea'
            '606dd530e9f110b3a79823daaf68da9f8a107bb8d79d8544b5bbd6f22ae06cf2'
            '9d5140d82335821ec9042c0103f1782657a013a550283ab73361be66f61fc39e'
            'aad92103d22c24324faeaf14f34af2453801f11cf4975382762f1ce17926f8c5'
            '6c560e5a24b31236f9925899891adec69d53aef1171258118e81a708f93f9fbb'
            '07004b72177970259239b61982295eb3249a41e8ccbc64c22c5725f86824eecc'
            '33257ce619b671de1d47d11223308aa8be46f7a4b159dec49aab4fb04e82982a'
            '05e4fb486d0a90d683bc366ab3cb4447da1610de20d6aa38c0151c832c302a3d'
            'c36a46be17f991c83b2ac63efddf50948af678a4b59bc1781f5bbf9ce4a508d4'
            '93b885f107a26ccbacb4b395672566324361d07939a741cad7b40870ab2aff5a'
            '170e1b3d545f0583d699066cb78c10b1a51deaac52e968098bdcc17d3075311a'
            '94a80933fb3ec0de4cb84e9ad90b5967ffef00cd6c04c84397fa97ca1d5ceea7'
            '6df775d47b0f69143824f4346043fced6ae99ff33cc35932ba0d125ca666efe4'
            '1b86510bb7072c2348d76bc8fd88a7463cdab34345bccfe40f0d5a000ec7a670'
            '2b52a45037f16b59c061a4c8813d9d0246bd6991d258ee6806eaf4a9e4d9c679'
            'ec3d787fda545a7490df9dc70ba96c4370c6766e8be1848b6f244827e0d4aea7'
            '34eb7117f525c8d276bdf060bd4c365d3fc84b314c6637b9cba9fd80df9b40aa'
            '708357a869ffda1527f220d986a5c3b30881b98070c82e024a03fb438a70baa7'
            '08d79e59e5b698253c1bcb0c1bf6b9f10e3f11c5f82e37ad1750c1492eb85a99'
            '16e8ea9dd5cc8600ea00a945b91af138d390d269b8cf3c2b19e4963e36ea1450'
            '77294a5d356c6a1582bb2733cc1c1cdfcf730885c5160da2c444fc4dd680b113'
            '2caa49f6ac19972ef3ebf9d8765dd3e06faaa6c692b60652fb22cb8c1c29351d'
            'f9d49674c84d2064eb063bd60bc629dbc4d5264eabd0fa6416244d406157a8e0'
            '722c6d2a87a7242e6f0b29584f972dd4c9a90dfdad5681e45221116c7667c3e6'
            'e703cac280231e322b9d37f0dcc57f8993e789fd09fc35c147f2ce78e233d225'
            'd362ec479d8981a0660a76132304ef9dc9a4a41032250c88e174d86bbe4731a8'
            'ecc18f335d0251ad662d7ec40fd8c31df4126d73b083566344007a4d3b226efa'
            '748f0f0a254b249c2117cc780840f58a151066cb84e95cae765c1382df6871aa'
            'b48b97d9ffd1f3eb60c9f79856862e2b59e10286078d00f09bb9cbccd62a5873'
            'eea6d4181a4119bada6c11617c1937cf573b81fa0e7ac33728af92df2a78c036'
            '89feee7cdd43b961dfcad28afb1d1d48c149987aa7c36d7e0f5cf71306339f90'
            'bba69df1bf29a3faa2718b225410cad950fd1f2923550e6064ff57efa2b2649e'
            '5ac1ca90b5724780816099da00e303506b4e70a57a33bb103e20ee3694eacf98'
            '603f2a60e452d90d07f7b6247f3e856a793a102e464a15219521e64abc31e31b'
            'ae76b4058e1f9d961e5be7984b366617d3d71710701c6314cf8c843aec18020b'
            '3a4efbeea95810d3d11bc9f127eafb0b5dbe6356dced7c4f2576ea3466e7bee8'
            'c1a44432fb6308fd94d7d3472d184dadf6c7d94efad7bd432242987066ac8f8a'
            '2c97a863310ea3c9d34e64ef93e3e3ebc3ff03445ccbc650f4582bd66bf60377'
            '9543c9b2759e38f4a6a5d30fe33c3fccea6a6493bfec599b6a17859c0ca3c4d0'
            '7185eeb4f945bf3d45a027b34ecf4ace38e97e99b77a6d0867da6c494d149364'
            '42cb45ba333aecc8714a4da81a75abe47ac0a4d53c0d50e0a69d32b9a07f3ac5'
            '20f092f365a220e9de022124c7136b4a4a1f1853071c3116a92bcf5079a60707'
            'a7e23f648ce2cf7b08099392d0ec521f23875c8edbf5979f89b3c65b62729916'
            '4c0eb9b7ef38030fc89a94708db0d84431868f706e56ba85863a378d8d692121'
            'c59b0646e9ad5b69f6bad344bcde853fbc4a64de886e55cfd57954f393f2168b'
            'f612904f4084d892d28a60edc0ee22e2cc5e8f1220038a01990256f8e5fe5907'
            '4cb13ec8c08262b9ad5e172564f671a17e0171cedf4d7586a6515ecc75d4bd44'
            'ca09e0ce4599905c96a9b484a5494632fde4287b04ff0dfc950cc0a578bc1c6d'
            '448414c0796aab508114635de5084060570545fa7bf236b4172f783e7dbb7677'
            'f0655258ce7eaaffbe69ab6a805a83d1462c30c2cb12175d338b15e875bb76ec'
            '5fbfa6fb81b41e47880bfd424e8619933a0bd00c15c4334e08a3fd54373cac3e'
            '302205cb37f86e6ab8510a6e81793b73754802f722e60592f8f3a2fff6d5056f'
            '940a2e3e0c78272fdb2f358c8d2ecc76d090b57af6503f73543cd66ae5213039'
            'a819a98609bfd9c2b343ee79ff6c1845f34f1724641b4c30cb18474ab6b5dcad'
            'd0eac3905ae1208bed6a0033d60b76335f5e7e881e423f4046f171dbc8c5cf48'
            'f7c1f00e721671db368330d4d2e607088d46ddbe2ad744633a8d8ac2c2b0744e'
            '34764304b9ac8c75276d1d56d427a1a823c2f1b80f9360d5d16209d3a381a1f1'
            'e5845106790f4e864fa8f16a13c1001096e9e1784ef5cf21c6ec33a3f2d4faa2'
            '289f2578088e82ec69a95208a10ceb0fb265dbe1bb96f16aa5d6f510b9a5ea37'
            '3226bf295ccf7dddebfd87d4521b4713862632f555f885537ea4d15bf751e356'
            'f75ce991a9fa884207d770226fbcaa80c3cfa620d0d3749e97d4c7b49bfca71d'
            'd5cd021f886bf1de05bc72531861a752749981da2fb172d030146e7a262eb31f'
            '30f337bf466ea6f9c3d6d287f10717fac56d074b9c2aeca02bae2714eb63d476'
            '290c9ed9742d9cad537eef95fba67a6e01b5e2750009db3c2cb04b0c1f0e2a99'
            '26698398d4abaaeaf662533a9afaefcc233e5ce1c3482699ffc30c6fe0a585fc'
            'f52e9f914ff3251954fcc19ed44e28d68ac7e452232dc7784e83daac8d736322'
            '393bfd3c11a3750c824f545f47caf54f8c9205156f598ce33ffaccfe3b57a1e1'
            '75c60043bf709de863bb2a026c678d73c9310d9975c2aab751ce6334a8f7ef98'
            '4e7c659246b13ae3d443f1e323d7b8e2809e26e0746eeac5d53e0f57a670c6c7'
            'fa13d7a3eb4512b355b28188cf5446bfa8002e04b2fd81b87029272353420dab'
            'd8b31d3677a0c40bfb2ba4322bf857b35e0530823972b33e5f109eb117e74346'
            '9b2c198ad0b5288ce3e5af8cfbf909627edcef3f126b3ef084a00fc93c81c9be'
            'c3e5f2064ae470aa5e3fd2acec1b9810a999ff3fd394318784aed87b1f9d14db'
            '13e680a45153b3a19f3a805a57dd2c59bf977251c67b46804b61b776d21816c7'
            '029418ceeea7da1885e9d001115a56d126b603a49d0ecfbe88ffafe409dfbcb0'
            '7d8bea89d15ac283d28f92607077b71d19cbd48862b613bd4f34c21f6b430eee'
            '6cc22e71c74f319570ff3f066a8a3939781d0e942fe91f9d30a5331ad1f5c18a'
            '7de47ed75d3d7bafb08e6bfddaa7952526c9d99edc879f392a0a63629bcc5857'
            'c2e40b5f66682ec41f1ccb7ae9949a603918eedcf17939e04d0259bb70be8a6f'
            'c6c8841a9c9622ebb628d13b9d0b844bf79e48f0ecd404e07bddf590b8650ac0'
            '7c550468e6c9405bd2cb9b5684a0e9099f2d81140a4104799b14f5e37afdc972'
            'f102262e905d483c7fd1fc187cdecd782db925a2edce121d79ed9746c3d305a6'
            '464eb60669f053f562f48d632327493efce3d99745abdb466f700f776189ba6a'
            'f257530052eb6831d603b18d934b5dc19fa1b2b9d59a1dd64659ee23f2a78b61'
            '1148d54e44e3b0d964fffd42a26f73e9bc0bea16af2e3d3fe4ed0f582709653f'
            '0bb431949c861e4adcd584e1a53b195348c9487bfad8037b37ebe9ae47e96a87'
            '4218b0a52cb72380ba9b054e5aaf8edd367705d69a568aa5afb9dbde877e3f43'
            '2d2a529720107b55e6c991dd53f0151359123f5be0035ec7b03b7cdd91d2058c'
            'a90fbb8f38e4c0ff97dd74f058173c9cc8b3732f68850c5d499d7d05cad3debd'
            '1906267720110bb0db0145bddd878d6909729a2729fb6d7a891ee1cb22aa1e40'
            'fc12afa5a3c91f3088458b03963020be620028dd7be8fb4dcffef224f8c8b031'
            '9dba90641aef38e9bb33538d357b81c2af56c50098b22cdb6c1c531442a9fc09'
            'aedd9608e6db030a30f779f97877f802ba78662f50bbe0984e5988e19b2ce592'
            '49e66811d63e88b38f6154c6dec732294f9718326cf147c70ea35c3af1dc9fa5'
            'd855f39afc24607fd5bed14f06381460342ce6667d15c29711ae1d87ffa64d24'
            '4e092465d2f0f47a2a49141df19b1b3327ecd6f0abc1adc361cfe4fd2cd149cd'
            'b6245c6adad6d7a67960a5224bcf5c480ae5769f35375ab71c00d95ccd65cbd5'
            '6d089e47b65db6ef40b374bf7f89bebf2952e1949c2710de8c8d710707fe4943'
            'efecbe6ee639652f2253c672b4da345e400167d59daf8bbe1991e4c474e7dc76'
            '66ec8dff3674523961060ecf263d9e3b2efe96c3392e445ed8707bde00fee918'
            'd251b0d1bdee189fcefa6244f529a6c16d8bfc3b17aa597fad7d15f531dc34d3'
            'd351e774edb8c318811ac4765e345c11d45fbe954a6abc5e8ca6bc9a575f15af'
            '8fb7a607942882d114a6b662d5ec516343b60b3c8a3ad7623435b3054fb1ba2b'
            '4a1df1a248befcb9bfebe64316b948e2c81c815a0c43879dd163809a4fb41a46'
            '6c4911918aa47b505162e424663998a7319822b84a9c8385c7463405ca820e47'
            '26172989d1175c66608fa1709f19f981c3d1e54c336bf992a09e556d5c3e4722'
            'd69294330356d9b870cf8066ac352f8a825bac21fe7c72f5fa87f37dd650fbeb'
            'b521b3a630be5d94d303d3813784e65eead5294df0a04e75530f243e072112d8')
