summaryrefslogtreecommitdiff
path: root/user/py3-random2/APKBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'user/py3-random2/APKBUILD')
-rw-r--r--user/py3-random2/APKBUILD13
1 files changed, 11 insertions, 2 deletions
diff --git a/user/py3-random2/APKBUILD b/user/py3-random2/APKBUILD
index da7838e39..776c0889d 100644
--- a/user/py3-random2/APKBUILD
+++ b/user/py3-random2/APKBUILD
@@ -5,9 +5,9 @@ _pkgname=random2
_p="${_pkgname#?}"
_p="${_pkgname%"$_p"}"
pkgver=1.0.1
-pkgrel=0
+pkgrel=1
pkgdesc="A Python module implementing Python 2's RNG"
-url="https://pypi.python.org/pypi/random2"
+url="https://pypi.org/project/random2/"
arch="noarch"
license="Python-2.0"
depends="python3"
@@ -15,6 +15,15 @@ makedepends="python3-dev"
source="$pkgname-$pkgver.zip::https://files.pythonhosted.org/packages/source/$_p/$_pkgname/$_pkgname-$pkgver.zip"
builddir="$srcdir/$_pkgname-$pkgver"
+prepare() {
+ default_prepare
+
+ # Remove a test that is invalid as of python 3.9
+ # Taken from Fedora .spec
+ # https://src.fedoraproject.org/rpms/python-random2/blob/rawhide/f/python-random2.spec
+ sed -i '/self\.gen\.getrandbits, 0/d' src/tests.py
+}
+
build() {
python3 setup.py build
}