diff options
Diffstat (limited to 'community/py3-speechrecognition/APKBUILD')
-rw-r--r-- | community/py3-speechrecognition/APKBUILD | 44 |
1 files changed, 35 insertions, 9 deletions
diff --git a/community/py3-speechrecognition/APKBUILD b/community/py3-speechrecognition/APKBUILD index 0984ad6f291..02ed08f1912 100644 --- a/community/py3-speechrecognition/APKBUILD +++ b/community/py3-speechrecognition/APKBUILD @@ -1,16 +1,31 @@ # Contributor: Bart Ribbers <bribbers@disroot.org> # Maintainer: Bart Ribbers <bribbers@disroot.org> pkgname=py3-speechrecognition -pkgver=3.8.1 +pkgver=3.10.3 pkgrel=1 pkgdesc="Library for performing speech recognition, with support for several engines and APIs, online and offline" url="https://github.com/Uberi/speech_recognition/" -arch="noarch" +# s390x blocked by failing tests +arch="noarch !s390x" license="BSD-3-Clause AND GPL-2.0-only" -depends="python3 py3-pyaudio flac" -makedepends="py3-setuptools" -source="https://github.com/Uberi/speech_recognition/archive/$pkgver/speech_recognition-$pkgver.tar.gz" -options="!check" # Requires user interaction and a mic +depends=" + flac + py3-pyaudio + py3-requests + py3-typing-extensions + " +makedepends=" + py3-gpep517 + py3-setuptools + py3-wheel + " +checkdepends=" + py3-numpy + py3-pocketsphinx + py3-pytest + " +subpackages="$pkgname-pyc" +source="$pkgname-$pkgver.tar.gz::https://github.com/Uberi/speech_recognition/archive/refs/tags/$pkgver.tar.gz" builddir="$srcdir/speech_recognition-$pkgver" prepare() { @@ -21,11 +36,22 @@ prepare() { } 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 + .testenv/bin/python3 -m pytest -k 'not test_whisper and not test_google and not test_sphinx_english and not test_sphinx_keywords' } package() { - python3 setup.py install --prefix=/usr --root="$pkgdir" + python3 -m installer -d "$pkgdir" \ + .dist/*.whl } -sha512sums="555a4e7b2f0cb4f7adac8a0d7f1bc4071564a021a40b5ae75ea61e4b6a3b17b974672f0350ef06150bfa1711307e4af24603c8fc78aaf8a51fc82e73413815ac speech_recognition-3.8.1.tar.gz" +sha512sums=" +09bb7539df466d6452d187482dd8683f2f157f407eb962d41f8e7b6b16bb654d022d7ce79aea68d314bf10ad0a2a9b8dacff57b1bf5de9a83a3b5477d238263f py3-speechrecognition-3.10.3.tar.gz +" |