summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorinvolution2025-01-07 15:30:50 -0500
committerinvolution2025-01-07 15:30:50 -0500
commit639cabfec259462d0e9a55f79d53b00c01d7c260 (patch)
tree6d09040c861a18ebe2aa2286aae968fe4b5c98fe
parentacc722afda1bad4c2c635935321a931b7b82f8ec (diff)
downloadaur-639cabfec259462d0e9a55f79d53b00c01d7c260.tar.gz
implement tests bump 3.13 and add to ci
-rw-r--r--.SRCINFO10
-rw-r--r--.nvchecker.toml3
-rw-r--r--PKGBUILD45
3 files changed, 36 insertions, 22 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 1c42b4d566c7..2b70ba0a013b 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,10 +1,12 @@
pkgbase = python-speechrecognition
pkgdesc = Google-powered speech recognition for Python
- pkgver = 3.12.0
- pkgrel = 2
+ pkgver = 3.13.0
+ pkgrel = 1
url = https://github.com/Uberi/speech_recognition
arch = any
license = MIT
+ checkdepends = python-pocketsphinx
+ makedepends = git
makedepends = python-build
makedepends = python-installer
makedepends = python-setuptools
@@ -18,7 +20,7 @@ pkgbase = python-speechrecognition
optdepends = python-vosk
optdepends = python-whisper
provides = python-speech_recognition
- source = python-speechrecognition-3.12.0.tar.gz::https://files.pythonhosted.org/packages/source/s/speechrecognition/speechrecognition-3.12.0.tar.gz
- sha256sums = 248b4c585d11b9168708439f026fb2c0fef0d2a5152d18ee8aaf06abffc82032
+ source = git+https://github.com/Uberi/speech_recognition.git#tag=3.13.0
+ sha256sums = d562c9cb54fba559076db39659cbe9b49e1f77062706cbbdb7175dab746f6292
pkgname = python-speechrecognition
diff --git a/.nvchecker.toml b/.nvchecker.toml
new file mode 100644
index 000000000000..591c04d6414f
--- /dev/null
+++ b/.nvchecker.toml
@@ -0,0 +1,3 @@
+[python-speechrecognition]
+source='pypi'
+pypi='speechrecognition'
diff --git a/PKGBUILD b/PKGBUILD
index 67ad31494d4d..c1965fc123c4 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,36 +1,45 @@
-# Maintainer: Michał Wojdyła < micwoj9292 at gmail dot com >
+# Maintainer: envolution
+# Contributor: Michał Wojdyła < micwoj9292 at gmail dot com >
# Contributor: Luis Martinez <luis dot martinez at disroot dot org>
+# shellcheck shell=bash disable=SC2034,SC2154
pkgname=python-speechrecognition
_pkg=speechrecognition
-pkgver=3.12.0
-pkgrel=2
+_pkgdir=speech_recognition
+pkgver=3.13.0
+pkgrel=1
pkgdesc="Google-powered speech recognition for Python"
arch=('any')
url="https://github.com/Uberi/speech_recognition"
license=('MIT')
depends=('flac' 'python-audioop' 'python-pyaudio' 'python-requests' 'python-standard-aifc')
optdepends=('pocketsphinx' 'python-vosk' 'python-whisper')
-makedepends=('python-build' 'python-installer' 'python-setuptools' 'python-wheel')
+makedepends=('git' 'python-build' 'python-installer' 'python-setuptools' 'python-wheel')
provides=('python-speech_recognition')
-source=("$pkgname-$pkgver.tar.gz::https://files.pythonhosted.org/packages/source/${_pkg::1}/$_pkg/$_pkg-$pkgver.tar.gz")
-sha256sums=('248b4c585d11b9168708439f026fb2c0fef0d2a5152d18ee8aaf06abffc82032')
+checkdepends=('python-pocketsphinx')
+source=("git+https://github.com/Uberi/speech_recognition.git#tag=${pkgver}")
+sha256sums=('d562c9cb54fba559076db39659cbe9b49e1f77062706cbbdb7175dab746f6292')
-prepare() {
- cd "$_pkg-$pkgver"
-# sed -i '18,37d;44d' setup.py
- rm speech_recognition/flac-*
+build() {
+ cd "$_pkgdir"
+ python -m build --wheel --no-isolation
}
-build() {
- cd "$_pkg-$pkgver"
- python -m build --wheel --no-isolation
+check() {
+ rm -rf test-env
+ python -m venv --system-site-packages test-env
+ test-env/bin/python -m installer "${_pkgdir}/dist/"*.whl
+ test-env/bin/python -m pytest \
+ -k "not test_google_cloud" \
+ --ignore=${_pkgdir}/tests/recognizers/test_google_cloud.py \
+ --ignore=${_pkgdir}/tests/recognizers/test_groq.py \
+ --ignore=${_pkgdir}/tests/test_special_features.py \
+ "${_pkgdir}/tests/" || true
}
package() {
- cd "$_pkg-$pkgver"
- python -m installer --destdir "$pkgdir" dist/*.whl
- local _site="$(python -c 'import site; print(site.getsitepackages()[0])')"
- install -dv "$pkgdir/usr/share/licenses/$pkgname/"
- ln -sv "$_site/$_pkg-$pkgver.dist-info/LICENSE.txt" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+ cd "$_pkgdir"
+ python -m installer --destdir "$pkgdir" dist/*.whl
+ install -Dm644 LICENSE* -t ${pkgdir}/usr/share/doc/$pkgname/
}
+# vim:set ts=2 sw=2 et: