backports/py3-a2wsgi: new aport

This commit is contained in:
Antoine Martin 2023-05-05 09:39:08 -04:00
parent 77be30d03a
commit 19c5e119a0
Signed by: forge
GPG key ID: D62A472A4AA7D541
2 changed files with 55 additions and 0 deletions

View file

@ -0,0 +1,43 @@
# Maintainer: Patrycja Rosa <alpine@ptrcnull.me>
pkgname=py3-a2wsgi
pkgver=1.7.0
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"
source="https://github.com/abersheeran/a2wsgi/archive/refs/tags/v$pkgver/a2wsgi-$pkgver.tar.gz
pdm-backend.patch
"
builddir="$srcdir/a2wsgi-$pkgver"
case "$CARCH" in
# test suite blocked by py3-httpx
armhf|ppc64le) options="!check" ;;
esac
build() {
gpep517 build-wheel \
--wheel-dir dist \
--output-fd 3 3>&1 >&2
}
check() {
python3 -m venv --clear --without-pip --system-site-packages testenv
testenv/bin/python3 -m installer dist/*.whl
testenv/bin/python3 -m pytest
}
package() {
python3 -m installer -d "$pkgdir" \
dist/*.whl
}
sha512sums="
010776279c7f2ceaa580395c226788ea72e14726cde8e3adb8304e9bd887d55736c5985ebd8055dfd48a15632543497e10163040ba677ffeddbd3d2e02e24440 a2wsgi-1.7.0.tar.gz
bb60783941b7308a82a87b058c571067ad4c26f3b605e717c87dca9f52f9457a1e72ba9ca56556ea3fb63789cbdcca46a67bfadf2bd4873d713ffbcfd3190a9c pdm-backend.patch
"

View file

@ -0,0 +1,12 @@
diff --git a/pyproject.toml b/pyproject.toml
index 2e67514..c7f3b40 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -35,5 +35,5 @@ benchmark = [
includes = ["a2wsgi"]
[build-system]
-build-backend = "pdm.pep517.api"
-requires = ["pdm-pep517>=1.0.0"]
+build-backend = "pdm.backend"
+requires = ["pdm-backend>=1.0.0"]