python-starlette: New package

This commit is contained in:
Konstantin Podsvirov
2023-05-11 23:27:36 +03:00
parent 4800d9ff85
commit c9cb7cf2ae

View File

@@ -0,0 +1,42 @@
# Maintainer: Konstantin Podsvirov <konstantin@podsvirov.pro>
_realname=starlette
pkgbase=mingw-w64-python-${_realname}
pkgname=("${MINGW_PACKAGE_PREFIX}-python-${_realname}")
pkgver=0.26.1
pkgrel=1
pkgdesc="The little ASGI framework that shines (mingw-w64)"
arch=('any')
mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64' 'clangarm64' 'clang32')
url='https://github.com/encode/starlette'
license=('BSD')
depends=("${MINGW_PACKAGE_PREFIX}-python"
"${MINGW_PACKAGE_PREFIX}-python-anyio"
"${MINGW_PACKAGE_PREFIX}-python-typing_extensions")
makedepends=("${MINGW_PACKAGE_PREFIX}-python-build"
"${MINGW_PACKAGE_PREFIX}-python-installer"
"${MINGW_PACKAGE_PREFIX}-python-hatchling"
"${MINGW_PACKAGE_PREFIX}-python-wheel")
optdepends=("${MINGW_PACKAGE_PREFIX}-python-itsdangerous: for session middleware support"
"${MINGW_PACKAGE_PREFIX}-python-jinja: for jinja templates")
source=("${_realname}-${pkgver}.tar.gz::$url/archive/$pkgver.tar.gz")
sha256sums=('e876e96551cacc546031fb28b9d51ba5c1e723bf74345f072307362dbe808842')
build() {
msg "Python build for ${MSYSTEM}"
cd "${srcdir}"
cp -r "${_realname}-${pkgver}" "python-build-${MSYSTEM}" && cd "python-build-${MSYSTEM}"
${MINGW_PREFIX}/bin/python -m build --wheel --skip-dependency-check --no-isolation
}
package() {
msg "Python install for ${MSYSTEM}"
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.md "${pkgdir}${MINGW_PREFIX}/share/licenses/python-${_realname}/LICENSE.md"
}