diff --git a/mingw-w64-python-findpython/PKGBUILD b/mingw-w64-python-findpython/PKGBUILD new file mode 100644 index 0000000000..79126039b9 --- /dev/null +++ b/mingw-w64-python-findpython/PKGBUILD @@ -0,0 +1,37 @@ +# Contributor: Konstantin Podsvirov + +_realname=findpython +pkgbase=mingw-w64-python-${_realname} +pkgname=("${MINGW_PACKAGE_PREFIX}-python-${_realname}") +pkgver=0.2.5 +pkgrel=1 +pkgdesc='A utility to find python versions on your system (mingw-w64)' +arch=('any') +mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64' 'clang32' 'clangarm64') +url='https://github.com/frostming/findpython' +license=('MIT') +depends=("${MINGW_PACKAGE_PREFIX}-python" + "${MINGW_PACKAGE_PREFIX}-python-packaging") +makedepends=("${MINGW_PACKAGE_PREFIX}-python-build" + "${MINGW_PACKAGE_PREFIX}-python-installer" + "${MINGW_PACKAGE_PREFIX}-python-pdm-pep517" + "${MINGW_PACKAGE_PREFIX}-python-wheel") +options=('!strip') +source=("${_realname}-${pkgver}.tar.gz::${url}/archive/${pkgver}.tar.gz") +sha256sums=('be1b3833fb6ee53086a5ffc1f0203f7289313f7dcf15060f47bef38a490e1c54') + +build() { + cp -r "${_realname}-${pkgver}" "python-build-${MSYSTEM}" && cd "python-build-${MSYSTEM}" + + ${MINGW_PREFIX}/bin/python -m build --wheel --skip-dependency-check --no-isolation +} + +package() { + cd "${srcdir}/python-build-${MSYSTEM}" + + MSYS2_ARG_CONV_EXCL="--prefix=" \ + ${MINGW_PREFIX}/bin/python -m installer --prefix=${MINGW_PREFIX} \ + --destdir="${pkgdir}" dist/*.whl + + install -Dm644 LICENSE "${pkgdir}${MINGW_PREFIX}/share/licenses/python-${_realname}/LICENSE" +}