diff --git a/dev-python/pydotplus/files/pydotplus-2.0.2-tests.patch b/dev-python/pydotplus/files/pydotplus-2.0.2-tests.patch
new file mode 100644
index 0000000000000..65d9c5f9f45b3
--- /dev/null
+++ b/dev-python/pydotplus/files/pydotplus-2.0.2-tests.patch
@@ -0,0 +1,17 @@
+--- a/test/pydot_unittest.py
++++ b/test/pydot_unittest.py
+@@ -142,6 +142,7 @@ class TestGraphAPI(unittest.TestCase):
+ self.assertEqual(g2.get_edges()[0].get_source(), node1)
+ self.assertEqual(g2.get_edges()[0].get_destination(), node2)
+
++ @unittest.skip(reason="Known to fail on Gentoo, reported upstream: https://github.com/carlos-jenkins/pydotplus/issues/22")
+ def test_graph_with_shapefiles(self):
+
+ shapefile_dir = os.path.join(TEST_DIR, 'from-past-to-future')
+@@ -225,6 +226,7 @@ class TestGraphAPI(unittest.TestCase):
+ def test_my_regression_tests(self):
+ self._render_and_compare_dot_files(MY_REGRESSION_TESTS_DIR)
+
++ @unittest.skip(reason="Known to fail on Gentoo, reported upstream: https://github.com/carlos-jenkins/pydotplus/issues/22")
+ def test_graphviz_regression_tests(self):
+ self._render_and_compare_dot_files(REGRESSION_TESTS_DIR)
diff --git a/dev-python/pydotplus/metadata.xml b/dev-python/pydotplus/metadata.xml
index 3f0fc2d5c2a5c..f90e593772216 100644
--- a/dev-python/pydotplus/metadata.xml
+++ b/dev-python/pydotplus/metadata.xml
@@ -10,8 +10,8 @@
Proxy Maintainers
- PyDotPlus is an improved version of the old pydot project that provides a Python
- Interface to Graphviz’s Dot language.
+ PyDotPlus is an improved version of the old pydot project that provides
+ a Python Interface to Graphviz’s Dot language.
pydotplus
diff --git a/dev-python/pydotplus/pydotplus-2.0.2.ebuild b/dev-python/pydotplus/pydotplus-2.0.2.ebuild
index f2a0a8effac26..c8aa79de634c1 100644
--- a/dev-python/pydotplus/pydotplus-2.0.2.ebuild
+++ b/dev-python/pydotplus/pydotplus-2.0.2.ebuild
@@ -1,38 +1,32 @@
# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=6
+EAPI=7
-PYTHON_COMPAT=( python3_6 )
+PYTHON_COMPAT=( python3_{7,8} )
inherit distutils-r1
DESCRIPTION="Improved version of the old pydot project"
-HOMEPAGE="http://pydotplus.readthedocs.org/"
+HOMEPAGE="https://pydotplus.readthedocs.org/"
SRC_URI="mirror://pypi/p/${PN}/${P}.tar.gz"
LICENSE="MIT"
SLOT="0"
KEYWORDS="~amd64 ~x86"
-IUSE=""
+IUSE="test"
+RESTRICT="!test? ( test )"
-DEPEND="dev-python/setuptools[${PYTHON_USEDEP}]"
-# test? (
-# dev-python/flake8[${PYTHON_USEDEP}]
-# dev-python/pytest[${PYTHON_USEDEP}]
-# dev-python/pytest-cov[${PYTHON_USEDEP}]
-# dev-python/sphinx[${PYTHON_USEDEP}]
-# dev-python/sphinx_rtd_theme[${PYTHON_USEDEP}]
-# dev-python/tox[${PYTHON_USEDEP}]
-# )
RDEPEND="
dev-python/pyparsing[${PYTHON_USEDEP}]
- "
+ media-gfx/graphviz
+"
+DEPEND="test? ( ${RDEPEND} )"
-#test phase curently disabled, waiting on upstream to include
-#the required files:
-#https://github.com/carlos-jenkins/pydotplus/issues/12
-#python_test() {
-# ${EPYTHON} -m unittest discover || die
-# tox
-#}
+PATCHES=( "${FILESDIR}/${P}-tests.patch" )
+
+python_test() {
+ pushd test > /dev/null || die
+ python pydot_unittest.py || die
+ popd > /dev/null || die
+}
diff --git a/profiles/package.mask b/profiles/package.mask
index 6a6adf308d845..f6552bb670307 100644
--- a/profiles/package.mask
+++ b/profiles/package.mask
@@ -293,7 +293,6 @@ dev-python/jplephem
dev-python/natgrid
dev-python/pcapy
dev-python/promises
-dev-python/pydotplus
dev-python/pyds9
dev-python/pyflann
dev-python/pygsl