python-findpython: New package

This commit is contained in:
Konstantin Podsvirov
2023-07-02 18:16:32 +03:00
parent 643c9ad71e
commit 4263c27699

View File

@@ -0,0 +1,37 @@
# Contributor: Konstantin Podsvirov <konstantin@podsvirov.pro>
_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"
}