ayaports/backports/py3-httptools/APKBUILD

32 lines
1,022 B
Text

# Contributor: Michał Polański <michal@polanski.me>
# Maintainer: Michał Polański <michal@polanski.me>
pkgname=py3-httptools
pkgver=0.5.0
pkgrel=3
pkgdesc="Fast HTTP parser"
url="https://github.com/MagicStack/httptools"
license="MIT"
arch="all !riscv64" # llhttp
depends="python3"
makedepends="py3-setuptools python3-dev cython http-parser-dev llhttp-dev"
checkdepends="py3-pytest py3-aiohttp py3-openssl py3-psutil"
subpackages="$pkgname-pyc"
source="$pkgname-$pkgver.tar.gz::https://github.com/MagicStack/httptools/archive/v$pkgver/py3-httptools-$pkgver.tar.gz"
builddir="$srcdir/httptools-$pkgver"
build() {
python3 setup.py build build_ext --inplace \
--use-system-http-parser --use-system-llhttp
}
check() {
PYTHONPATH="$(echo "$PWD"/build/lib.linux-*)" pytest
}
package() {
python3 setup.py install --root="$pkgdir" --skip-build
}
sha512sums="
f7db490d74fb0b8d57c452c7f5c252a506c2173a80349317016a05e5c343fc203ffe038453fedd14963b46dd5b6efdf46f6173855d10145fa1404bbb6beccb42 py3-httptools-0.5.0.tar.gz
"