testing/py3-schema: build with gpep517

This commit is contained in:
ptrcnull 2024-08-05 22:36:36 +02:00
parent 3be708cc07
commit 84c46964e3

View File

@ -2,28 +2,33 @@
# Maintainer: Sasha Gerrand <alpine-pkgs@sgerrand.com>
pkgname=py3-schema
pkgver=0.7.5
pkgrel=3
pkgrel=4
pkgdesc="Schema is a library for validating Python data structures"
url="https://github.com/keleshev/schema"
arch="noarch"
license="MIT"
depends="python3"
checkdepends="py3-pytest py3-mock"
makedepends="py3-setuptools"
makedepends="py3-setuptools py3-gpep517"
subpackages="$pkgname-pyc"
source="$pkgname-$pkgver.tar.gz::https://github.com/keleshev/schema/archive/v$pkgver.tar.gz"
builddir="$srcdir/schema-$pkgver"
build() {
python3 setup.py build
gpep517 build-wheel \
--wheel-dir .dist \
--output-fd 3 3>&1 >&2
}
check() {
python3 -m pytest
python3 -m venv --clear --without-pip --system-site-packages .testenv
gpep517 install-wheel --destdir .testenv --prefix '' .dist/*.whl
.testenv/bin/python3 -m pytest
}
package() {
PYTHONPATH="$PWD" python3 setup.py install --skip-build --root="$pkgdir"
gpep517 install-wheel --destdir "$pkgdir" \
.dist/*.whl
}
sha512sums="