Gentoo Archives: gentoo-commits

From: Arthur Zamarin <arthurzam@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-python/translate-toolkit/
Date: Fri, 14 Jan 2022 18:28:36
Message-Id: 1642184905.894a12544d4d60b28b4b1c5f303312cf718f1438.arthurzam@gentoo
1 commit: 894a12544d4d60b28b4b1c5f303312cf718f1438
2 Author: Arthur Zamarin <arthurzam <AT> gentoo <DOT> org>
3 AuthorDate: Fri Jan 14 18:24:14 2022 +0000
4 Commit: Arthur Zamarin <arthurzam <AT> gentoo <DOT> org>
5 CommitDate: Fri Jan 14 18:28:25 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=894a1254
7
8 dev-python/translate-toolkit: add 3.5.3
9
10 Signed-off-by: Arthur Zamarin <arthurzam <AT> gentoo.org>
11
12 dev-python/translate-toolkit/Manifest | 1 +
13 .../translate-toolkit-3.5.3.ebuild | 100 +++++++++++++++++++++
14 2 files changed, 101 insertions(+)
15
16 diff --git a/dev-python/translate-toolkit/Manifest b/dev-python/translate-toolkit/Manifest
17 index 071546ca44bf..43c821f914bc 100644
18 --- a/dev-python/translate-toolkit/Manifest
19 +++ b/dev-python/translate-toolkit/Manifest
20 @@ -1,2 +1,3 @@
21 DIST translate-3.5.1.gh.tar.gz 1147898 BLAKE2B f9fc96065727e0016e61fd581690dafc3021471de9ccc9012b223c24778669b984e0bf0ab5f83a910af0e543b0e4793afa110c5b2ced890a257f72512bcaf58d SHA512 2125e3ab019a6b721327d6979482562d5984df28b04aaa69d11e44b6a7396ee387f79d8242a20a84157f9b62457839b52599eb0fe13abac33c9a312a84d55d30
22 DIST translate-3.5.2.gh.tar.gz 1147847 BLAKE2B 6ca8458975018c3645f3fcead99812b5f91c2a3e621060c1cf9599ecd2fdee8914ae1d70b70f8bc76f5d941f43e69e55555a35a5792d0c8c9d9e06458e670617 SHA512 e04c195d0f33aaf9c2368955c4c399be3c23702ce0fcb41705f727b65e129b652b5637a9b56ad2879f836548b77c266382ce41220a23aa9058828ee2f2ba1b3e
23 +DIST translate-3.5.3.gh.tar.gz 1148120 BLAKE2B e848a089281ab7f1e17b28beefbea50245025bc3db0616bab3f5e1d288b2aacc0df636dca11f17481af863a4845594ecff9fc66dbc33d403a8fe0575ff90581d SHA512 3ad1bc4742e4d91dbdd8b4662597d07c792e306426dac42b6f8720cefdf1f4cf502d587941df3e6a93dd5648a1b92f5951bd1b5e79a41e5476f1b9ca06624656
24
25 diff --git a/dev-python/translate-toolkit/translate-toolkit-3.5.3.ebuild b/dev-python/translate-toolkit/translate-toolkit-3.5.3.ebuild
26 new file mode 100644
27 index 000000000000..768d499ebbb3
28 --- /dev/null
29 +++ b/dev-python/translate-toolkit/translate-toolkit-3.5.3.ebuild
30 @@ -0,0 +1,100 @@
31 +# Copyright 1999-2022 Gentoo Authors
32 +# Distributed under the terms of the GNU General Public License v2
33 +
34 +EAPI=8
35 +
36 +PYTHON_COMPAT=( python3_{8..10} )
37 +PYTHON_REQ_USE="sqlite"
38 +
39 +inherit distutils-r1
40 +
41 +MY_P=translate-${PV}
42 +DESCRIPTION="Toolkit to convert between many translation formats"
43 +HOMEPAGE="https://github.com/translate/translate"
44 +SRC_URI="
45 + https://github.com/translate/translate/archive/refs/tags/${PV}.tar.gz
46 + -> ${MY_P}.gh.tar.gz"
47 +S="${WORKDIR}/${MY_P}"
48 +
49 +LICENSE="GPL-2"
50 +SLOT="0"
51 +KEYWORDS="~amd64 ~arm64 ~x86"
52 +IUSE="+html +ical +ini +subtitles +yaml"
53 +REQUIRED_USE="${PYTHON_REQUIRED_USE}"
54 +
55 +BDEPEND=">=dev-python/six-1.11.0[${PYTHON_USEDEP}]"
56 +RDEPEND="${BDEPEND}
57 + !dev-python/pydiff
58 + app-text/iso-codes
59 + >=dev-python/chardet-3.0.4[${PYTHON_USEDEP}]
60 + dev-python/cheroot[${PYTHON_USEDEP}]
61 + >=dev-python/lxml-4.3.1[${PYTHON_USEDEP}]
62 + >=dev-python/pycountry-19.8.18[${PYTHON_USEDEP}]
63 + >=dev-python/python-levenshtein-0.12.0[${PYTHON_USEDEP}]
64 + >=dev-python/pyparsing-3[${PYTHON_USEDEP}]
65 + dev-python/ruamel-yaml[${PYTHON_USEDEP}]
66 + sys-devel/gettext
67 + html? ( dev-python/utidylib[${PYTHON_USEDEP}] )
68 + ical? ( dev-python/vobject[${PYTHON_USEDEP}] )
69 + ini? ( >=dev-python/iniparse-0.5[${PYTHON_USEDEP}] )
70 + subtitles? ( media-video/gaupol[${PYTHON_USEDEP}] )
71 + yaml? ( dev-python/pyyaml[${PYTHON_USEDEP}] )
72 +"
73 +BDEPEND+="
74 + test? ( dev-python/phply[${PYTHON_USEDEP}] )"
75 +
76 +distutils_enable_sphinx docs \
77 + dev-python/sphinx-bootstrap-theme
78 +distutils_enable_tests pytest
79 +
80 +PATCHES=(
81 + "${FILESDIR}"/translate-toolkit-3.3.0-no-install-docs.patch
82 +)
83 +
84 +python_test() {
85 + local EPYTEST_DESELECT=(
86 + # Fails with network-sandbox (and even with it off but w/ softer fail)
87 + 'tests/xliff_conformance/test_xliff_conformance.py::test_open_office_to_xliff'
88 + 'tests/xliff_conformance/test_xliff_conformance.py::test_po_to_xliff'
89 + )
90 + local EPYTEST_IGNORE=(
91 + # unpackaged fluent.*
92 + translate/storage/test_fluent.py
93 + )
94 +
95 + if ! use ini; then
96 + EPYTEST_IGNORE+=(
97 + translate/convert/test_ini2po.py
98 + translate/convert/test_po2ini.py
99 + )
100 + fi
101 +
102 + if ! use subtitles; then
103 + EPYTEST_IGNORE+=(
104 + translate/storage/test_subtitles.py
105 + )
106 + fi
107 +
108 + # translate/storage/test_mo.py needs 'pocompile'
109 + distutils_install_for_testing
110 + epytest
111 +}
112 +
113 +python_install_all() {
114 + distutils-r1_python_install_all
115 +
116 + if ! use html; then
117 + rm "${ED}"/usr/bin/{html2po,po2html} || die
118 + fi
119 + if ! use ical; then
120 + rm "${ED}"/usr/bin/{ical2po,po2ical} || die
121 + fi
122 + if ! use ini; then
123 + rm "${ED}"/usr/bin/{ini2po,po2ini} || die
124 + fi
125 + if ! use subtitles; then
126 + rm "${ED}"/usr/bin/{sub2po,po2sub} || die
127 + fi
128 +
129 + python_optimize
130 +}