summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2022-05-10 01:50:49 +0000
committerSam James <sam@gentoo.org>2022-05-10 02:25:19 +0000
commit489decfd0f3129a69e06c4dbf3f3e91dba0f467e (patch)
tree55d0ac81533ada8a1df1ec9fe09b8c932fe23370
parentdev-python/redis-py: add 4.3.1 (diff)
downloadgentoo-489decfd0f3129a69e06c4dbf3f3e91dba0f467e.tar.gz
gentoo-489decfd0f3129a69e06c4dbf3f3e91dba0f467e.tar.bz2
gentoo-489decfd0f3129a69e06c4dbf3f3e91dba0f467e.zip
dev-python/translate-toolkit: add 3.6.1
Signed-off-by: Sam James <sam@gentoo.org>
-rw-r--r--dev-python/translate-toolkit/Manifest1
-rw-r--r--dev-python/translate-toolkit/translate-toolkit-3.6.1.ebuild103
2 files changed, 104 insertions, 0 deletions
diff --git a/dev-python/translate-toolkit/Manifest b/dev-python/translate-toolkit/Manifest
index 0c6f793cc181..eeeb851c7633 100644
--- a/dev-python/translate-toolkit/Manifest
+++ b/dev-python/translate-toolkit/Manifest
@@ -1 +1,2 @@
DIST translate-3.6.0.gh.tar.gz 1150765 BLAKE2B 0b69d21782d8d6b3ae322b480ad2205e577d87a3a9448f8a428f666d3d141063ad06f83eaa38f5d5903cc4263bbdcf261523fef57111c1ba705b640835c11416 SHA512 3ce371cb688dcfa656676fdc3ca920d76088fad67dbfb112511a0439250913e1f4587df681752bf1b288b9c4af3e4ebd11b8f8db51670f0fe14e9db68d7917f7
+DIST translate-3.6.1.gh.tar.gz 1151674 BLAKE2B df730fe08f0f52c41acec8429adfaae7691a2776032106acfa4f14dad65d38cf3e3ee5288b992f4aa481e12e6bb8ae42aedff9da007c5396df7a4d45d5a879cd SHA512 4fb433ce9b39a53ab0c9a809a5dc509a678f06907a6279835b077740a5b39991e42db372953c3c51d39d9a9e5754a3d6747a87b53b3594f2a93aac8760083078
diff --git a/dev-python/translate-toolkit/translate-toolkit-3.6.1.ebuild b/dev-python/translate-toolkit/translate-toolkit-3.6.1.ebuild
new file mode 100644
index 000000000000..c9ba581f8597
--- /dev/null
+++ b/dev-python/translate-toolkit/translate-toolkit-3.6.1.ebuild
@@ -0,0 +1,103 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{8..10} )
+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"
+SRC_URI="
+ https://github.com/translate/translate/archive/refs/tags/${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"
+
+BDEPEND="
+ >=dev-python/six-1.11.0[${PYTHON_USEDEP}]
+"
+RDEPEND="${BDEPEND}
+ !dev-python/pydiff
+ app-text/iso-codes
+ >=dev-python/chardet-3.0.4[${PYTHON_USEDEP}]
+ dev-python/cheroot[${PYTHON_USEDEP}]
+ >=dev-python/lxml-4.3.1[${PYTHON_USEDEP}]
+ >=dev-python/pycountry-19.8.18[${PYTHON_USEDEP}]
+ >=dev-python/python-levenshtein-0.12.0[${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_sphinx docs \
+ dev-python/sphinx-bootstrap-theme
+distutils_enable_tests pytest
+
+PATCHES=(
+ "${FILESDIR}"/translate-toolkit-3.3.0-no-install-docs.patch
+)
+
+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'
+ )
+ 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
+}