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