ayaports/backports/py3-a2wsgi/APKBUILD

41 lines
1.1 KiB
Text
Raw Normal View History

2023-05-05 13:39:08 +00:00
# Maintainer: Patrycja Rosa <alpine@ptrcnull.me>
pkgname=py3-a2wsgi
2023-11-24 18:10:54 +00:00
pkgver=1.8.0
2023-05-05 13:39:08 +00:00
pkgrel=0
pkgdesc="Convert WSGI app to ASGI app or ASGI app to WSGI app"
url="https://github.com/abersheeran/a2wsgi"
arch="noarch"
license="Apache-2.0"
depends="python3"
makedepends="py3-gpep517 py3-pdm-backend py3-wheel"
checkdepends="py3-pytest py3-httpx py3-pytest-asyncio"
subpackages="$pkgname-pyc"
2023-11-24 18:10:54 +00:00
source="https://github.com/abersheeran/a2wsgi/archive/refs/tags/v$pkgver/a2wsgi-$pkgver.tar.gz"
2023-05-05 13:39:08 +00:00
builddir="$srcdir/a2wsgi-$pkgver"
case "$CARCH" in
# test suite blocked by py3-httpx
armhf|ppc64le) options="!check" ;;
esac
build() {
gpep517 build-wheel \
2023-11-24 18:10:54 +00:00
--wheel-dir .dist \
2023-05-05 13:39:08 +00:00
--output-fd 3 3>&1 >&2
}
check() {
2023-11-24 18:10:54 +00:00
python3 -m venv --clear --without-pip --system-site-packages .testenv
.testenv/bin/python3 -m installer .dist/*.whl
.testenv/bin/python3 -m pytest
2023-05-05 13:39:08 +00:00
}
package() {
python3 -m installer -d "$pkgdir" \
2023-11-24 18:10:54 +00:00
.dist/*.whl
2023-05-05 13:39:08 +00:00
}
sha512sums="
2023-11-24 18:10:54 +00:00
0c3a45ea279e2c104a52a7b70780de7a055312e857b712b534020a2c9f43b62b5d60639b5ce721c5e3717f0315c58496134813772613135b22111905df10d5ad a2wsgi-1.8.0.tar.gz
2023-05-05 13:39:08 +00:00
"