diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2020-09-23 10:22:15 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2020-09-23 10:22:15 +0100 |
commit | 8b4ace9c50842c5b83401ea7b179dcab940387e1 (patch) | |
tree | 230f3135ceaace633cf93e9838b185c4a6664c2e /dev-python/pycountry | |
parent | 9ee6d97c2883d42f204a533a8bc1f4562df778fb (diff) |
gentoo resync : 23.09.2020
Diffstat (limited to 'dev-python/pycountry')
-rw-r--r-- | dev-python/pycountry/Manifest | 5 | ||||
-rw-r--r-- | dev-python/pycountry/files/pycountry-20.7.3-fix-tests-for-pypy3.patch | 21 | ||||
-rw-r--r-- | dev-python/pycountry/metadata.xml | 1 | ||||
-rw-r--r-- | dev-python/pycountry/pycountry-20.7.3.ebuild | 35 |
4 files changed, 61 insertions, 1 deletions
diff --git a/dev-python/pycountry/Manifest b/dev-python/pycountry/Manifest index 491cf9a06815..5245163d3f9d 100644 --- a/dev-python/pycountry/Manifest +++ b/dev-python/pycountry/Manifest @@ -1,3 +1,6 @@ +AUX pycountry-20.7.3-fix-tests-for-pypy3.patch 740 BLAKE2B 64113481df5b7fb385604f16d7b3be066a12b6a5e1dab38cdf879101da132bcacf407fdf773d5f15381789114be265c7e1ee3ab880c38dae6e904e6820923ee5 SHA512 0df7756ac4d3dd3ccc409307f21a95021c93851ad3b6ce07ce244eade4957d9906dc6aaabdbafe671cf6f9619623cdd22097119642c0c926376e4991eb6a1a4f DIST pycountry-19.8.18.tar.gz 10003160 BLAKE2B ac7894e9fc1ed4e8f386cc6e07c1fc2abefee63c39c7c851c100519418606b52bc18be8da672930ceefdc7ca7b51571e4b3884ea0c20e547e5b596e249ebf407 SHA512 39ba06629eeea55460424d06992ca5f1e5bf6168b219dc4880ec326f6aa0c92a4fdc54d4143a8b8bb1490149af793e760e291c6d704104a57ba91e88228ab669 +DIST pycountry-20.7.3.tar.gz 10137217 BLAKE2B 2b32d450a1d16eab95e0c1ab6cae3bf89c07742d48cf6f8473854119ac0483b5490523e03e823c9b314231983f39d1c8bf595aac201756fee9897a8d15a84c08 SHA512 df88a34307a4275267a7f3af282b73ca5e762c49ad158bfcd39b97c5d852bf045bcfe72351fc6f232c55003a7c4b0a04801eb562ba65ed5d599bd45b2bd3bc58 EBUILD pycountry-19.8.18.ebuild 902 BLAKE2B 80b782a69ee57cbd3aa573eb92ffc7addb6f9e793c32870b7e8a61543a78a9542264f7672b0b2fd3db9dfec58856dea5e8a0936cbb1f7206f01c660ff99107b8 SHA512 0e5b22e1fad3d0ba447ff6596c549c3e6270cab301b53b42df8ce34e80e4af12264f6e4189af68fef36920464c0017689b916d27231b4d721f1fb888693f8b6f -MISC metadata.xml 376 BLAKE2B ef3ecd43b3e7ddb74704800edb1d4e10d1cb0b8ed422400fc8d8f695c6b1b067c9c3a3da1eddd6c45ee7a74349f0188ad30547230ae5c2b01524fefd1be15a39 SHA512 f96945c42bd3b18b148257a3cbcd726848c4311f9186bbd68c6af81d1850ed1c113c61d519d7380f4b656b2352e3378fbf02705720f9a4aafc3c4502b10f180f +EBUILD pycountry-20.7.3.ebuild 995 BLAKE2B 1e30bd0d356726eda5e05c8cd5c129a770842161ea98d7fa70098a4f19789bc154156dbb62798ae8486065ab192fe18d9f6dfeddc398a5a5775b04ee8a177676 SHA512 9abe7006544e503b89e02f5de2f6aae314dd5abbc2434b2167cdd6e180ba5ca232d89cca48e2db1545d73f254dbc4666503f7f21f29caf3a339adb9799bad1c2 +MISC metadata.xml 448 BLAKE2B a686522b95569132b176657278dc1571174234f839ad5796c0498198461054d2a2190482b10216ac22a2148b6430b1959f65e72756ae4aea69674f5a14640341 SHA512 d4f3dda1070dd7513059353bb3608b9c1e37d15d6cf8aeffb914c07649cb80aa2ce165a8eb204ef7ec0206d5872ca9a25b2aba5148d783876db53bf4e2f490df diff --git a/dev-python/pycountry/files/pycountry-20.7.3-fix-tests-for-pypy3.patch b/dev-python/pycountry/files/pycountry-20.7.3-fix-tests-for-pypy3.patch new file mode 100644 index 000000000000..453c57f362cd --- /dev/null +++ b/dev-python/pycountry/files/pycountry-20.7.3-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/metadata.xml b/dev-python/pycountry/metadata.xml index 1d74157770c4..926bcf2432e9 100644 --- a/dev-python/pycountry/metadata.xml +++ b/dev-python/pycountry/metadata.xml @@ -8,5 +8,6 @@ <upstream> <remote-id type="pypi">pycountry</remote-id> <remote-id type="github">flyingcircusio/pycountry</remote-id> + <bugs-to>https://github.com/flyingcircusio/pycountry/issues</bugs-to> </upstream> </pkgmetadata> diff --git a/dev-python/pycountry/pycountry-20.7.3.ebuild b/dev-python/pycountry/pycountry-20.7.3.ebuild new file mode 100644 index 000000000000..6ae5775ac033 --- /dev/null +++ b/dev-python/pycountry/pycountry-20.7.3.ebuild @@ -0,0 +1,35 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +PYTHON_COMPAT=( pypy3 python3_{6,7,8,9} ) +# The package uses pkg_resources to determine its version +DISTUTILS_USE_SETUPTOOLS=manual + +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 ~sparc ~x86" +IUSE="test" +RESTRICT="!test? ( test )" + +RDEPEND="dev-python/setuptools[${PYTHON_USEDEP}]" +BDEPEND=" + dev-python/setuptools[${PYTHON_USEDEP}] + test? ( dev-python/pytest[${PYTHON_USEDEP}] ) +" + +# https://github.com/flyingcircusio/pycountry/pull/51 +PATCHES=( "${FILESDIR}/${P}-fix-tests-for-pypy3.patch" ) + +python_test() { + # The package uses pkg_resources to determine its version + distutils_install_for_testing + pytest -vv || die "Tests fail with ${EPYTHON}" +} |