From 910cd4cc0b656bf621d0c12c1b2a910aeed23d3b Mon Sep 17 00:00:00 2001
From: Bart Ribbers <bribbers@disroot.org>
Date: Wed, 13 May 2020 09:32:04 +0200
Subject: [PATCH] community/py3-graphviz: take over maintainership and upgrade
 to 0.14

---
 community/py3-graphviz/APKBUILD           | 19 +++++++++++--------
 community/py3-graphviz/use-std-mock.patch | 15 +++++++++++++++
 2 files changed, 26 insertions(+), 8 deletions(-)
 create mode 100644 community/py3-graphviz/use-std-mock.patch

diff --git a/community/py3-graphviz/APKBUILD b/community/py3-graphviz/APKBUILD
index 3eca52616549..d9edc1739e91 100644
--- a/community/py3-graphviz/APKBUILD
+++ b/community/py3-graphviz/APKBUILD
@@ -1,8 +1,8 @@
 # Contributor: Leonardo Arena <rnalrd@alpinelinux.org>
-# Maintainer:
+# Maintainer: Bart Ribbers <bribbers@disroot.org>
 pkgname=py3-graphviz
-pkgver=0.12
-pkgrel=1
+pkgver=0.14
+pkgrel=0
 pkgdesc="Simple interface for Graphviz"
 url="https://github.com/xflr6/graphviz"
 arch="noarch"
@@ -11,20 +11,23 @@ replaces="py-graphviz" # for backwards compatibility
 provides="py-graphviz=$pkgver-r$pkgrel" # for backwards compatibility
 depends="graphviz python3"
 makedepends="py3-setuptools"
-checkdepends="pytest py3-pytest-cov py3-mock py3-pytest-mock"
-source="$pkgname-$pkgver.tar.gz::https://github.com/xflr6/graphviz/archive/$pkgver.tar.gz"
-builddir="$srcdir"/graphviz-$pkgver
+checkdepends="pytest py3-pytest-cov py3-pytest-mock"
+source="https://github.com/xflr6/graphviz/archive/$pkgver/graphviz-$pkgver.tar.gz
+	use-std-mock.patch
+	"
+builddir="$srcdir/graphviz-$pkgver"
 
 build() {
 	python3 setup.py --quiet build
 }
 
 check() {
-	PYTHONPATH=. python3 run-tests.py
+	pytest
 }
 
 package() {
 	python3 setup.py --quiet install --prefix=/usr --root="$pkgdir"
 }
 
-sha512sums="e89af0320e26fd85c51461b5636aaa4e18dec2c8f62933a6aafa54c796258ffc08a6886790e03ed37d7d2897dc8683972b414f2be84468072801548450f524c5  py3-graphviz-0.12.tar.gz"
+sha512sums="075d6cec7cac127a284af23617a93057233021c8ed7fc0c1dccca81a60be30080d25cb0e45b7b64b2c065fb21df277551f81203a8427bc5c99d47652dd48d6f8  graphviz-0.14.tar.gz
+d84171748e36cb48c6c6fa38e0596b42946cee3ad3a3a6b607da4828e138f34656a40ca4d91ddcebb89669edec29a7dd4c227d13d3900c51b14bfa971f874f4f  use-std-mock.patch"
diff --git a/community/py3-graphviz/use-std-mock.patch b/community/py3-graphviz/use-std-mock.patch
new file mode 100644
index 000000000000..f073a104e8c4
--- /dev/null
+++ b/community/py3-graphviz/use-std-mock.patch
@@ -0,0 +1,15 @@
+Make Graphviz use the mock module from the Python standard library rather than the standalone one
+
+diff --git a/setup.cfg b/setup.cfg
+index 3802a41..f3a59b2 100644
+--- a/setup.cfg
++++ b/setup.cfg
+@@ -13,7 +13,7 @@ testpaths = README.rst docs graphviz tests
+ addopts =
+   --doctest-modules --doctest-glob='*.rst' --ignore=docs/conf.py
+   --cov --cov-report=term --cov-report=html
+-mock_use_standalone_module = true
++mock_use_standalone_module = false
+ log_cli = false
+ log_cli_level = DEBUG
+ log_file = test-log.txt
-- 
GitLab