aports/testing/py3-intervals/APKBUILD
2024-08-30 23:26:11 +02:00

42 lines
1.4 KiB
Text

# Contributor: Fabian Affolter <fabian@affolter-engineering.ch>
# Maintainer: Fabian Affolter <fabian@affolter-engineering.ch>
pkgname=py3-intervals
_pkgname=intervals
pkgver=0.9.2
pkgrel=5
pkgdesc="Python module for handling intervals (ranges of comparable objects)"
url="https://github.com/kvesteri/intervals"
arch="noarch"
license="BSD-3-Clause"
depends="py3-infinity"
makedepends="py3-setuptools py3-gpep517"
checkdepends="py3-pytest"
subpackages="$pkgname-pyc"
source="https://files.pythonhosted.org/packages/source/${_pkgname:0:1}/$_pkgname/$_pkgname-$pkgver.tar.gz
pytest5.patch"
builddir="$srcdir"/$_pkgname-$pkgver
replaces="py-intervals" # Backwards compatibility
provides="py-intervals=$pkgver-r$pkgrel" # Backwards compatibility
build() {
gpep517 build-wheel \
--wheel-dir .dist \
--output-fd 3 3>&1 >&2
}
check() {
python3 -m venv --clear --without-pip --system-site-packages .testenv
gpep517 install-wheel --destdir .testenv --prefix '' .dist/*.whl
.testenv/bin/python3 -m pytest
}
package() {
gpep517 install-wheel --destdir "$pkgdir" \
.dist/*.whl
}
sha512sums="
40da5f7630bc84dbd47196e7e84f94701730b4f2ee71294edfaecfc9187f5c05333fc79502c315d5962c29c9c2a50c8e471980c98764d7c0581d33383a487e4a intervals-0.9.2.tar.gz
af545bec7d8157259197e045396d69ac1791b5e0420056fca69bea444cceacaa208ae568fd80792f614e1c775611ea22c48521bdd47dbdd976a699c150835f96 pytest5.patch
"