dev-python/importlib_metadata: Add py38 with patch for tests
authorPatrick McLean <patrick.mclean@sony.com>
Thu, 21 Nov 2019 20:05:17 +0000 (12:05 -0800)
committerPatrick McLean <chutzpah@gentoo.org>
Thu, 21 Nov 2019 23:55:09 +0000 (15:55 -0800)
Copyright: Sony Interactive Entertainment Inc.
Package-Manager: Portage-2.3.79, Repoman-2.3.18
Signed-off-by: Patrick McLean <chutzpah@gentoo.org>
dev-python/importlib_metadata/files/importlib_metadata-0.23-py38.patch [new file with mode: 0644]
dev-python/importlib_metadata/importlib_metadata-0.23-r1.ebuild

diff --git a/dev-python/importlib_metadata/files/importlib_metadata-0.23-py38.patch b/dev-python/importlib_metadata/files/importlib_metadata-0.23-py38.patch
new file mode 100644 (file)
index 0000000..f0b8b63
--- /dev/null
@@ -0,0 +1,36 @@
+diff --git a/importlib_metadata/tests/test_main.py b/importlib_metadata/tests/test_main.py
+index 38ec884..0ab1cf1 100644
+--- a/importlib_metadata/tests/test_main.py
++++ b/importlib_metadata/tests/test_main.py
+@@ -2,11 +2,17 @@
+ from __future__ import unicode_literals
+ import re
++import sys
+ import textwrap
+ import unittest
+ import importlib
+ import importlib_metadata
++if sys.hexversion > 0x3080000:
++    from importlib.metadata import (
++        Distribution as SysDistribution,
++        )
++
+ from . import fixtures
+ from .. import (
+     Distribution, EntryPoint, MetadataPathFinder,
+@@ -157,8 +163,12 @@ class DiscoveryTests(fixtures.EggInfoPkg,
+     def test_package_discovery(self):
+         dists = list(distributions())
++        if sys.hexversion > 0x3080000:
++            dist_classes = (Distribution, SysDistribution)
++        else:
++            dist_classes = (Distribution)
+         assert all(
+-            isinstance(dist, Distribution)
++            isinstance(dist, dist_classes)
+             for dist in dists
+             )
+         assert any(
index 4703e20cd4fb2f49ecac9097abbf888febd9c744..11128514911f35c2bc7eacd3b387037e13cddb50 100644 (file)
@@ -3,7 +3,7 @@
 
 EAPI=7
 
-PYTHON_COMPAT=( pypy{,3} python{2_7,3_{5,6,7}} )
+PYTHON_COMPAT=( pypy{,3} python{2_7,3_{5,6,7,8}} )
 
 inherit distutils-r1
 
@@ -35,6 +35,10 @@ BDEPEND="
        )
 "
 
+PATCHES=(
+       "${FILESDIR}/importlib_metadata-0.23-py38.patch"
+)
+
 distutils_enable_tests unittest
 
 python_check_deps() {