setuptools: upgraded package to upstream

Upgraded dev-python/setuptools to version 44.0.0 on amd64

BUG=chromium:1069884
TEST=Relying on full test suite. This is Python so also
should not have any board-specific dependencies.

Change-Id: I27ff1b4ea3ead23fd95665753d3a1d87ce75647a
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/overlays/portage-stable/+/2147625
Commit-Queue: Bob Brandt <brndt@google.com>
Commit-Queue: Chirantan Ekbote <chirantan@chromium.org>
Tested-by: Bob Brandt <brndt@google.com>
Auto-Submit: Bob Brandt <brndt@google.com>
Reviewed-by: Chirantan Ekbote <chirantan@chromium.org>
diff --git a/dev-python/setuptools/Manifest b/dev-python/setuptools/Manifest
index 576a147..a6f581a 100644
--- a/dev-python/setuptools/Manifest
+++ b/dev-python/setuptools/Manifest
@@ -1 +1 @@
-DIST setuptools-40.6.3.zip 839328 BLAKE2B ddc87213439ce2ad96ba54218bd5b3e41a7c31d670bddb9e4ea058b8ee7dffbe6fcb0e5fd24baf3fb38f5e824fde36aa8dc1e09d7ac37f9375ee351406389cd6 SHA512 6c628b8fc67645bca96ddcd016ec9a685e91690bf98dff077e842cfbd0d8d24de76ac51b3ff238d31551a48819d8f694fee6e9bb422ca954e54c22b4bda0038c
+DIST setuptools-44.0.0.zip 858893 BLAKE2B 02ba2a838487ba9e80d9ca3b8598cecbec4d286f2734be439d2b73f3f7f0ca80e80ea71a0c2322093deb548503c82d6eb32b1585992979b053f14f49baa00baa SHA512 bb48e7763d258e654472bc416d16ec8708eefa95d1eb03cb6e81b623fd636cefc51a0bd67887084ab0214e256e2030a8f655184c3b59ad6937abab6a6178f3a1
diff --git a/dev-python/setuptools/files/setuptools-42.0.0-imp-fix.patch b/dev-python/setuptools/files/setuptools-42.0.0-imp-fix.patch
new file mode 100644
index 0000000..5c96016
--- /dev/null
+++ b/dev-python/setuptools/files/setuptools-42.0.0-imp-fix.patch
@@ -0,0 +1,51 @@
+From bbf825eee764cae0bc44077ccc957a733d53d095 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Ond=C5=99ej=20S=C3=BAkup?=
+ <mimi1vx@users.noreply.github.com>
+Date: Fri, 15 Nov 2019 08:52:35 +0100
+Subject: [PATCH] Fix _imp module behaviour if is defined paths in find_spec
+ call
+
+fixes #1896
+---
+ setuptools/_imp.py | 15 ++++++++++++---
+ 1 file changed, 12 insertions(+), 3 deletions(-)
+
+diff --git a/setuptools/_imp.py b/setuptools/_imp.py
+index a3cce9b28..6ccec5799 100644
+--- a/setuptools/_imp.py
++++ b/setuptools/_imp.py
+@@ -19,7 +19,10 @@
+ 
+ def find_module(module, paths=None):
+     """Just like 'imp.find_module()', but with package support"""
+-    spec = importlib.util.find_spec(module, paths)
++    if isinstance(paths, list):
++        spec = importlib.machinery.PathFinder().find_spec(module, paths)
++    else:
++        spec = importlib.util.find_spec(module, paths)
+     if spec is None:
+         raise ImportError("Can't find %s" % module)
+     if not spec.has_location and hasattr(spec, 'submodule_search_locations'):
+@@ -60,14 +63,20 @@ def find_module(module, paths=None):
+ 
+ 
+ def get_frozen_object(module, paths=None):
+-    spec = importlib.util.find_spec(module, paths)
++    if isinstance(paths, list):
++        spec = importlib.machinery.PathFinder().find_spec(module, paths)
++    else:
++        spec = importlib.util.find_spec(module, paths)
+     if not spec:
+         raise ImportError("Can't find %s" % module)
+     return spec.loader.get_code(module)
+ 
+ 
+ def get_module(module, paths, info):
+-    spec = importlib.util.find_spec(module, paths)
++    if isinstance(paths, list):
++        spec = importlib.machinery.PathFinder().find_spec(module, paths)
++    else:
++        spec = importlib.util.find_spec(module, paths)
+     if not spec:
+         raise ImportError("Can't find %s" % module)
+     return module_from_spec(spec)
diff --git a/dev-python/setuptools/setuptools-40.6.3.ebuild b/dev-python/setuptools/setuptools-44.0.0.ebuild
similarity index 72%
rename from dev-python/setuptools/setuptools-40.6.3.ebuild
rename to dev-python/setuptools/setuptools-44.0.0.ebuild
index 18fa897..64a4ac3 100644
--- a/dev-python/setuptools/setuptools-40.6.3.ebuild
+++ b/dev-python/setuptools/setuptools-44.0.0.ebuild
@@ -1,8 +1,9 @@
-# Copyright 1999-2019 Gentoo Authors
+# Copyright 1999-2020 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
-EAPI=5
-PYTHON_COMPAT=( python2_7 python3_{4,5,6,7} pypy{,3} )
+EAPI=7
+DISTUTILS_USE_SETUPTOOLS=no
+PYTHON_COMPAT=( python2_7 python3_{6,7,8} pypy3 )
 PYTHON_REQ_USE="xml(+)"
 
 inherit distutils-r1
@@ -21,19 +22,20 @@
 LICENSE="MIT"
 SLOT="0"
 IUSE="test"
+RESTRICT="!test? ( test )"
 
-RDEPEND="
-"
-DEPEND="${RDEPEND}
+BDEPEND="
 	app-arch/unzip
 	test? (
+		dev-python/mock[${PYTHON_USEDEP}]
 		dev-python/pip[${PYTHON_USEDEP}]
-		>=dev-python/pytest-3.1.0[${PYTHON_USEDEP}]
+		>=dev-python/pytest-3.7.0[${PYTHON_USEDEP}]
 		dev-python/pytest-fixture-config[${PYTHON_USEDEP}]
 		dev-python/pytest-virtualenv[${PYTHON_USEDEP}]
-		>=dev-python/backports-unittest-mock-1.2[${PYTHON_USEDEP}]
 		dev-python/wheel[${PYTHON_USEDEP}]
-		virtual/python-futures[${PYTHON_USEDEP}]
+		$(python_gen_cond_dep '
+			dev-python/futures[${PYTHON_USEDEP}]
+		' -2)
 	)
 "
 PDEPEND="
@@ -44,6 +46,12 @@
 
 DOCS=( {CHANGES,README}.rst docs/{easy_install.txt,pkg_resources.txt,setuptools.txt} )
 
+PATCHES=(
+	# fix regression introduced by reinventing deprecated 'imp'
+	# https://github.com/pypa/setuptools/pull/1905
+	"${FILESDIR}"/setuptools-42.0.0-imp-fix.patch
+)
+
 python_prepare_all() {
 	if [[ ${PV} == "9999" ]]; then
 		python_setup
@@ -62,7 +70,7 @@
 python_test() {
 	# test_easy_install raises a SandboxViolation due to ${HOME}/.pydistutils.cfg
 	# It tries to sandbox the test in a tempdir
-	HOME="${PWD}" py.test --verbose ${PN} || die "Tests failed under ${EPYTHON}"
+	HOME="${PWD}" pytest -vv ${PN} || die "Tests failed under ${EPYTHON}"
 }
 
 python_install() {
diff --git a/metadata/md5-cache/dev-python/setuptools-40.6.3 b/metadata/md5-cache/dev-python/setuptools-40.6.3
deleted file mode 100644
index e847138..0000000
--- a/metadata/md5-cache/dev-python/setuptools-40.6.3
+++ /dev/null
@@ -1,15 +0,0 @@
-DEFINED_PHASES=compile configure install prepare test
-DEPEND=app-arch/unzip test? ( dev-python/pip[python_targets_pypy3(-)?,python_targets_python2_7(-)?,python_targets_python3_6(-)?,python_targets_python3_7(-)?,-python_single_target_pypy3(-),-python_single_target_python2_7(-),-python_single_target_python3_6(-),-python_single_target_python3_7(-)] >=dev-python/pytest-3.1.0[python_targets_pypy3(-)?,python_targets_python2_7(-)?,python_targets_python3_6(-)?,python_targets_python3_7(-)?,-python_single_target_pypy3(-),-python_single_target_python2_7(-),-python_single_target_python3_6(-),-python_single_target_python3_7(-)] dev-python/pytest-fixture-config[python_targets_pypy3(-)?,python_targets_python2_7(-)?,python_targets_python3_6(-)?,python_targets_python3_7(-)?,-python_single_target_pypy3(-),-python_single_target_python2_7(-),-python_single_target_python3_6(-),-python_single_target_python3_7(-)] dev-python/pytest-virtualenv[python_targets_pypy3(-)?,python_targets_python2_7(-)?,python_targets_python3_6(-)?,python_targets_python3_7(-)?,-python_single_target_pypy3(-),-python_single_target_python2_7(-),-python_single_target_python3_6(-),-python_single_target_python3_7(-)] >=dev-python/backports-unittest-mock-1.2[python_targets_pypy3(-)?,python_targets_python2_7(-)?,python_targets_python3_6(-)?,python_targets_python3_7(-)?,-python_single_target_pypy3(-),-python_single_target_python2_7(-),-python_single_target_python3_6(-),-python_single_target_python3_7(-)] dev-python/wheel[python_targets_pypy3(-)?,python_targets_python2_7(-)?,python_targets_python3_6(-)?,python_targets_python3_7(-)?,-python_single_target_pypy3(-),-python_single_target_python2_7(-),-python_single_target_python3_6(-),-python_single_target_python3_7(-)] virtual/python-futures[python_targets_pypy3(-)?,python_targets_python2_7(-)?,python_targets_python3_6(-)?,python_targets_python3_7(-)?,-python_single_target_pypy3(-),-python_single_target_python2_7(-),-python_single_target_python3_6(-),-python_single_target_python3_7(-)] ) python_targets_pypy3? ( >=dev-python/pypy3-5:0=[xml(+)] ) python_targets_python2_7? ( >=dev-lang/python-2.7.5-r2:2.7[xml(+)] ) python_targets_python3_6? ( dev-lang/python:3.6[xml(+)] ) python_targets_python3_7? ( dev-lang/python:3.7[xml(+)] ) >=dev-lang/python-exec-2:=[python_targets_pypy3(-)?,python_targets_python2_7(-)?,python_targets_python3_6(-)?,python_targets_python3_7(-)?,-python_single_target_pypy3(-),-python_single_target_python2_7(-),-python_single_target_python3_6(-),-python_single_target_python3_7(-)]
-DESCRIPTION=Collection of extensions to Distutils
-EAPI=5
-HOMEPAGE=https://github.com/pypa/setuptools https://pypi.org/project/setuptools/
-IUSE=test python_targets_pypy3 python_targets_python2_7 python_targets_python3_6 python_targets_python3_7
-KEYWORDS=*
-LICENSE=MIT
-PDEPEND=>=dev-python/certifi-2016.9.26[python_targets_pypy3(-)?,python_targets_python2_7(-)?,python_targets_python3_6(-)?,python_targets_python3_7(-)?,-python_single_target_pypy3(-),-python_single_target_python2_7(-),-python_single_target_python3_6(-),-python_single_target_python3_7(-)]
-RDEPEND=python_targets_pypy3? ( >=dev-python/pypy3-5:0=[xml(+)] ) python_targets_python2_7? ( >=dev-lang/python-2.7.5-r2:2.7[xml(+)] ) python_targets_python3_6? ( dev-lang/python:3.6[xml(+)] ) python_targets_python3_7? ( dev-lang/python:3.7[xml(+)] ) >=dev-lang/python-exec-2:=[python_targets_pypy3(-)?,python_targets_python2_7(-)?,python_targets_python3_6(-)?,python_targets_python3_7(-)?,-python_single_target_pypy3(-),-python_single_target_python2_7(-),-python_single_target_python3_6(-),-python_single_target_python3_7(-)]
-REQUIRED_USE=|| ( python_targets_pypy3 python_targets_python2_7 python_targets_python3_6 python_targets_python3_7 )
-SLOT=0
-SRC_URI=mirror://pypi/s/setuptools/setuptools-40.6.3.zip
-_eclasses_=distutils-r1	71a5ee567fb298e553ce8d1319279151	eutils	06133990e861be0fe60c2b428fd025d9	multibuild	40fe59465edacd730c644ec2bc197809	multilib	b2f01ad412baf81650c23fcf0975fa33	multiprocessing	e32940a7b2a9992ad217eccddb84d548	python-r1	ce1cd23cfdc1848e8e32743efe34f299	python-utils-r1	931c328767d245c08a16a3f87be9ce9c	toolchain-funcs	209edad4a5c4812e7b2f8021650974f0	xdg-utils	ff2ff954e6b17929574eee4efc5152ba
-_md5_=1743719309aab90fd1fbd5c68726b1b7
diff --git a/metadata/md5-cache/dev-python/setuptools-44.0.0 b/metadata/md5-cache/dev-python/setuptools-44.0.0
new file mode 100644
index 0000000..1eb8f65
--- /dev/null
+++ b/metadata/md5-cache/dev-python/setuptools-44.0.0
@@ -0,0 +1,16 @@
+BDEPEND=app-arch/unzip test? ( dev-python/mock[python_targets_pypy3(-)?,python_targets_python2_7(-)?,python_targets_python3_6(-)?,python_targets_python3_7(-)?,python_targets_python3_8(-)?,-python_single_target_pypy3(-),-python_single_target_python2_7(-),-python_single_target_python3_6(-),-python_single_target_python3_7(-),-python_single_target_python3_8(-)] dev-python/pip[python_targets_pypy3(-)?,python_targets_python2_7(-)?,python_targets_python3_6(-)?,python_targets_python3_7(-)?,python_targets_python3_8(-)?,-python_single_target_pypy3(-),-python_single_target_python2_7(-),-python_single_target_python3_6(-),-python_single_target_python3_7(-),-python_single_target_python3_8(-)] >=dev-python/pytest-3.7.0[python_targets_pypy3(-)?,python_targets_python2_7(-)?,python_targets_python3_6(-)?,python_targets_python3_7(-)?,python_targets_python3_8(-)?,-python_single_target_pypy3(-),-python_single_target_python2_7(-),-python_single_target_python3_6(-),-python_single_target_python3_7(-),-python_single_target_python3_8(-)] dev-python/pytest-fixture-config[python_targets_pypy3(-)?,python_targets_python2_7(-)?,python_targets_python3_6(-)?,python_targets_python3_7(-)?,python_targets_python3_8(-)?,-python_single_target_pypy3(-),-python_single_target_python2_7(-),-python_single_target_python3_6(-),-python_single_target_python3_7(-),-python_single_target_python3_8(-)] dev-python/pytest-virtualenv[python_targets_pypy3(-)?,python_targets_python2_7(-)?,python_targets_python3_6(-)?,python_targets_python3_7(-)?,python_targets_python3_8(-)?,-python_single_target_pypy3(-),-python_single_target_python2_7(-),-python_single_target_python3_6(-),-python_single_target_python3_7(-),-python_single_target_python3_8(-)] dev-python/wheel[python_targets_pypy3(-)?,python_targets_python2_7(-)?,python_targets_python3_6(-)?,python_targets_python3_7(-)?,python_targets_python3_8(-)?,-python_single_target_pypy3(-),-python_single_target_python2_7(-),-python_single_target_python3_6(-),-python_single_target_python3_7(-),-python_single_target_python3_8(-)] python_targets_python2_7? ( dev-python/futures[python_targets_python2_7(-)?,-python_single_target_python2_7(-)] ) ) python_targets_pypy3? ( >=dev-python/pypy3-5:0=[xml(+)] ) python_targets_python2_7? ( >=dev-lang/python-2.7.5-r2:2.7[xml(+)] ) python_targets_python3_6? ( dev-lang/python:3.6[xml(+)] ) python_targets_python3_7? ( dev-lang/python:3.7[xml(+)] ) python_targets_python3_8? ( dev-lang/python:3.8[xml(+)] ) >=dev-lang/python-exec-2:=[python_targets_pypy3(-)?,python_targets_python2_7(-)?,python_targets_python3_6(-)?,python_targets_python3_7(-)?,python_targets_python3_8(-)?,-python_single_target_pypy3(-),-python_single_target_python2_7(-),-python_single_target_python3_6(-),-python_single_target_python3_7(-),-python_single_target_python3_8(-)]
+DEFINED_PHASES=compile configure install prepare test
+DESCRIPTION=Collection of extensions to Distutils
+EAPI=7
+HOMEPAGE=https://github.com/pypa/setuptools https://pypi.org/project/setuptools/
+IUSE=test python_targets_pypy3 python_targets_python2_7 python_targets_python3_6 python_targets_python3_7 python_targets_python3_8
+KEYWORDS=*
+LICENSE=MIT
+PDEPEND=>=dev-python/certifi-2016.9.26[python_targets_pypy3(-)?,python_targets_python2_7(-)?,python_targets_python3_6(-)?,python_targets_python3_7(-)?,python_targets_python3_8(-)?,-python_single_target_pypy3(-),-python_single_target_python2_7(-),-python_single_target_python3_6(-),-python_single_target_python3_7(-),-python_single_target_python3_8(-)]
+RDEPEND=python_targets_pypy3? ( >=dev-python/pypy3-5:0=[xml(+)] ) python_targets_python2_7? ( >=dev-lang/python-2.7.5-r2:2.7[xml(+)] ) python_targets_python3_6? ( dev-lang/python:3.6[xml(+)] ) python_targets_python3_7? ( dev-lang/python:3.7[xml(+)] ) python_targets_python3_8? ( dev-lang/python:3.8[xml(+)] ) >=dev-lang/python-exec-2:=[python_targets_pypy3(-)?,python_targets_python2_7(-)?,python_targets_python3_6(-)?,python_targets_python3_7(-)?,python_targets_python3_8(-)?,-python_single_target_pypy3(-),-python_single_target_python2_7(-),-python_single_target_python3_6(-),-python_single_target_python3_7(-),-python_single_target_python3_8(-)]
+REQUIRED_USE=|| ( python_targets_pypy3 python_targets_python2_7 python_targets_python3_6 python_targets_python3_7 python_targets_python3_8 )
+RESTRICT=!test? ( test )
+SLOT=0
+SRC_URI=mirror://pypi/s/setuptools/setuptools-44.0.0.zip
+_eclasses_=distutils-r1	71a5ee567fb298e553ce8d1319279151	multibuild	40fe59465edacd730c644ec2bc197809	multilib	b2f01ad412baf81650c23fcf0975fa33	multiprocessing	e32940a7b2a9992ad217eccddb84d548	python-r1	ce1cd23cfdc1848e8e32743efe34f299	python-utils-r1	931c328767d245c08a16a3f87be9ce9c	toolchain-funcs	209edad4a5c4812e7b2f8021650974f0
+_md5_=9b39d9322b56e8f204c483eb632898cb