diff options
Diffstat (limited to 'dev-python/translate-toolkit')
-rw-r--r-- | dev-python/translate-toolkit/Manifest | 2 | ||||
-rw-r--r-- | dev-python/translate-toolkit/translate-toolkit-3.8.4.ebuild | 98 |
2 files changed, 100 insertions, 0 deletions
diff --git a/dev-python/translate-toolkit/Manifest b/dev-python/translate-toolkit/Manifest index 6e50b7b4fd75..2122c2f657fd 100644 --- a/dev-python/translate-toolkit/Manifest +++ b/dev-python/translate-toolkit/Manifest @@ -1,3 +1,5 @@ DIST translate-3.8.3.gh.tar.gz 1157587 BLAKE2B 4dc8ca9cb7f0040364ceeb6fae47d9189642e8383fb1c808713aeb82452690ffe5957c63d649994eae486efaa51aee664fa7b0bb199036d869a87d7a0bf21806 SHA512 ad5a814cc03ed0d41aeac60bea72133fcd47470ab254849647d674bc00b71f2afe1c0956891decc6906fafbd07c4e3d5efcf4212c0e449f3fb3fb4fdbee9aab8 +DIST translate-3.8.4.gh.tar.gz 1158012 BLAKE2B 37d26792b9382d318e359db3c7087cbf71a444c4f76c9b3fcec9311820ade1d3f346d7ff4b22983d6a49e0afd47b4277d2c0222e2982d56f52fcf7f655bd349b SHA512 28d452d9da1d1b400e88a30b9f997dd70ab2db5e6ae33a7882203bf6b59abf6bd315bee97c9f01de536dc752fde93429bb65aeb7b6386482193a68a472bd2e9a EBUILD translate-toolkit-3.8.3.ebuild 2436 BLAKE2B c84859e2882719d6557918f1580a4a027ea586ae062f877baef0559cac641b59281abadfe9a1f888899778fa76babdb301e73796dff6fe03cea09161848bea2c SHA512 9f50a862bf8ff4129ff974c3ab1d4e4c3863585393aaf35fc1056c63fb6fda24485458e240abda227f5d995427e4796913b30e63b6bae5459f903c50f40384cf +EBUILD translate-toolkit-3.8.4.ebuild 2439 BLAKE2B 76a7b69c12540271aaa50ee950a971c40dd6db7f9dd48b286d8ed17a133adffca050a77e16a2021bd0f5bf4de1fbc43576b12d54d19d4e1f6e6b8eed89387abb SHA512 48a037441d0f33e5f019dd406a13bf5da32dbc3ea25ce2e10bacbe2a422bd6b35feea56c684cfe9d747e6f711a94b8b00298763dbd8ba37b452c43ef5d529ab3 MISC metadata.xml 756 BLAKE2B 06f64f258d362954f99f7e9eee241eb3dddc6b00b9069df2ad977d28b5cf06f9c8ee2246ee5958600b5ac86297968d7aaced6b6420dca4ed507c441c58c61ca9 SHA512 80374c40513ca450f97e3930929c1450e7438ea15830e60937952a6fccfd999675f2ca2056c5aa4e287ba256c6ec08a09d8f7adb8b2c5af8ca0cd595f34acd85 diff --git a/dev-python/translate-toolkit/translate-toolkit-3.8.4.ebuild b/dev-python/translate-toolkit/translate-toolkit-3.8.4.ebuild new file mode 100644 index 000000000000..5628bcd1f693 --- /dev/null +++ b/dev-python/translate-toolkit/translate-toolkit-3.8.4.ebuild @@ -0,0 +1,98 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{9..11} ) +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-4.3.1[${PYTHON_USEDEP}] + >=dev-python/pycountry-19.8.18[${PYTHON_USEDEP}] + >=dev-python/pyparsing-3[${PYTHON_USEDEP}] + dev-python/ruamel-yaml[${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}] ) +" + +distutils_enable_tests pytest + +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' + # Apparently a change in line wrapping x_x + translate/storage/test_cpo.py::TestCPOFile::test_wrap_gettext + ) + local EPYTEST_IGNORE=( + # unpackaged fluent.* + translate/storage/test_fluent.py + ) + + if ! use ini; then + EPYTEST_IGNORE+=( + translate/convert/test_ini2po.py + translate/convert/test_po2ini.py + ) + fi + + if ! use subtitles; then + EPYTEST_IGNORE+=( + translate/storage/test_subtitles.py + ) + fi + + # translate/storage/test_mo.py needs 'pocompile' + distutils_install_for_testing + epytest +} + +python_install_all() { + distutils-r1_python_install_all + + 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 + + python_optimize +} |