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, 09 Sep 2022 07:23:23
Message-Id: 1662708174.cb6c3c5d50ba278071e61417292023f9f40529f8.arthurzam@gentoo
1 commit: cb6c3c5d50ba278071e61417292023f9f40529f8
2 Author: Arthur Zamarin <arthurzam <AT> gentoo <DOT> org>
3 AuthorDate: Fri Sep 9 06:28:33 2022 +0000
4 Commit: Arthur Zamarin <arthurzam <AT> gentoo <DOT> org>
5 CommitDate: Fri Sep 9 07:22:54 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cb6c3c5d
7
8 dev-python/translate-toolkit: add 3.7.3
9
10 Signed-off-by: Arthur Zamarin <arthurzam <AT> gentoo.org>
11
12 dev-python/translate-toolkit/Manifest | 1 +
13 .../translate-toolkit-3.7.3.ebuild | 99 ++++++++++++++++++++++
14 2 files changed, 100 insertions(+)
15
16 diff --git a/dev-python/translate-toolkit/Manifest b/dev-python/translate-toolkit/Manifest
17 index 1eeb10d1599c..3bd6ad67f8ec 100644
18 --- a/dev-python/translate-toolkit/Manifest
19 +++ b/dev-python/translate-toolkit/Manifest
20 @@ -1 +1,2 @@
21 DIST translate-3.7.2.gh.tar.gz 1153306 BLAKE2B 986c531004cb0ee0a58a940043377ee047e13b0f32c6fda5ab80cc7fca96d18b45f2cd3e112d47f177cd06a7e99580777c6591df969a8237bcb9fe7a52b1d4fd SHA512 28d774ff670c92dedee5d98d7d33f21d32ed4b7afd6a8281fcf7abb39470e11a6c0d9c121576aa2be10edf18929c74b2cfc36b70984d66d432cfa5e337b9556c
22 +DIST translate-3.7.3.gh.tar.gz 1153916 BLAKE2B 476b8ca3fd277f56cc73d8fc8f5adbf9ddb442b404c586627cc91af228ae08bbb87310219c910701de4938cb9977b386d0ed7b503901369a1ac5069664ebbd25 SHA512 ee339300e798fc043b1ac5455366e96bd5dab08306855a84cdcfd6d5176560366c3538810e94b7477704a5d1ed218e5c85f735979f48cd33242791ce1ad39c3b
23
24 diff --git a/dev-python/translate-toolkit/translate-toolkit-3.7.3.ebuild b/dev-python/translate-toolkit/translate-toolkit-3.7.3.ebuild
25 new file mode 100644
26 index 000000000000..7c5cbdaf61ca
27 --- /dev/null
28 +++ b/dev-python/translate-toolkit/translate-toolkit-3.7.3.ebuild
29 @@ -0,0 +1,99 @@
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="
43 + https://github.com/translate/translate/
44 + https://pypi.org/project/translate-toolkit/
45 +"
46 +SRC_URI="
47 + https://github.com/translate/translate/archive/${PV}.tar.gz
48 + -> ${MY_P}.gh.tar.gz
49 +"
50 +S="${WORKDIR}"/${MY_P}
51 +
52 +LICENSE="GPL-2"
53 +SLOT="0"
54 +KEYWORDS="~amd64 ~arm64 ~x86"
55 +IUSE="+html +ical +ini +subtitles +yaml"
56 +
57 +RDEPEND="
58 + !dev-python/pydiff
59 + app-text/iso-codes
60 + >=dev-python/chardet-3.0.4[${PYTHON_USEDEP}]
61 + dev-python/cheroot[${PYTHON_USEDEP}]
62 + >=dev-python/lxml-4.3.1[${PYTHON_USEDEP}]
63 + >=dev-python/pycountry-19.8.18[${PYTHON_USEDEP}]
64 + >=dev-python/python-levenshtein-0.12.0[${PYTHON_USEDEP}]
65 + >=dev-python/pyparsing-3[${PYTHON_USEDEP}]
66 + dev-python/ruamel-yaml[${PYTHON_USEDEP}]
67 + sys-devel/gettext
68 + html? ( dev-python/utidylib[${PYTHON_USEDEP}] )
69 + ical? ( dev-python/vobject[${PYTHON_USEDEP}] )
70 + ini? ( >=dev-python/iniparse-0.5[${PYTHON_USEDEP}] )
71 + subtitles? ( media-video/gaupol[${PYTHON_USEDEP}] )
72 + yaml? ( dev-python/pyyaml[${PYTHON_USEDEP}] )
73 +"
74 +BDEPEND="
75 + test? ( dev-python/phply[${PYTHON_USEDEP}] )
76 +"
77 +
78 +distutils_enable_sphinx docs \
79 + dev-python/sphinx-bootstrap-theme
80 +distutils_enable_tests pytest
81 +
82 +python_test() {
83 + local EPYTEST_DESELECT=(
84 + # Fails with network-sandbox (and even with it off but w/ softer fail)
85 + 'tests/xliff_conformance/test_xliff_conformance.py::test_open_office_to_xliff'
86 + 'tests/xliff_conformance/test_xliff_conformance.py::test_po_to_xliff'
87 + )
88 + local EPYTEST_IGNORE=(
89 + # unpackaged fluent.*
90 + translate/storage/test_fluent.py
91 + )
92 +
93 + if ! use ini; then
94 + EPYTEST_IGNORE+=(
95 + translate/convert/test_ini2po.py
96 + translate/convert/test_po2ini.py
97 + )
98 + fi
99 +
100 + if ! use subtitles; then
101 + EPYTEST_IGNORE+=(
102 + translate/storage/test_subtitles.py
103 + )
104 + fi
105 +
106 + # translate/storage/test_mo.py needs 'pocompile'
107 + distutils_install_for_testing
108 + epytest
109 +}
110 +
111 +python_install_all() {
112 + distutils-r1_python_install_all
113 +
114 + if ! use html; then
115 + rm "${ED}"/usr/bin/{html2po,po2html} || die
116 + fi
117 + if ! use ical; then
118 + rm "${ED}"/usr/bin/{ical2po,po2ical} || die
119 + fi
120 + if ! use ini; then
121 + rm "${ED}"/usr/bin/{ini2po,po2ini} || die
122 + fi
123 + if ! use subtitles; then
124 + rm "${ED}"/usr/bin/{sub2po,po2sub} || die
125 + fi
126 +
127 + python_optimize
128 +}