diff options
Diffstat (limited to 'community/py3-tldextract/APKBUILD')
-rw-r--r-- | community/py3-tldextract/APKBUILD | 38 |
1 files changed, 16 insertions, 22 deletions
diff --git a/community/py3-tldextract/APKBUILD b/community/py3-tldextract/APKBUILD index acb90ca004b..d0dec6c6505 100644 --- a/community/py3-tldextract/APKBUILD +++ b/community/py3-tldextract/APKBUILD @@ -2,7 +2,7 @@ # Maintainer: Galen Abell <galen@galenabell.com> pkgname=py3-tldextract _pyname=tldextract -pkgver=3.1.0 +pkgver=5.1.2 pkgrel=1 pkgdesc="Accurately separate the TLD from the registered domain and subdomains of a URL" url="https://github.com/john-kurkowski/tldextract" @@ -15,35 +15,29 @@ depends=" py3-requests-file py3-filelock " -makedepends="py3-setuptools" -checkdepends="py3-pytest py3-responses" +makedepends="py3-gpep517 py3-setuptools py3-setuptools_scm py3-wheel" +checkdepends="py3-pytest py3-pytest-mock py3-responses" +subpackages="$pkgname-pyc" source="$_pyname-$pkgver.tar.gz::https://github.com/john-kurkowski/tldextract/archive/$pkgver.tar.gz" builddir="$srcdir/$_pyname-$pkgver" -prepare() { - default_prepare - - # Generate _version.py ourselves since we don't use setuptools_scm - cat <<- EOF > tldextract/_version.py - # coding: utf-8 - version = '$pkgver' - version_tuple = (${pkgver//./, }) - EOF - - sed -e '/setuptools_scm/d' \ - -e "s/use_scm_version.*/version='$pkgver',/" \ - -i setup.py -} - build() { - python3 setup.py build + export SETUPTOOLS_SCM_PRETEND_VERSION=$pkgver + gpep517 build-wheel \ + --wheel-dir .dist \ + --output-fd 3 3>&1 >&2 } check() { - python3 setup.py test + python3 -m venv --clear --system-site-packages .testenv + .testenv/bin/python3 -m installer .dist/*.whl + # Ignore release test as it depends on py3-syrupy in edge (and it's just a release script anyways). + .testenv/bin/python3 -m pytest --ignore tests/test_release.py } package() { - python3 setup.py install --prefix=/usr --root="$pkgdir" + python3 -m installer -d "$pkgdir" .dist/*.whl } -sha512sums="a7d0491a4dc2332f416ff13f0defcc2d0d2b4c842ee02da6b926e993a157593a9fdc4523aa3481a6bc01cd4d72b63073311580a39994d95c4cda89c53df02855 tldextract-3.1.0.tar.gz" +sha512sums=" +0297087b7d825126131955316dc27e5f7e8f4124e107fd8ecadbd56d634e76ff6a9d70a23e117f7a5016badd6f599da84700681c9adfbfc927ae685cbeb3efb9 tldextract-5.1.2.tar.gz +" |