dev-python/mw2fcitx: add 0.15.1, drop 0.14.2

This commit is contained in:
blackteahamburger authored and 梁永祥 committed 2024-08-28 19:13:11 +08:00
1 parent 6fccdd77df
commit 830d6d0e2f
4 files changed
+75 -47

No files matched your search

+2 -2
View File
@@ -1,2 +1,2 @@
DIST mw2fcitx-0.14.2.gh.tar.gz 21604 BLAKE2B ea767a1a17726aa454af6d28132c9d75d5a61d324b854c85dc5b8aaa78292831bbd40e9012e90b836ad68c25d13d914ec40359362e4971987258af30dcda352c SHA512 520a71d4d916a88b32be4f50a433159facaeff11237885081e9f8efa4439c61747a59b11f06aee3887dbcefccd7680bba9145a2254d86a5e3f750af50cb693c5
DIST titles-0.14.2.20240809.txt 3398282 BLAKE2B e79568c66f3079d6e661be30e4bf7cbc0368ea5441470e14caca7992effa234101100e509f9473faa934a8793e63c567e54255487a21674d798a3761d65dbdb4 SHA512 3bcce30a0cc159c51dec6cbc181b1a271db0f2bd291a0243923ca698bbbba3ae8567ae6c532f6bf51dec0112f3620077c2e930e5caf890bfbfde19371cce772a
DIST mw2fcitx-0.15.1.tar.gz 12226 BLAKE2B cba5befef0058ac43cb656ec194c4a4d226e0df0e7aff0267265a3d616c0d2f6f1247619dc1b33e2dcb3334fb60427ebf05f5af2c85e76066cfa17a709b250cc SHA512 6679b331a211a380fb02bf313f47cda13dd22bcddd87a469b8193b7a79a3354a2a0b622b5b0dec23c140ebf68c13863a82155a5b00635a810eb99d10d3f28b19
DIST titles-20240809.txt 3398282 BLAKE2B e79568c66f3079d6e661be30e4bf7cbc0368ea5441470e14caca7992effa234101100e509f9473faa934a8793e63c567e54255487a21674d798a3761d65dbdb4 SHA512 3bcce30a0cc159c51dec6cbc181b1a271db0f2bd291a0243923ca698bbbba3ae8567ae6c532f6bf51dec0112f3620077c2e930e5caf890bfbfde19371cce772a
@@ -0,0 +1,35 @@
--- a/tests/cli/conf_one.py
+++ b/tests/cli/conf_one.py
@@ -2,7 +2,7 @@
exports = {
"source": {
- "api_path": "https://zh.wikipedia.org/w/api.php",
+ "file_path": ["titles.txt"],
"kwargs": {
"title_limit": 50,
"output": "titles.txt"
--- a/tests/cli/conf_single_generator.py
+++ b/tests/cli/conf_single_generator.py
@@ -2,7 +2,7 @@
exports = {
"source": {
- "api_path": "https://zh.wikipedia.org/w/api.php",
+ "file_path": ["titles.txt"],
"kwargs": {
"title_limit": 50,
"output": "titles.txt"
--- a/tests/lib/test_zhwiki.py
+++ b/tests/lib/test_zhwiki.py
@@ -3,8 +3,8 @@
def test_pipeline_basic():
- pipeline = MWFPipeline("https://zh.wikipedia.org/w/api.php")
- pipeline.fetch_titles(title_limit=50)
+ pipeline = MWFPipeline()
+ pipeline.load_titles_from_file("titles.txt")
pipeline.convert_to_words(moegirl_tweaks)
pipeline.export_words()
pipeline.generate_dict(generator="rime")
@@ -1,45 +0,0 @@
# Copyright 2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
DISTUTILS_USE_PEP517=poetry
DISTUTILS_SINGLE_IMPL=1
PYTHON_COMPAT=( python3_{10..13} )
inherit distutils-r1 pypi
DESCRIPTION="Build fcitx5 libraries from MediaWiki sites"
HOMEPAGE="
https://github.com/outloudvi/mw2fcitx
https://pypi.org/project/mw2fcitx
"
GIT_COMMIT=d8a382453f312046d16e25c6e247085bb02c8fb3
DICTV="20240809"
SRC_URI="
https://github.com/outloudvi/mw2fcitx/archive/${GIT_COMMIT}.tar.gz -> ${P}.gh.tar.gz
test? ( https://github.com/outloudvi/mw2fcitx/releases/download/${DICTV}/titles.txt -> titles-${PV}.${DICTV}.txt )
"
S="${WORKDIR}/mw2fcitx-${GIT_COMMIT}"
LICENSE="Unlicense"
SLOT="0"
KEYWORDS="~amd64"
RDEPEND="
>=app-i18n/opencc-1.1.7[python,${PYTHON_SINGLE_USEDEP}]
$(python_gen_cond_dep '>=dev-python/pypinyin-0.52.0[${PYTHON_USEDEP}]')
"
distutils_enable_tests pytest
src_prepare() {
distutils-r1_src_prepare
sed -i -e '/--cov/d' pytest.ini || die
# remove network access in test
sed -i -e '6c \ pipeline = MWFPipeline()' tests/lib/test_zhwiki.py || die
sed -i -e "7c \ pipeline.load_titles_from_file('${DISTDIR}/titles-${PV}.${DICTV}.txt')" \
tests/lib/test_zhwiki.py || die
}
@@ -0,0 +1,38 @@
# Copyright 2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
DISTUTILS_USE_PEP517=poetry
DISTUTILS_SINGLE_IMPL=1
PYTHON_COMPAT=( python3_{10..13} )
inherit distutils-r1 pypi
DESCRIPTION="Build fcitx5 libraries from MediaWiki sites"
HOMEPAGE="
https://github.com/outloudvi/mw2fcitx
https://pypi.org/project/mw2fcitx
"
DICTV="20240809"
SRC_URI+="
test? ( https://github.com/outloudvi/mw2fcitx/releases/download/${DICTV}/titles.txt -> titles-${DICTV}.txt )
"
LICENSE="Unlicense test? ( CC-BY-NC-SA-3.0 )"
SLOT="0"
KEYWORDS="~amd64"
RDEPEND="
>=app-i18n/opencc-1.1.7[python(-),${PYTHON_SINGLE_USEDEP}]
$(python_gen_cond_dep '>=dev-python/pypinyin-0.52.0[${PYTHON_USEDEP}]')
"
PATCHES=( "${FILESDIR}/${P}-test-no-network.patch" )
distutils_enable_tests pytest
src_unpack() {
default
use test && (cp "${DISTDIR}/titles-${DICTV}.txt" "${S}/titles.txt" || die)
}