dev-python/translate-toolkit: Bump to 3.20.0

Signed-off-by: Michał Górny <mgorny@gentoo.org>
This commit is contained in:
Michał Górny
2026-09-12 06:36:17 +02:00
parent 3d7d70ee63
commit 5b747904fd
2 changed files with 125 additions and 0 deletions

View File

@@ -1,3 +1,4 @@
DIST translate-3.19.17.gh.tar.gz 1419163 BLAKE2B 6dbfd25d4a8ca2e22be4da2c6f4e1e081ac2902d5911498d0e4d13fd182dff3f338cfe36a5ef93e4ad9c276b443f84bac6b44b12cdae1ac07a46830dec36aecc SHA512 8f28c6d312e6a6a9aef3b177981222ee8f80751b1ea0075f0ad7ec7774840822a50d806d9fbbcb21ed95d4dfdf491a8added8ef7bba1166665160613d5e08444
DIST translate-3.19.18.gh.tar.gz 1430779 BLAKE2B cd8276ede35ac17df538688c5bc4d9135799f651dafe56daaecae78a2369fe5782c5c4d9d26e81e5a666c81eace1e68fa747a0f7b3e17941d49565ce540db95e SHA512 83e05ff2a200fde531d390d36da5ed8915a8aa61184c6fe924223fbb75c5e27eecce29af1252c89c3aee393fe8fdc68f88b6d7df4f97881406eb8ab204f9c1b6
DIST translate-3.19.19.gh.tar.gz 1436103 BLAKE2B 05d4e3e9b39e363af629ef352eaeaf0da6668ed2372b4a1f69c8373f421a8d868fc7f75947f4b41df99e60147c76871ae2f47c936e3c14d80418dfd87c741d25 SHA512 f9eeb572b8003ade578a5bf67eb8c482e200088da5df99f72751d5bf2a58a5094bd2602cff778d4565c48bb3de31f2a0381bf527403a8b73e1079384bf50bccf
DIST translate-3.20.0.gh.tar.gz 1460876 BLAKE2B f5bc82a77db2f99980e5bc778963f8e242629b88a8e0f39af740fc802b3fc855912635695443536d4df16fa670d7abe264904a2ba672c53487c22ab63584cddd SHA512 355302b2862d223a8c237ebf067339d456baabd1fe6e0c2c62e2ffca05218316052aa36d298c6d21a77f9b773469a34c8358319ee0f99a517284d5a601f9c4c5

View File

@@ -0,0 +1,124 @@
# Copyright 1999-2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
DISTUTILS_USE_PEP517=setuptools
PYTHON_COMPAT=( python3_{12..14} )
PYTHON_REQ_USE="sqlite"
inherit distutils-r1
MY_P=translate-${PV}
DESCRIPTION="Toolkit to convert between many translation formats"
HOMEPAGE="
https://github.com/translate/translate/
https://pypi.org/project/translate-toolkit/
"
SRC_URI="
https://github.com/translate/translate/archive/${PV}.tar.gz
-> ${MY_P}.gh.tar.gz
"
S="${WORKDIR}"/${MY_P}
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64 ~arm64 ~x86"
IUSE="+html +ical +ini +subtitles +yaml"
RDEPEND="
app-text/iso-codes
>=dev-python/chardet-3.0.4[${PYTHON_USEDEP}]
dev-python/cheroot[${PYTHON_USEDEP}]
>=dev-python/levenshtein-0.12.0[${PYTHON_USEDEP}]
>=dev-python/lxml-5.2.0[${PYTHON_USEDEP}]
>=dev-python/mistletoe-1.1.0[${PYTHON_USEDEP}]
>=dev-python/pyparsing-3[${PYTHON_USEDEP}]
dev-python/ruamel-yaml[${PYTHON_USEDEP}]
dev-python/tomlkit[${PYTHON_USEDEP}]
>=dev-python/unicode-segmentation-rs-0.2.0[${PYTHON_USEDEP}]
>=dev-python/wcwidth-0.2.14[${PYTHON_USEDEP}]
sys-devel/gettext
html? ( dev-python/utidylib[${PYTHON_USEDEP}] )
ical? ( dev-python/vobject[${PYTHON_USEDEP}] )
ini? ( >=dev-python/iniparse-0.5[${PYTHON_USEDEP}] )
subtitles? ( media-video/gaupol[${PYTHON_USEDEP}] )
yaml? ( dev-python/pyyaml[${PYTHON_USEDEP}] )
"
BDEPEND="
test? (
dev-python/phply[${PYTHON_USEDEP}]
)
"
EPYTEST_PLUGINS=( syrupy )
EPYTEST_XDIST=1
distutils_enable_tests pytest
src_prepare() {
distutils-r1_src_prepare
# strip unnecessary pins
sed -i -e 's:,<[0-9.]*::' pyproject.toml || die
}
src_test() {
# unfortunately, this bad quality package doesn't support XDG_DATA_DIRS
# correctly, so we need to reassemble all data files in a single directory
local -x XDG_DATA_HOME=${T}/share
cp -r translate/share "${T}/" || die
cp -r "${ESYSROOT}"/usr/share/gaupol "${XDG_DATA_HOME}"/ || die
distutils-r1_src_test
}
python_test() {
local EPYTEST_DESELECT=(
# Fails with network-sandbox (and even with it off but w/ softer fail)
'tests/xliff_conformance/test_xliff_conformance.py::test_open_office_to_xliff'
'tests/xliff_conformance/test_xliff_conformance.py::test_po_to_xliff'
)
local EPYTEST_IGNORE=(
# unpackaged fluent.*
tests/translate/convert/test_fluent2po.py
tests/translate/storage/test_fluent.py
tests/translate/storage/test_identity_editing.py
# changes directory and does not change it back, sigh
tests/odf_xliff/test_odf_xliff.py
)
if ! has_version "dev-python/iniparse[${PYTHON_USEDEP}]"; then
EPYTEST_IGNORE+=(
translate/convert/test_ini2po.py
translate/convert/test_po2ini.py
)
fi
if ! has_version "media-video/gaupol[${PYTHON_USEDEP}]"; then
EPYTEST_IGNORE+=(
translate/storage/test_subtitles.py
)
fi
epytest
}
python_install_all() {
distutils-r1_python_install_all
insinto /usr
doins -r translate/share
if ! use html; then
rm "${ED}"/usr/bin/{html2po,po2html} || die
fi
if ! use ical; then
rm "${ED}"/usr/bin/{ical2po,po2ical} || die
fi
if ! use ini; then
rm "${ED}"/usr/bin/{ini2po,po2ini} || die
fi
if ! use subtitles; then
rm "${ED}"/usr/bin/{sub2po,po2sub} || die
fi
}