diff options
author | Guillaume Seren <guillaumeseren@gmail.com> | 2020-08-08 18:16:49 +0200 |
---|---|---|
committer | Joonas Niilola <juippis@gentoo.org> | 2020-08-09 20:20:28 +0300 |
commit | 21f99a8b40c5e163571f491a516929781ece4433 (patch) | |
tree | 1b80a90061f955600eba937371ff45c7d29aafbd /dev-python/urwid | |
parent | dev-libs/dmalloc: Add live ebuild (diff) | |
download | gentoo-21f99a8b40c5e163571f491a516929781ece4433.tar.gz gentoo-21f99a8b40c5e163571f491a516929781ece4433.tar.bz2 gentoo-21f99a8b40c5e163571f491a516929781ece4433.zip |
dev-python/urwid: Add version bump 2.1.1
Closes: https://bugs.gentoo.org/736412
Closes: https://bugs.gentoo.org/736410
Package-Manager: Portage-2.3.99, Repoman-2.3.2
Signed-off-by: Guillaume Seren <guillaumeseren@gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/17059
Signed-off-by: Joonas Niilola <juippis@gentoo.org>
Diffstat (limited to 'dev-python/urwid')
-rw-r--r-- | dev-python/urwid/Manifest | 1 | ||||
-rw-r--r-- | dev-python/urwid/files/urwid-2.1.1-ignore-resetting-to-invalid-locale.patch | 32 | ||||
-rw-r--r-- | dev-python/urwid/urwid-2.1.1.ebuild | 46 |
3 files changed, 79 insertions, 0 deletions
diff --git a/dev-python/urwid/Manifest b/dev-python/urwid/Manifest index 69ca17aa1363..6a2e925fa78e 100644 --- a/dev-python/urwid/Manifest +++ b/dev-python/urwid/Manifest @@ -1 +1,2 @@ DIST urwid-2.1.0.tar.gz 630226 BLAKE2B 62e36080419cd4acf8c3415ce6393483244f44ffa881730ceebea71ae5535da04a7f45bd5e23fa0808a88a192c8d9d21fa2b1cf7dc3fb20485ee3280c2eeda99 SHA512 c121c0e49ab9531f67bff8740d29fc716fb8c9203e1b2ddb7257f01095e0bf976f3f2131a3b1f95a3b5368ddeea6a09b9c867ab459b91e3e9be6cba4f18ec654 +DIST urwid-2.1.1.tar.gz 633082 BLAKE2B 93393cc9f8e755cf2e25119f26487e062ab145ff4c966c69ad0b153cc2a286aac4f70be9b7e82c57f644fb850f70c88c0c9562cf1c07dcdd427e0afe409a01b0 SHA512 08fc51205f0adeea0ecce876ca17d921961b665894aef440fd826ef0f8b9230cd8d22c5db85fcf4e227f8e70841e3439860e5035ff874b8d0c1834111c3a97db diff --git a/dev-python/urwid/files/urwid-2.1.1-ignore-resetting-to-invalid-locale.patch b/dev-python/urwid/files/urwid-2.1.1-ignore-resetting-to-invalid-locale.patch new file mode 100644 index 000000000000..61549a50d087 --- /dev/null +++ b/dev-python/urwid/files/urwid-2.1.1-ignore-resetting-to-invalid-locale.patch @@ -0,0 +1,32 @@ +From fd010f8336407ad1a42522b424d2ea7b7800ebc4 Mon Sep 17 00:00:00 2001 +From: Jochen Sprickerhof <git@jochen.sprickerhof.de> +Date: Fri, 26 Jun 2020 22:26:23 +0200 +Subject: [PATCH] Ignore resetting to invalid locale (Closes: #377) + +Resetting the locale was introduced in 5dcf236, before that an invalid +locale was ignored. Restore the old behavior insofar that only valid +locales are restored. +This fixes the unit tests of scottkosty/vit with unset LANG. +--- + urwid/util.py | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/urwid/util.py b/urwid/util.py +index 17c049d..acd62f6 100644 +--- a/urwid/util.py ++++ b/urwid/util.py +@@ -55,7 +55,10 @@ def detect_encoding(): + else: + raise + finally: +- locale.setlocale(locale.LC_ALL, initial) ++ try: ++ locale.setlocale(locale.LC_ALL, initial) ++ except locale.Error: ++ pass + + if 'detected_encoding' not in locals(): + detected_encoding = detect_encoding() +-- +2.26.2 + diff --git a/dev-python/urwid/urwid-2.1.1.ebuild b/dev-python/urwid/urwid-2.1.1.ebuild new file mode 100644 index 000000000000..9103de23f2e2 --- /dev/null +++ b/dev-python/urwid/urwid-2.1.1.ebuild @@ -0,0 +1,46 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +PYTHON_COMPAT=( python3_{6..9} ) +PYTHON_REQ_USE="ncurses" + +inherit distutils-r1 + +DESCRIPTION="Curses-based user interface library for Python" +HOMEPAGE="http://urwid.org/ https://pypi.org/project/urwid/ https://github.com/urwid/urwid/" +SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz" + +LICENSE="LGPL-2.1" +SLOT="0" +KEYWORDS="~amd64 ~arm ~arm64 ~ia64 ~mips ppc ppc64 ~sparc x86 ~amd64-linux ~x86-linux" +IUSE="examples" + +PATCHES=( + "${FILESDIR}/${PN}-2.1.1-ignore-resetting-to-invalid-locale.patch" + ) + +distutils_enable_sphinx docs +distutils_enable_tests setup.py + +src_prepare() { + # optional tests broken by modern tornado versions + sed -e 's:import tornado:&_broken:' \ + -i urwid/tests/test_event_loops.py || die + distutils-r1_src_prepare +} + +python_compile() { + if ! python_is_python3; then + local CFLAGS="${CFLAGS} -fno-strict-aliasing" + export CFLAGS + fi + + distutils-r1_python_compile +} + +python_install_all() { + use examples && dodoc -r examples + distutils-r1_python_install_all +} |