testing/py3-pysrt: build with gpep517

This commit is contained in:
ptrcnull 2024-08-08 20:10:58 +02:00
parent 74ace663ef
commit c5f9e7103e

View File

@ -3,13 +3,13 @@
pkgname=py3-pysrt
_pkgname=pysrt
pkgver=1.1.2
pkgrel=3
pkgrel=4
pkgdesc="Python parser for SubRip (srt) files"
url="https://github.com/byroot/pysrt"
arch="noarch"
license="GPL-3.0-only"
depends="python3 py3-chardet"
makedepends="py3-setuptools"
makedepends="py3-setuptools py3-gpep517"
checkdepends="py3-nose"
subpackages="$pkgname-pyc"
source="$pkgname-$pkgver.tar.gz::https://github.com/byroot/pysrt/archive/v$pkgver.tar.gz
@ -18,15 +18,20 @@ source="$pkgname-$pkgver.tar.gz::https://github.com/byroot/pysrt/archive/v$pkgve
builddir="$srcdir/$_pkgname-$pkgver"
build() {
python3 setup.py build
gpep517 build-wheel \
--wheel-dir .dist \
--output-fd 3 3>&1 >&2
}
check() {
nosetests
python3 -m venv --clear --without-pip --system-site-packages .testenv
gpep517 install-wheel --destdir .testenv --prefix '' .dist/*.whl
.testenv/bin/python3 -m nose
}
package() {
python3 setup.py install --skip-build --root="$pkgdir"
gpep517 install-wheel --destdir "$pkgdir" \
.dist/*.whl
}
sha512sums="