commit:     6af275b39b57cc7e008d7c6c4e816948b8f555ff
Author:     Horea Christian <chr <AT> chymera <DOT> eu>
AuthorDate: Sun Aug 23 07:25:44 2020 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Sat Sep  5 07:25:28 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6af275b3

dev-python/pydotplus: PYTHON_COMPAT and EAPI update

Bug: https://bugs.gentoo.org/695996
Package-Manager: Portage-3.0.2, Repoman-2.3.23
Signed-off-by: Horea Christian <chr <AT> chymera.eu>
Closes: https://github.com/gentoo/gentoo/pull/17228
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 .../pydotplus/files/pydotplus-2.0.2-tests.patch    | 17 +++++++++
 dev-python/pydotplus/metadata.xml                  |  4 +--
 dev-python/pydotplus/pydotplus-2.0.2.ebuild        | 40 +++++++++-------------
 profiles/package.mask                              |  1 -
 4 files changed, 36 insertions(+), 26 deletions(-)

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 00000000000..65d9c5f9f45
--- /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 3f0fc2d5c2a..f90e5937722 100644
--- a/dev-python/pydotplus/metadata.xml
+++ b/dev-python/pydotplus/metadata.xml
@@ -10,8 +10,8 @@
                <name>Proxy Maintainers</name>
        </maintainer>
        <longdescription lang="en">
-               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.
        </longdescription>
        <upstream>
                <remote-id type="pypi">pydotplus</remote-id>

diff --git a/dev-python/pydotplus/pydotplus-2.0.2.ebuild 
b/dev-python/pydotplus/pydotplus-2.0.2.ebuild
index f2a0a8effac..c8aa79de634 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=""
-
-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}]
-#              )
+IUSE="test"
+RESTRICT="!test? ( test )"
+
 RDEPEND="
        dev-python/pyparsing[${PYTHON_USEDEP}]
-       "
-
-#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
-#}
+       media-gfx/graphviz
+"
+DEPEND="test? ( ${RDEPEND} )"
+
+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 6a6adf308d8..f6552bb6703 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

Reply via email to