summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArthur Zamarin <arthurzam@gentoo.org>2022-03-09 21:24:57 +0200
committerArthur Zamarin <arthurzam@gentoo.org>2022-03-09 22:06:05 +0200
commitd57aa34bb3d71d9124882cf71cb078d165d86b7b (patch)
tree0fc07ee786d04517fbb5a00b054576e201eb91de /dev-python/pycountry
parentdev-python/dulwich: add 0.20.33 (diff)
downloadgentoo-d57aa34bb3d71d9124882cf71cb078d165d86b7b.tar.gz
gentoo-d57aa34bb3d71d9124882cf71cb078d165d86b7b.tar.bz2
gentoo-d57aa34bb3d71d9124882cf71cb078d165d86b7b.zip
dev-python/pycountry: add 22.3.5
Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
Diffstat (limited to 'dev-python/pycountry')
-rw-r--r--dev-python/pycountry/Manifest1
-rw-r--r--dev-python/pycountry/files/pycountry-22.3.5-fix-tests-for-pypy3.patch21
-rw-r--r--dev-python/pycountry/pycountry-22.3.5.ebuild26
3 files changed, 48 insertions, 0 deletions
diff --git a/dev-python/pycountry/Manifest b/dev-python/pycountry/Manifest
index 0913feeee2fd..4ef03cb28200 100644
--- a/dev-python/pycountry/Manifest
+++ b/dev-python/pycountry/Manifest
@@ -1 +1,2 @@
DIST pycountry-22.1.10.tar.gz 10060795 BLAKE2B 51672b2e08e48528797e57e6a546261d4ceee0af364d5c943f243a5956008ffc417b02e553f376c252bfbfbf76af40585c9f910815a9c2943ff88be6fb9d4180 SHA512 93e5737df29affe5bbf8a2aa2caef59727adcc198eab301a5ddbc4275e32955cec0de9ab2820470a8cf87b0c0a9d48bfddd18411d93a700212aba8372e5a52b4
+DIST pycountry-22.3.5.tar.gz 10141551 BLAKE2B d645eade8ce9be3b99f4f2b189cc50c3395ecb3899ab9fa668066993abbfa576191cfcc05b7bb2764d088a86df492770bcc0a8834f04e6fde58a01defe8a1b14 SHA512 07dc507ee94f1880727761df197f81704386d9246163c9a5872f47083d37c7d1205dfbd28c6663ef0731a0b05277ade03a1a1929ab84087e0e85c05028c68b89
diff --git a/dev-python/pycountry/files/pycountry-22.3.5-fix-tests-for-pypy3.patch b/dev-python/pycountry/files/pycountry-22.3.5-fix-tests-for-pypy3.patch
new file mode 100644
index 000000000000..2de5d0bb7630
--- /dev/null
+++ b/dev-python/pycountry/files/pycountry-22.3.5-fix-tests-for-pypy3.patch
@@ -0,0 +1,21 @@
+commit 57a64b69704640bd85270d886c369ef5a31eee80
+Author: Louis Sautier <sautier.louis@gmail.com>
+Date: Thu Sep 17 13:01:07 2020 +0200
+
+ Do not rely on CPython-specific __builtins__ for tests
+
+ This makes test_locales pass with PyPy3.
+
+diff --git a/src/pycountry/tests/test_general.py b/src/pycountry/tests/test_general.py
+index ea697ae..ad1090f 100644
+--- a/src/pycountry/tests/test_general.py
++++ b/src/pycountry/tests/test_general.py
+@@ -149,7 +149,7 @@ def test_locales():
+ german = gettext.translation(
+ "iso3166", pycountry.LOCALES_DIR, languages=["de"])
+ german.install()
+- assert __builtins__["_"]("Germany") == "Deutschland"
++ assert _("Germany") == "Deutschland"
+
+
+ def test_removed_countries():
diff --git a/dev-python/pycountry/pycountry-22.3.5.ebuild b/dev-python/pycountry/pycountry-22.3.5.ebuild
new file mode 100644
index 000000000000..11db0887d579
--- /dev/null
+++ b/dev-python/pycountry/pycountry-22.3.5.ebuild
@@ -0,0 +1,26 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DISTUTILS_USE_PEP517=setuptools
+PYTHON_COMPAT=( pypy3 python3_{8..10} )
+inherit distutils-r1
+
+DESCRIPTION="Database of countries, subdivisions, languages, currencies and script"
+HOMEPAGE="https://github.com/flyingcircusio/pycountry"
+SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="~amd64 ~arm64 ~ia64 ~ppc ~riscv ~sparc ~x86"
+
+RDEPEND="dev-python/setuptools[${PYTHON_USEDEP}]"
+BDEPEND="${RDEPEND}"
+
+distutils_enable_tests pytest
+
+# https://github.com/flyingcircusio/pycountry/pull/51
+PATCHES=(
+ "${FILESDIR}/pycountry-22.3.5-fix-tests-for-pypy3.patch"
+)