public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: dev-python/translate-toolkit/files/, dev-python/translate-toolkit/
@ 2022-07-15  7:21 Michał Górny
  0 siblings, 0 replies; 2+ messages in thread
From: Michał Górny @ 2022-07-15  7:21 UTC (permalink / raw
  To: gentoo-commits

commit:     bda1e624b031bd89eec4fbc14cefff77cc49dc52
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Fri Jul 15 07:19:16 2022 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Fri Jul 15 07:19:16 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bda1e624

dev-python/translate-toolkit: Remove old

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.6.2.ebuild                 | 106 ---------------------
 3 files changed, 132 deletions(-)

diff --git a/dev-python/translate-toolkit/Manifest b/dev-python/translate-toolkit/Manifest
index 73f725a10533..9e455b3108c9 100644
--- a/dev-python/translate-toolkit/Manifest
+++ b/dev-python/translate-toolkit/Manifest
@@ -1,3 +1,2 @@
-DIST translate-3.6.2.gh.tar.gz 1152569 BLAKE2B 44c9a5878a177b53d34e48d8b642f293ed475c90de8a530f53462384420b8afaaf107cb62c0cdd45e6d0633f53cd8eedb73dd0dcd81d6f876dc5389ba4230c94 SHA512 fb1fc2f6abb766814269d7051f571cbfb25ecd6b7267e2080e5ab0bb41338ace430a8bb01084abe176e2fd0a934cdf6492bf79f5e27c1f8ce99b021175efcec9
 DIST translate-3.7.0.gh.tar.gz 1152162 BLAKE2B 75d3b0a7f2a840766f983d6e1484aab16de2aa2bab74d0753910be9ad0d1c76ebfa553188318920a7d5a6f1ce6b72e755147eb45c501cdeb79246472c0329449 SHA512 18159f85d94768c32fe5a44f3d3e586038b281a0f3e386621bd57a5be64a9ae21a4272c05de8a2ea2a2467c98935205a8ef49a714dc9aabf9ed21de4f533fb93
 DIST translate-3.7.1.gh.tar.gz 1152674 BLAKE2B c4a7d8cb1eec656a261a1af145a1171e9d686348294a0849f29ae23dcd867d831c6f95f0927101325f62ef9b21e0891a7a574f08111bbc3e9c0ce2b996faa70c SHA512 5ed9d156f071f4ce567a0ff3f0ef5c0b42b312edaae82e96eee040ae9547f0cb3334f2973d8050b9181b752f7e81021cc183613bb5c6309aeb110bcacab212fb

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
deleted file mode 100644
index 9d812c4f98f7..000000000000
--- a/dev-python/translate-toolkit/files/translate-toolkit-3.3.0-no-install-docs.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-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.6.2.ebuild b/dev-python/translate-toolkit/translate-toolkit-3.6.2.ebuild
deleted file mode 100644
index 51e65be5f670..000000000000
--- a/dev-python/translate-toolkit/translate-toolkit-3.6.2.ebuild
+++ /dev/null
@@ -1,106 +0,0 @@
-# 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/
-	https://pypi.org/project/translate-toolkit/
-"
-SRC_URI="
-	https://github.com/translate/translate/archive/${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
-}


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-python/translate-toolkit/files/, dev-python/translate-toolkit/
@ 2023-11-07 15:19 Michał Górny
  0 siblings, 0 replies; 2+ messages in thread
From: Michał Górny @ 2023-11-07 15:19 UTC (permalink / raw
  To: gentoo-commits

commit:     99445b2c0d03eea4e58e50284cb6362b8922eff5
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Tue Nov  7 14:09:34 2023 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Tue Nov  7 15:18:54 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=99445b2c

dev-python/translate-toolkit: Enable py3.12

Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 .../files/translate-toolkit-3.10.1-py312.patch     | 36 ++++++++++++++++++++++
 ...1.ebuild => translate-toolkit-3.10.1-r1.ebuild} |  8 +++--
 2 files changed, 42 insertions(+), 2 deletions(-)

diff --git a/dev-python/translate-toolkit/files/translate-toolkit-3.10.1-py312.patch b/dev-python/translate-toolkit/files/translate-toolkit-3.10.1-py312.patch
new file mode 100644
index 000000000000..da0fd91520aa
--- /dev/null
+++ b/dev-python/translate-toolkit/files/translate-toolkit-3.10.1-py312.patch
@@ -0,0 +1,36 @@
+From 3217ed10bb9371ff25cb04e194e0250d42f89206 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Michal=20=C4=8Ciha=C5=99?= <michal@cihar.com>
+Date: Tue, 7 Nov 2023 08:42:56 +0100
+Subject: [PATCH] optrecurse: properly close opened files
+
+This avoids leaking file descriptors in the tests and makes sure the
+content is written at the end of conversion.
+
+Fixes #5071
+---
+ translate/misc/optrecurse.py | 9 ++++++++-
+ 1 file changed, 8 insertions(+), 1 deletion(-)
+
+diff --git a/translate/misc/optrecurse.py b/translate/misc/optrecurse.py
+index d69666b8e8..9337c7c4ff 100644
+--- a/translate/misc/optrecurse.py
++++ b/translate/misc/optrecurse.py
+@@ -684,10 +684,17 @@ def processfile(
+             tempoutput = False
+         templatefile = self.opentemplatefile(options, fulltemplatepath)
+         passthroughoptions = self.getpassthroughoptions(options)
+-        if fileprocessor(inputfile, outputfile, templatefile, **passthroughoptions):
++        result = fileprocessor(
++            inputfile, outputfile, templatefile, **passthroughoptions
++        )
++        if fullinputpath is not None:
++            inputfile.close()
++        if result:
+             if tempoutput:
+                 self.warning("writing to temporary output...")
+                 self.finalizetempoutputfile(options, outputfile, fulloutputpath)
++            if fulloutputpath and os.path.isfile(fulloutputpath):
++                outputfile.close()
+             return True
+         else:
+             # remove the file if it is a file (could be stdout etc)

diff --git a/dev-python/translate-toolkit/translate-toolkit-3.10.1.ebuild b/dev-python/translate-toolkit/translate-toolkit-3.10.1-r1.ebuild
similarity index 94%
rename from dev-python/translate-toolkit/translate-toolkit-3.10.1.ebuild
rename to dev-python/translate-toolkit/translate-toolkit-3.10.1-r1.ebuild
index 77dcd8f1db85..507a80f7bb74 100644
--- a/dev-python/translate-toolkit/translate-toolkit-3.10.1.ebuild
+++ b/dev-python/translate-toolkit/translate-toolkit-3.10.1-r1.ebuild
@@ -4,8 +4,7 @@
 EAPI=8
 
 DISTUTILS_USE_PEP517=setuptools
-# py3.12: https://github.com/translate/translate/issues/5071
-PYTHON_COMPAT=( python3_{10..11} )
+PYTHON_COMPAT=( python3_{10..12} )
 PYTHON_REQ_USE="sqlite"
 
 inherit distutils-r1
@@ -52,6 +51,11 @@ BDEPEND="
 	)
 "
 
+PATCHES=(
+	# https://github.com/translate/translate/commit/3217ed10bb9371ff25cb04e194e0250d42f89206
+	"${FILESDIR}/${P}-py312.patch"
+)
+
 distutils_enable_tests pytest
 
 src_test() {


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-11-07 15:19 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-11-07 15:19 [gentoo-commits] repo/gentoo:master commit in: dev-python/translate-toolkit/files/, dev-python/translate-toolkit/ Michał Górny
  -- strict thread matches above, loose matches on Subject: below --
2022-07-15  7:21 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