aboutsummaryrefslogtreecommitdiffstats
path: root/community/py3-tldextract/APKBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'community/py3-tldextract/APKBUILD')
-rw-r--r--community/py3-tldextract/APKBUILD27
1 files changed, 23 insertions, 4 deletions
diff --git a/community/py3-tldextract/APKBUILD b/community/py3-tldextract/APKBUILD
index 7bbd225e8b..acb90ca004 100644
--- a/community/py3-tldextract/APKBUILD
+++ b/community/py3-tldextract/APKBUILD
@@ -3,20 +3,39 @@
pkgname=py3-tldextract
_pyname=tldextract
pkgver=3.1.0
-pkgrel=0
+pkgrel=1
pkgdesc="Accurately separate the TLD from the registered domain and subdomains of a URL"
url="https://github.com/john-kurkowski/tldextract"
arch="noarch"
license="BSD-3-Clause"
-depends="python3"
+depends="
+ python3
+ py3-idna
+ py3-requests
+ py3-requests-file
+ py3-filelock
+ "
makedepends="py3-setuptools"
checkdepends="py3-pytest py3-responses"
source="$_pyname-$pkgver.tar.gz::https://github.com/john-kurkowski/tldextract/archive/$pkgver.tar.gz"
builddir="$srcdir/$_pyname-$pkgver"
-build() {
- export SETUPTOOLS_SCM_PRETEND_VERSION="$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
}