aboutsummaryrefslogtreecommitdiffstats
path: root/community/py3-dateutil/APKBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'community/py3-dateutil/APKBUILD')
-rw-r--r--community/py3-dateutil/APKBUILD17
1 files changed, 16 insertions, 1 deletions
diff --git a/community/py3-dateutil/APKBUILD b/community/py3-dateutil/APKBUILD
index c6c2865bbb..ee319bbd84 100644
--- a/community/py3-dateutil/APKBUILD
+++ b/community/py3-dateutil/APKBUILD
@@ -3,8 +3,9 @@
pkgname=py3-dateutil
_pkgname=python-dateutil
pkgver=2.8.1
-pkgrel=0
+pkgrel=3
pkgdesc="Python3 extensions for datetime module"
+options="!check" # Requires py3-freezegun for testsuite and vice-versa
url="https://dateutil.readthedocs.io"
arch="noarch"
license="Apache-2.0 AND BSD-3-Clause"
@@ -16,6 +17,20 @@ builddir="$srcdir/$_pkgname-$pkgver"
replaces="py-dateutil" # Backwards compatibility
provides="py-dateutil=$pkgver-r$pkgrel" # Backwards compatibility
+prepare() {
+ default_prepare
+
+ # Generate _version.py ourselves since we don't use setuptools_scm
+ cat <<- EOF >dateutil/_version.py
+ # coding: utf-8
+ version = '$pkgver'
+ version_tuple = (${pkgver//./, })
+ EOF
+
+ sed -e '/setuptools_scm/d' -i setup.cfg
+ sed -e "s/setup(/setup(\n version='$pkgver',/" -i setup.py
+}
+
build() {
python3 setup.py build
}