commit: 715a9ac3e701887db1b598ba66931ef832c611c1 Author: Michał Górny <mgorny <AT> gentoo <DOT> org> AuthorDate: Sat Oct 4 13:31:04 2025 +0000 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> CommitDate: Sat Oct 4 14:09:37 2025 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=715a9ac3
dev-python/polib: Backport gettext-0.22 test fix Signed-off-by: Michał Górny <mgorny <AT> gentoo.org> .../polib/files/polib-1.2.0-gettext-0.22.patch | 23 ++++++++++++++++++++++ dev-python/polib/polib-1.2.0.ebuild | 7 ++++--- 2 files changed, 27 insertions(+), 3 deletions(-) diff --git a/dev-python/polib/files/polib-1.2.0-gettext-0.22.patch b/dev-python/polib/files/polib-1.2.0-gettext-0.22.patch new file mode 100644 index 000000000000..c544fa89c41e --- /dev/null +++ b/dev-python/polib/files/polib-1.2.0-gettext-0.22.patch @@ -0,0 +1,23 @@ +From 127f746ebef68cd3485a5feee2739ab83a9c3612 Mon Sep 17 00:00:00 2001 +From: Dave Vasilevsky <[email protected]> +Date: Fri, 28 Mar 2025 16:38:43 -0400 +Subject: [PATCH] Don't convert to UTF-8 in test + +Fixes #150 +--- + tests/tests.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/tests/tests.py b/tests/tests.py +index 4b408d5..61533d0 100644 +--- a/tests/tests.py ++++ b/tests/tests.py +@@ -675,7 +675,7 @@ def test_save_as_mofile(self): + os.close(fd) + po = polib.pofile(reffile, autodetect_encoding=False, encoding=encoding) + po.save_as_mofile(tmpfile1) +- subprocess.call([msgfmt, '--no-hash', '--endianness=%s' % sys.byteorder, '-o', tmpfile2, reffile]) ++ subprocess.call([msgfmt, '--no-hash', '--endianness=%s' % sys.byteorder, '--no-convert', '-o', tmpfile2, reffile]) + try: + f = open(tmpfile1, 'rb') + s1 = f.read() diff --git a/dev-python/polib/polib-1.2.0.ebuild b/dev-python/polib/polib-1.2.0.ebuild index 3f0c919f0e19..330eb0ae791c 100644 --- a/dev-python/polib/polib-1.2.0.ebuild +++ b/dev-python/polib/polib-1.2.0.ebuild @@ -4,7 +4,7 @@ EAPI=8 DISTUTILS_USE_PEP517=setuptools -PYTHON_COMPAT=( python3_{10..13} ) +PYTHON_COMPAT=( python3_{11..13} ) inherit distutils-r1 pypi @@ -21,10 +21,9 @@ KEYWORDS="~alpha amd64 arm arm64 ~loong ~mips ppc ppc64 ~riscv ~sparc x86" IUSE="test" RESTRICT="!test? ( test )" -# <sys-devel/gettext-0.22: https://github.com/izimobil/polib/issues/150 BDEPEND=" test? ( - <sys-devel/gettext-0.22 + sys-devel/gettext ) " @@ -32,6 +31,8 @@ distutils_enable_sphinx docs PATCHES=( "${FILESDIR}"/${PN}-1.0.7-BE-test.patch + # https://github.com/izimobil/polib/pull/168 + "${FILESDIR}/${P}-gettext-0.22.patch" ) python_test() {
