* [gentoo-commits] repo/gentoo:master commit in: dev-python/translate-toolkit/, dev-python/translate-toolkit/files/
@ 2021-01-04 9:45 Michał Górny
0 siblings, 0 replies; only message in thread
From: Michał Górny @ 2021-01-04 9:45 UTC (permalink / raw
To: gentoo-commits
commit: baf1a17988efb96e534681d887b7af114e8d1f1d
Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Mon Jan 4 09:01:21 2021 +0000
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Mon Jan 4 09:45:44 2021 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=baf1a179
dev-python/translate-toolkit: Bump to 3.3.0
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
dev-python/translate-toolkit/Manifest | 1 +
.../translate-toolkit-3.3.0-no-install-docs.patch | 25 ++++++
.../translate-toolkit-3.3.0.ebuild | 99 ++++++++++++++++++++++
3 files changed, 125 insertions(+)
diff --git a/dev-python/translate-toolkit/Manifest b/dev-python/translate-toolkit/Manifest
index f14204949a4..cc98eccc667 100644
--- a/dev-python/translate-toolkit/Manifest
+++ b/dev-python/translate-toolkit/Manifest
@@ -1 +1,2 @@
DIST translate-toolkit-3.2.0.tar.gz 6029254 BLAKE2B fe4c30e09fcba6755a928775f931f1027bb5678606e74aa435fd5803642ab39b8b55d763bb96dba6b1a957d6656cfca4ec6400b735afd8df7f2c1273ac173c89 SHA512 1045762a5c63cc2bc8459b61a85ef56e4f1d1f705d74646b8235169f22d8d5aa4ab5e3599af52a860d9e434df0fad3e98836b0c021bb0a9697b36a59edbfb6ec
+DIST translate-toolkit-3.3.0.tar.gz 6122607 BLAKE2B 77e4d4e37fa5fdd0a735b04ccef40769863134411476abe2852855970594f7a11cf06114831c196a744a5e76d50b1707b630a738213d0ded5f588ad98dcfd613 SHA512 3529e5301e8e1f0d89bbadff92cebd5d55ada29fe5eb8d611f604139239645dd6d110bf93180b18faf2ececafb675f2fc6dfbe30d7631ba606a7dfcd5d8f27ca
diff --git a/dev-python/translate-toolkit/files/translate-toolkit-3.3.0-no-install-docs.patch b/dev-python/translate-toolkit/files/translate-toolkit-3.3.0-no-install-docs.patch
new file mode 100644
index 00000000000..9d812c4f98f
--- /dev/null
+++ b/dev-python/translate-toolkit/files/translate-toolkit-3.3.0-no-install-docs.patch
@@ -0,0 +1,25 @@
+From 6271bfede35f22e8099261863d990eba3d26f989 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
+Date: Mon, 4 Jan 2021 10:33:29 +0100
+Subject: [PATCH] Do not install docs tree into site-packages
+
+---
+ setup.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/setup.py b/setup.py
+index 5fc3abf..80ce25d 100755
+--- a/setup.py
++++ b/setup.py
+@@ -513,7 +513,7 @@ def getdatafiles():
+ )
+
+ docfiles = []
+- for subdir in ["docs", "share"]:
++ for subdir in ["share"]:
+ docwalk = os.walk(subdir)
+ for docs in docwalk:
+ files = listfiles(docs[0])
+--
+2.30.0
+
diff --git a/dev-python/translate-toolkit/translate-toolkit-3.3.0.ebuild b/dev-python/translate-toolkit/translate-toolkit-3.3.0.ebuild
new file mode 100644
index 00000000000..e26208def25
--- /dev/null
+++ b/dev-python/translate-toolkit/translate-toolkit-3.3.0.ebuild
@@ -0,0 +1,99 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python3_{7,8,9} )
+PYTHON_REQ_USE="sqlite"
+DISTUTILS_USE_SETUPTOOLS=rdepend
+inherit distutils-r1
+
+DESCRIPTION="Toolkit to convert between many translation formats"
+HOMEPAGE="https://github.com/translate/translate"
+SRC_URI="https://github.com/translate/translate/releases/download/${PV}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~arm64 ~x86"
+IUSE="+html +ical +ini +subtitles +yaml"
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+
+DEPEND=">=dev-python/six-1.11.0[${PYTHON_USEDEP}]"
+RDEPEND="${DEPEND}
+ !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/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}] )
+"
+
+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 deselect=(
+ # Not packaging optional phply for now.
+ # Seems inactive upstream.
+ --ignore translate/convert/test_php2po.py
+ --ignore translate/convert/test_po2php.py
+ --ignore translate/storage/test_php.py
+ --deselect 'translate/storage/test_cpo.py::TestCPOUnit::test_buildfromunit'
+ --deselect 'translate/storage/test_po.py::TestPOUnit::test_buildfromunit'
+ --deselect 'translate/storage/test_pypo.py::TestPYPOUnit::test_buildfromunit'
+
+ # Fails with network-sandbox (and even with it off but w/ softer fail)
+ --deselect 'tests/xliff_conformance/test_xliff_conformance.py::test_open_office_to_xliff'
+ --deselect 'tests/xliff_conformance/test_xliff_conformance.py::test_po_to_xliff'
+ )
+
+ if ! use ini; then
+ deselect+=(
+ --ignore translate/convert/test_ini2po.py
+ --ignore translate/convert/test_po2ini.py
+ )
+ fi
+
+ if ! use subtitles; then
+ deselect+=(
+ --ignore translate/storage/test_subtitles.py
+ )
+ fi
+
+ # translate/storage/test_mo.py needs 'pocompile'
+ distutils_install_for_testing --via-root
+
+ pytest -vv "${deselect[@]}" || die "Tests failed with ${EPYTHON}"
+}
+
+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
+}
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2021-01-04 9:45 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-01-04 9:45 [gentoo-commits] repo/gentoo:master commit in: dev-python/translate-toolkit/, dev-python/translate-toolkit/files/ Michał Górny
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox