aports/testing/py3-us/APKBUILD
2024-08-06 14:32:32 +02:00

43 lines
1.3 KiB
Plaintext

# Contributor: Fabian Affolter <fabian@affolter-engineering.ch>
# Maintainer: Fabian Affolter <fabian@affolter-engineering.ch>
pkgname=py3-us
_pkgname=us
pkgver=3.1.1
pkgrel=2
pkgdesc="US state meta information and other fun stuff"
url="https://github.com/unitedstates/python-us"
arch="noarch"
license="BSD-3-Clause"
depends="py3-jellyfish python3"
makedepends="py3-setuptools py3-gpep517"
checkdepends="py3-pytest py3-tz"
subpackages="$pkgname-pyc"
source="https://files.pythonhosted.org/packages/source/${_pkgname:0:1}/$_pkgname/$_pkgname-$pkgver.tar.gz
fix-requires.patch"
builddir="$srcdir"/$_pkgname-$pkgver
replaces="py-us" # for backwards compatibility
provides="py-us=$pkgver-r$pkgrel" # for 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="
c74aebc6aa49afa8dc36d23b6d67c0d26294b8416d35b8c9b2e833b6c7fbb2d6f7d8983d56b7edaa129b94887c132043ebf02f3642e1a340f6fae889ee3d0e54 us-3.1.1.tar.gz
7178b90935c71692db8a90e235a05a0d23b5fafe22449713abb85dc24c2345ea1bab990532314632d5c86351666bf5ce687c59b9ec31355bbe17fdbd65d7e914 fix-requires.patch
"