summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick McLean <patrick.mclean@sony.com>2020-03-26 14:32:22 -0700
committerPatrick McLean <chutzpah@gentoo.org>2020-03-26 15:39:03 -0700
commit56b7b2d4280e07a09e2d0547eb18330ea159d7a6 (patch)
treeaa91c064ec1e5ddae9fac4323131961dddb6a876
parentdev-python/objgraph-3.4.1: version bump, add pypy3 (diff)
downloadgentoo-56b7b2d4280e07a09e2d0547eb18330ea159d7a6.tar.gz
gentoo-56b7b2d4280e07a09e2d0547eb18330ea159d7a6.tar.bz2
gentoo-56b7b2d4280e07a09e2d0547eb18330ea159d7a6.zip
dev-python/jaraco-collections-3.0.0: add pypy3
Copyright: Sony Interactive Entertainment Inc. Package-Manager: Portage-2.3.96, Repoman-2.3.21 Signed-off-by: Patrick McLean <chutzpah@gentoo.org>
-rw-r--r--dev-python/jaraco-collections/files/jaraco-collections-3.0.0-pypy.patch30
-rw-r--r--dev-python/jaraco-collections/jaraco-collections-3.0.0.ebuild9
2 files changed, 37 insertions, 2 deletions
diff --git a/dev-python/jaraco-collections/files/jaraco-collections-3.0.0-pypy.patch b/dev-python/jaraco-collections/files/jaraco-collections-3.0.0-pypy.patch
new file mode 100644
index 00000000000..63cee6cb411
--- /dev/null
+++ b/dev-python/jaraco-collections/files/jaraco-collections-3.0.0-pypy.patch
@@ -0,0 +1,30 @@
+diff --git a/jaraco/collections.py b/jaraco/collections.py
+index 3ab9dc9..6a6e342 100644
+--- a/jaraco/collections.py
++++ b/jaraco/collections.py
+@@ -4,6 +4,7 @@ import collections.abc
+ import itertools
+ import copy
+ import functools
++import platform
+
+ from jaraco.classes.properties import NonDataProperty
+ import jaraco.text
+@@ -592,9 +593,14 @@ class DictStack(list, collections.abc.Mapping):
+ return list(set(itertools.chain.from_iterable(c.keys() for c in self)))
+
+ def __getitem__(self, key):
+- for scope in reversed(self):
+- if key in scope:
+- return scope[key]
++ if 'PyPy' in platform.python_implementation():
++ for scope in reversed(list(self)):
++ if key in scope:
++ return scope[key]
++ else:
++ for scope in reversed(self):
++ if key in scope:
++ return scope[key]
+ raise KeyError(key)
+
+ push = list.append
diff --git a/dev-python/jaraco-collections/jaraco-collections-3.0.0.ebuild b/dev-python/jaraco-collections/jaraco-collections-3.0.0.ebuild
index 24a897750d9..e89935b5b5c 100644
--- a/dev-python/jaraco-collections/jaraco-collections-3.0.0.ebuild
+++ b/dev-python/jaraco-collections/jaraco-collections-3.0.0.ebuild
@@ -33,11 +33,16 @@ BDEPEND="
>=dev-python/pytest-2.8[${PYTHON_USEDEP}]
)
"
-distutils_enable_sphinx docs '>=dev-python/jaraco-packaging-3.2' \
- '>=dev-python/rst-linker-1.9'
S="${WORKDIR}/${MY_PN}-${PV}"
+PATCHES=(
+ "${FILESDIR}/jaraco-collections-3.0.0-pypy.patch"
+)
+
+distutils_enable_sphinx docs '>=dev-python/jaraco-packaging-3.2' \
+ '>=dev-python/rst-linker-1.9'
+
python_test() {
# Override pytest options to skip flake8
PYTHONPATH=. pytest -vv --override-ini="addopts=--doctest-modules" \