ilot/py3-django-countries: new aport

This commit is contained in:
Antoine Martin 2024-09-18 22:11:58 -04:00
parent 309c461e67
commit 47c5ff9e92
Signed by: ayakael
GPG key ID: D62A472A4AA7D541

View file

@ -0,0 +1,40 @@
# Contributor: Antoine Martin (ayakael) <dev@ayakael.net>
# Maintainer: Antoine Martin (ayakael) <dev@ayakael.net>
pkgname=py3-django-countries
#_pkgreal is used by apkbuild-pypi to find modules at PyPI
_pkgreal=django-countries
pkgver=7.6.1
pkgrel=0
pkgdesc="Provides a country field for Django models."
url="https://pypi.python.org/project/django-countries"
arch="noarch"
license="MIT"
depends="py3-django py3-asgiref py3-typing-extensions"
# missing py3-graphene
checkdepends="py3-pytest-django py3-pytest-cov py3-django-rest-framework"
makedepends="py3-setuptools py3-gpep517 py3-wheel"
source="$pkgname-$pkgver.tar.gz::https://github.com/SmileyChris/django-countries/archive/refs/tags/v$pkgver.tar.gz"
options="!check" # TODO
builddir="$srcdir/$_pkgreal-$pkgver"
subpackages="$pkgname-pyc"
build() {
gpep517 build-wheel \
--wheel-dir .dist \
--output-fd 3 3>&1 >&2
}
check() {
python3 -m venv --clear --without-pip --system-site-packages .testenv
.testenv/bin/python3 -m installer .dist/*.whl
.testenv/bin/python3 -m pytest -v
}
package() {
python3 -m installer -d "$pkgdir" \
.dist/*.whl
}
sha512sums="
53c7db02244aad196c141d1d04db5087c802d69d12de25e86fe0b2abdfb4ce9ed6ec84b6344c423dc6e7d2e57c2bb14a5324739c7cead54ec7d261e7e3fe6112 py3-django-countries-7.6.1.tar.gz
"