summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'sci-libs/jiwer')
-rw-r--r--sci-libs/jiwer/Manifest1
-rw-r--r--sci-libs/jiwer/files/jiwer-3.0.1-tests.patch31
-rw-r--r--sci-libs/jiwer/jiwer-3.0.1.ebuild27
-rw-r--r--sci-libs/jiwer/metadata.xml12
4 files changed, 71 insertions, 0 deletions
diff --git a/sci-libs/jiwer/Manifest b/sci-libs/jiwer/Manifest
new file mode 100644
index 000000000000..00c0c8913dfa
--- /dev/null
+++ b/sci-libs/jiwer/Manifest
@@ -0,0 +1 @@
+DIST jiwer-3.0.1.gh.tar.gz 24015 BLAKE2B 634b1c7613a29ee492a108c09d3adeeec6ce975e3663505db5f02258f37f53933f0c6e12c9f0ab48274798bdc130e8ceb5d201b3090af3b9fcbba3ccf66a261e SHA512 9a455ec8687947531dc18f89aa898d7906e1e94f803fa05f3e4689b074e05a13b3b653cbc621c723c8d9776c0c787d7a4978eca3efb90c4abded7e7f6b13ca9e
diff --git a/sci-libs/jiwer/files/jiwer-3.0.1-tests.patch b/sci-libs/jiwer/files/jiwer-3.0.1-tests.patch
new file mode 100644
index 000000000000..cfd9530985a3
--- /dev/null
+++ b/sci-libs/jiwer/files/jiwer-3.0.1-tests.patch
@@ -0,0 +1,31 @@
+--- a/tests/test_speed.py 2023-05-14 18:22:53.206560417 +0200
++++ b/tests/test_speed.py 2023-05-14 18:24:35.611996479 +0200
+@@ -1,4 +1,6 @@
+ from jiwer import wer
++import pytest
++
+
+
+ def perform_computation(num_sentences):
+@@ -8,17 +10,21 @@
+ wer(truth, hypo)
+
+
++@pytest.mark.skip(reason="require pytest-benchmark")
+ def test_speed_n1(benchmark):
+ benchmark(perform_computation, 1)
+
+
++@pytest.mark.skip(reason="require pytest-benchmark")
+ def test_speed_n10(benchmark):
+ benchmark(perform_computation, 10)
+
+
++@pytest.mark.skip(reason="require pytest-benchmark")
+ def test_speed_n100(benchmark):
+ benchmark(perform_computation, 100)
+
+
++@pytest.mark.skip(reason="require pytest-benchmark")
+ def test_speed_n1000(benchmark):
+ benchmark(perform_computation, 1000)
diff --git a/sci-libs/jiwer/jiwer-3.0.1.ebuild b/sci-libs/jiwer/jiwer-3.0.1.ebuild
new file mode 100644
index 000000000000..dcf61747a15a
--- /dev/null
+++ b/sci-libs/jiwer/jiwer-3.0.1.ebuild
@@ -0,0 +1,27 @@
+# Copyright 2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DISTUTILS_USE_PEP517=poetry
+PYTHON_COMPAT=( python3_{9..11} )
+inherit distutils-r1
+
+DESCRIPTION="Evaluate an automatic speech recognition system"
+HOMEPAGE="
+ https://github.com/jitsi/jiwer
+ https://pypi.org/project/jiwer/
+"
+SRC_URI="https://github.com/jitsi/${PN}/archive/refs/tags/v${PV}.tar.gz
+ -> ${P}.gh.tar.gz"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64"
+BDEPEND="test? (
+ dev-python/rapidfuzz[${PYTHON_USEDEP}]
+)"
+
+distutils_enable_tests pytest
+
+PATCHES=( "${FILESDIR}"/${P}-tests.patch )
diff --git a/sci-libs/jiwer/metadata.xml b/sci-libs/jiwer/metadata.xml
new file mode 100644
index 000000000000..183cb49efbc4
--- /dev/null
+++ b/sci-libs/jiwer/metadata.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>tupone@gentoo.org</email>
+ <name>Tupone Alfredo</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="pypi">jiwer</remote-id>
+ <remote-id type="github">jitsi/jiwer</remote-id>
+ </upstream>
+</pkgmetadata>