diff options
Diffstat (limited to 'dev-python/urwid')
-rw-r--r-- | dev-python/urwid/Manifest | 5 | ||||
-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.0.ebuild | 2 | ||||
-rw-r--r-- | dev-python/urwid/urwid-2.1.1.ebuild | 46 |
4 files changed, 83 insertions, 2 deletions
diff --git a/dev-python/urwid/Manifest b/dev-python/urwid/Manifest index b41363f331fe..a8c2bd4052cc 100644 --- a/dev-python/urwid/Manifest +++ b/dev-python/urwid/Manifest @@ -1,3 +1,6 @@ +AUX urwid-2.1.1-ignore-resetting-to-invalid-locale.patch 998 BLAKE2B c76965b4bb61df264d01ec898d327f99e761909f49b7fcb5fcf222eaf74fa50fd89d16477d48d1fe939ed98d1c3c55969cf0b6e50204e26f6b0adf395edfe042 SHA512 d2aa4e8edc96583b7a1c68788e9301d200004100a00fa03157e0c6cf0f295b1320c1f1d249c9b67d30766cad65ee36ea1b5796fa9312f8cda52b509e4730af67 DIST urwid-2.1.0.tar.gz 630226 BLAKE2B 62e36080419cd4acf8c3415ce6393483244f44ffa881730ceebea71ae5535da04a7f45bd5e23fa0808a88a192c8d9d21fa2b1cf7dc3fb20485ee3280c2eeda99 SHA512 c121c0e49ab9531f67bff8740d29fc716fb8c9203e1b2ddb7257f01095e0bf976f3f2131a3b1f95a3b5368ddeea6a09b9c867ab459b91e3e9be6cba4f18ec654 -EBUILD urwid-2.1.0.ebuild 995 BLAKE2B 7bff9a6384aa4b023435fe2b4f990e7cd5550fad6ee70b904f59352aaca405db45217c4c76def3c0f2d806bade01761e9bda77f1662abdaacb3fe0232e46c50b SHA512 164cb4a14f51d2a2de09f88071a95e6ee5203e04559ac882b16c72f3555b3e9be1d77bab9c2aed6c2956728cafd35887b922ed10e9e123e97c49061254dd8aea +DIST urwid-2.1.1.tar.gz 633082 BLAKE2B 93393cc9f8e755cf2e25119f26487e062ab145ff4c966c69ad0b153cc2a286aac4f70be9b7e82c57f644fb850f70c88c0c9562cf1c07dcdd427e0afe409a01b0 SHA512 08fc51205f0adeea0ecce876ca17d921961b665894aef440fd826ef0f8b9230cd8d22c5db85fcf4e227f8e70841e3439860e5035ff874b8d0c1834111c3a97db +EBUILD urwid-2.1.0.ebuild 985 BLAKE2B 33914c61c857f995ffa096a08e27bce1ba5137130b8d1aabf6c4cce08b3eeb1d2a7795bf1fe1593adb23774d394b9022e62ebf8a8500ae6f42f7597885638a6f SHA512 23acfc9e34aaacbb8ca3f929934989dfd992405ea460adab19173d570704bf99291a2352eb78bb5d731b93ffe82703a095410df79180821059b3c6a21318954a +EBUILD urwid-2.1.1.ebuild 1102 BLAKE2B 4aa5b866c1a91224051f3be17cfa61fe49de279607a458f7534900f58e3ed1e97eb058680a886e74f183ff40ae606f37a26ca3655d8e1581debc4f38b6398160 SHA512 d5c752a2e7c8bb1a686ddebcd420370ea93c779c4fdfba5be95ca0f735a3989f011c525809e94412ff12b51881244baf4b2bfec0fd28a0812cbf70bf441f1958 MISC metadata.xml 1152 BLAKE2B 4b992c5bc6907498186b29eba5804d17341a20715dfd9ea568e0b066d5f6b8775a79a703be450a436badf46d052a790a62cb8ce7100cdb54f24faa68eae6ecda SHA512 4bb4df4cc9398e2b77815b908cfc3821a96370e083a7b4452d601009186bc2c29418987f6e9a25d64332a15b860addb66ee4594e30ea51f34a1eae2d8be0a680 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.0.ebuild b/dev-python/urwid/urwid-2.1.0.ebuild index abcbe910f5ec..497c42bd4a56 100644 --- a/dev-python/urwid/urwid-2.1.0.ebuild +++ b/dev-python/urwid/urwid-2.1.0.ebuild @@ -3,7 +3,7 @@ EAPI=7 -PYTHON_COMPAT=( python2_7 python3_{6..9} ) +PYTHON_COMPAT=( python3_{6..9} ) PYTHON_REQ_USE="ncurses" inherit distutils-r1 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..1492f14e7d41 --- /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 +} |