Gentoo Archives: gentoo-commits

From: "Michał Górny" <mgorny@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-python/translate-toolkit/
Date: Sun, 06 Nov 2022 07:59:29
Message-Id: 1667721551.af19b42966a3b804eb516bef3277fd83ee6eb1ea.mgorny@gentoo
1 commit: af19b42966a3b804eb516bef3277fd83ee6eb1ea
2 Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
3 AuthorDate: Sun Nov 6 06:38:50 2022 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Sun Nov 6 07:59:11 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=af19b429
7
8 dev-python/translate-toolkit: Bump to 3.7.4
9
10 Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
11
12 dev-python/translate-toolkit/Manifest | 1 +
13 .../translate-toolkit-3.7.4.ebuild | 98 ++++++++++++++++++++++
14 2 files changed, 99 insertions(+)
15
16 diff --git a/dev-python/translate-toolkit/Manifest b/dev-python/translate-toolkit/Manifest
17 index b5b86e49e01c..e65e208b0852 100644
18 --- a/dev-python/translate-toolkit/Manifest
19 +++ b/dev-python/translate-toolkit/Manifest
20 @@ -1 +1,2 @@
21 DIST translate-3.7.3.gh.tar.gz 1153916 BLAKE2B 476b8ca3fd277f56cc73d8fc8f5adbf9ddb442b404c586627cc91af228ae08bbb87310219c910701de4938cb9977b386d0ed7b503901369a1ac5069664ebbd25 SHA512 ee339300e798fc043b1ac5455366e96bd5dab08306855a84cdcfd6d5176560366c3538810e94b7477704a5d1ed218e5c85f735979f48cd33242791ce1ad39c3b
22 +DIST translate-3.7.4.gh.tar.gz 1153973 BLAKE2B 55fd5d8f8d9c53d3aabaaece54272650fc412c778cbbc86d83b391946aebb627c7ad3dd8e10d5bc0bd6380f8396fd5c373a47d9323365886a50299f392238b4c SHA512 0eb93712de9fd7324e0e99cd31996694356452df51ac9f081f27f7bf15391e9630d4b042e2af4ca5b06d43d92f35cfd8806f18ad936c293bd08bdd465b09789e
23
24 diff --git a/dev-python/translate-toolkit/translate-toolkit-3.7.4.ebuild b/dev-python/translate-toolkit/translate-toolkit-3.7.4.ebuild
25 new file mode 100644
26 index 000000000000..51838ec8f6b4
27 --- /dev/null
28 +++ b/dev-python/translate-toolkit/translate-toolkit-3.7.4.ebuild
29 @@ -0,0 +1,98 @@
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 + app-text/iso-codes
59 + >=dev-python/chardet-3.0.4[${PYTHON_USEDEP}]
60 + dev-python/cheroot[${PYTHON_USEDEP}]
61 + >=dev-python/Levenshtein-0.12.0[${PYTHON_USEDEP}]
62 + >=dev-python/lxml-4.3.1[${PYTHON_USEDEP}]
63 + >=dev-python/pycountry-19.8.18[${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 +
77 +distutils_enable_tests pytest
78 +
79 +python_test() {
80 + local EPYTEST_DESELECT=(
81 + # Fails with network-sandbox (and even with it off but w/ softer fail)
82 + 'tests/xliff_conformance/test_xliff_conformance.py::test_open_office_to_xliff'
83 + 'tests/xliff_conformance/test_xliff_conformance.py::test_po_to_xliff'
84 + # Apparently a change in line wrapping x_x
85 + translate/storage/test_cpo.py::TestCPOFile::test_wrap_gettext
86 + )
87 + local EPYTEST_IGNORE=(
88 + # unpackaged fluent.*
89 + translate/storage/test_fluent.py
90 + )
91 +
92 + if ! use ini; then
93 + EPYTEST_IGNORE+=(
94 + translate/convert/test_ini2po.py
95 + translate/convert/test_po2ini.py
96 + )
97 + fi
98 +
99 + if ! use subtitles; then
100 + EPYTEST_IGNORE+=(
101 + translate/storage/test_subtitles.py
102 + )
103 + fi
104 +
105 + # translate/storage/test_mo.py needs 'pocompile'
106 + distutils_install_for_testing
107 + epytest
108 +}
109 +
110 +python_install_all() {
111 + distutils-r1_python_install_all
112 +
113 + if ! use html; then
114 + rm "${ED}"/usr/bin/{html2po,po2html} || die
115 + fi
116 + if ! use ical; then
117 + rm "${ED}"/usr/bin/{ical2po,po2ical} || die
118 + fi
119 + if ! use ini; then
120 + rm "${ED}"/usr/bin/{ini2po,po2ini} || die
121 + fi
122 + if ! use subtitles; then
123 + rm "${ED}"/usr/bin/{sub2po,po2sub} || die
124 + fi
125 +
126 + python_optimize
127 +}