aboutsummaryrefslogtreecommitdiffstats
path: root/community/py3-cmudict/APKBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'community/py3-cmudict/APKBUILD')
-rw-r--r--community/py3-cmudict/APKBUILD34
1 files changed, 25 insertions, 9 deletions
diff --git a/community/py3-cmudict/APKBUILD b/community/py3-cmudict/APKBUILD
index 9007f5dda03..a4ffd7cf115 100644
--- a/community/py3-cmudict/APKBUILD
+++ b/community/py3-cmudict/APKBUILD
@@ -1,30 +1,46 @@
# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: Bart Ribbers <bribbers@disroot.org>
pkgname=py3-cmudict
-pkgver=1.0.0
-pkgrel=0
+pkgver=1.0.13
+pkgrel=2
pkgdesc="A versioned Python wrapper package for The CMU Pronouncing Dictionary data files"
url="https://github.com/prosegrinder/python-cmudict"
arch="noarch"
license="GPL-3.0-only"
depends="python3"
-makedepends="py3-setuptools"
+makedepends="py3-gpep517 py3-installer py3-poetry-core"
checkdepends="py3-pytest"
-source="https://pypi.python.org/packages/source/c/cmudict/cmudict-$pkgver.tar.gz"
-builddir="$srcdir/cmudict-$pkgver"
+_cmudict_rev="697cd8957daa07d2cb89e0cee922de6218afde81"
+subpackages="$pkgname-pyc"
+source="$pkgname-$pkgver.tar.gz::https://github.com/prosegrinder/python-cmudict/archive/refs/tags/v$pkgver.tar.gz
+ $pkgname-$pkgver-data.tar.gz::https://github.com/cmusphinx/cmudict/archive/$_cmudict_rev.tar.gz
+ "
+builddir="$srcdir/python-cmudict-$pkgver"
+
+prepare() {
+ default_prepare
+
+ mv "$srcdir"/cmudict-$_cmudict_rev/* src/cmudict/data/
+}
build() {
- python3 setup.py build
+ gpep517 build-wheel \
+ --wheel-dir .dist \
+ --output-fd 3 3>&1 >&2
}
check() {
- PYTHONPATH="$PWD/build/lib" pytest
+ python3 -m venv --clear --without-pip --system-site-packages .testenv
+ .testenv/bin/python3 -m installer .dist/cmudict*.whl
+ .testenv/bin/python3 -m pytest
}
package() {
- python3 setup.py install --prefix=/usr --root="$pkgdir"
+ python3 -m installer -d "$pkgdir" \
+ .dist/cmudict*.whl
}
sha512sums="
-2e0f3f920e174635f906939f373594eab12617bae143c54c9c9011d999e5c60ce5cbac39c3d0b6de87501df8ee66eca86e0bba4db42071c492a79445747feb11 cmudict-1.0.0.tar.gz
+6b867c748142f2d6f2c52910ed5da68721298d2b78768893ad206dc8f190a5fb8f3ba0ec9e967f056d31dc3b323b0df0f390493a3d21a91cc4ddc6153eece8fd py3-cmudict-1.0.13.tar.gz
+20d3b2465e9045f1eee164a0040f1075d82ba6ed97204fbfc226eaf44b5abb9f20c6c6b06e8e78b4b35d5a55f472b3a3755742474fe1c521f367b87756f8ce4a py3-cmudict-1.0.13-data.tar.gz
"