aboutsummaryrefslogtreecommitdiffstats
path: root/community/py3-regex/APKBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'community/py3-regex/APKBUILD')
-rw-r--r--community/py3-regex/APKBUILD44
1 files changed, 32 insertions, 12 deletions
diff --git a/community/py3-regex/APKBUILD b/community/py3-regex/APKBUILD
index f84d99abbc2..571ece4250c 100644
--- a/community/py3-regex/APKBUILD
+++ b/community/py3-regex/APKBUILD
@@ -1,24 +1,44 @@
# Contributor: Rasmus Thomsen <oss@cogitri.dev>
-# Maintainer: Rasmus Thomsen <oss@cogitri.dev>
+# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=py3-regex
-pkgver=2021.4.4
-pkgrel=0
+pkgver=2023.12.26
+pkgrel=1
pkgdesc="More featureful implementation of the 're' module"
-url="https://bitbucket.org/mrabarnett/mrab-regex"
+url="https://github.com/mrabarnett/mrab-regex"
arch="all"
-license="CNRI-Python"
+license="Apache-2.0"
depends="python3"
-makedepends="python3-dev py3-setuptools"
-options="!check" # no tests
-source="https://files.pythonhosted.org/packages/source/r/regex/regex-$pkgver.tar.gz"
-builddir="$srcdir/regex-$pkgver"
+makedepends="
+ py3-gpep517
+ py3-setuptools
+ py3-wheel
+ python3-dev
+ "
+subpackages="$pkgname-pyc"
+source="$pkgname-$pkgver.tar.gz::https://github.com/mrabarnett/mrab-regex/archive/refs/tags/$pkgver.tar.gz"
+builddir="$srcdir/mrab-regex-$pkgver"
+options="!check" # fails to run
build() {
- python3 setup.py 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
+ cd .testenv
+ bin/python3 ../regex_3/test_regex.py
}
package() {
- python3 setup.py install --prefix=/usr --root="$pkgdir"
+ python3 -m installer -d "$pkgdir" \
+ .dist/*.whl
+
+ rm -v "$pkgdir"/usr/lib/python3*/site-packages/regex/test_regex.py
}
-sha512sums="2eff9867639f16ad7894997f399262d653a9ef0bb4e8d40bd977e5c55625cf57b4bb593f84504009a0b3cd50b3876d1938c71fd733c0ad1a076de32b6b4b33b9 regex-2021.4.4.tar.gz"
+sha512sums="
+b4aa92457d5ed2030338bec5696b6e8c3561f470c37c3c4127ef4108687d8242be1140e5278df22b6978bc799811f6153186dfda152bc952e34feafdc71cdf49 py3-regex-2023.12.26.tar.gz
+"