summaryrefslogtreecommitdiff
path: root/dev-python/graphviz
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2023-10-27 08:42:41 +0100
committerV3n3RiX <venerix@koprulu.sector>2023-10-27 08:42:41 +0100
commit0fcaac21e786bd7911b1e8f436cd885c5e2f6437 (patch)
treeba392915815492b0ce486fc0e3ad5afb4a849b6f /dev-python/graphviz
parente30edd47e1804bf3ed1ea7be2eac67f4b8cd9f38 (diff)
gentoo auto-resync : 27:10:2023 - 08:42:41
Diffstat (limited to 'dev-python/graphviz')
-rw-r--r--dev-python/graphviz/Manifest4
-rw-r--r--dev-python/graphviz/files/graphviz-0.20.1_fix_python3_12_test_deprecated_escape.patch30
-rw-r--r--dev-python/graphviz/graphviz-0.20.1-r1.ebuild53
-rw-r--r--dev-python/graphviz/metadata.xml1
4 files changed, 87 insertions, 1 deletions
diff --git a/dev-python/graphviz/Manifest b/dev-python/graphviz/Manifest
index 757bf789b3a5..081d4e58cff3 100644
--- a/dev-python/graphviz/Manifest
+++ b/dev-python/graphviz/Manifest
@@ -1,3 +1,5 @@
+AUX graphviz-0.20.1_fix_python3_12_test_deprecated_escape.patch 997 BLAKE2B f78c3dfbee7325bb5d577e648f00712c4bb596a8f1e08baa6dda83089b35e6dfebb1487f828f61b8f689726167369c30cb5f37a557b6a3906f6bb8051e9ccf69 SHA512 ee24cb82038267c2dd6b49db12d5dfdca2c2d5eabbb2e357669c9535c009e5e69c13a116d424cb32f47123c5cdfce445b6e0664cf8a3fd9170df1096f214dc5d
DIST graphviz-0.20.1.gh.tar.gz 188952 BLAKE2B 65d0b993e01492894b6d245c0869412b4956e5d55f9d8d490505c8f3477dc5ab98739cf0bf1aa1a15c4bacb2db4c2807659ce410ca65503c5876ffdc278e959f SHA512 34d340469856777f03b9c9e6d28f232908797bc1456a5b50104dd2f7dc8b7488afc7b29a564d57707ae96f3291f5ae90b8140ab64e378b82f271b5521763fb55
+EBUILD graphviz-0.20.1-r1.ebuild 1109 BLAKE2B dff4260df3b918da5f912d11065e5f56373d496addccd171054f8a7a00c959279eab940b96a4fe15a2e6dbcfcd13dd4b0c39d18d7380e334ba37286237e0d3d4 SHA512 0287b0614d859f3f77236f48571b26dcf613ffb82700613891173ec2d99e42d48caf4d17afa272a517168ce82a84340486ebd93d4dfebe26b138c1dad76eb1f8
EBUILD graphviz-0.20.1.ebuild 994 BLAKE2B b2f309ba44116afb4b112dfad14c8d3bb7f9ba98c18411fb0029d9e506c21bcf514bfa898e7043d6a2c73420b88e0da580a8dce16af9538b62b1f7a6dc0d8e77 SHA512 ef47cb2203eb12fabdf388ea3c780623ec1526140b22b807d49cbd55a6d5f12b9b743f5d5ae6eb5ebb914ed1f77c1423fcbbcfefeed6c01753dd7f5cd2d11267
-MISC metadata.xml 553 BLAKE2B d974f24c488a83d7c1510825d5e157644a4df70113af1283224a847d1cce2535ff4cb0633833a8671f6508fdd38c9079bc21239fdc1d1e9ac85f2ad08ea3a297 SHA512 72d2ce4887aa23136d689bf51b94f17ea3c8803464f623b0f4380381b9639a15a34858f26f129d5db2025d2ccda82dc80f22f5984ef58cffdf4dfcd7b8c51127
+MISC metadata.xml 609 BLAKE2B 782098a112f4c30ee297b068678c457454843e8ab52fe0ac8e545197f3799a4da13a19b0b3658dd2896dedc2ae3ba7cefb4281185d27fc806afe0f38b3c206b0 SHA512 d67fa7026a4b9e03f208709ce9f7b63daa41eaa5432fd0ec70abd11cbf78fd166fe2ef2990ce051f3a296b37bd3cb6588a32505282da0bb2fd2d096718982dfb
diff --git a/dev-python/graphviz/files/graphviz-0.20.1_fix_python3_12_test_deprecated_escape.patch b/dev-python/graphviz/files/graphviz-0.20.1_fix_python3_12_test_deprecated_escape.patch
new file mode 100644
index 000000000000..0193ef928775
--- /dev/null
+++ b/dev-python/graphviz/files/graphviz-0.20.1_fix_python3_12_test_deprecated_escape.patch
@@ -0,0 +1,30 @@
+From 5ce9fc5de4f2284baa27d7a8d68ab0885d032868 Mon Sep 17 00:00:00 2001
+From: Sebastian Bank <sebastian.bank@uni-leipzig.de>
+Date: Tue, 24 Oct 2023 20:39:52 +0200
+Subject: [PATCH] expect SyntaxWarning in test_deprecated_escape() under Python
+ 3.12
+
+https://docs.python.org/3.12/whatsnew/3.12.html#other-language-changes
+---
+ tests/test_quoting.py | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/tests/test_quoting.py b/tests/test_quoting.py
+index e4ece573bd..3692d38a12 100644
+--- a/tests/test_quoting.py
++++ b/tests/test_quoting.py
+@@ -1,3 +1,4 @@
++import sys
+ import warnings
+
+ import pytest
+@@ -14,7 +15,8 @@ def test_deprecated_escape(recwarn, char):
+ escape = eval(rf'"\{char}"')
+
+ assert len(recwarn) == 1
+- w = recwarn.pop(DeprecationWarning)
++ w = recwarn.pop(DeprecationWarning if sys.version_info < (3, 12)
++ else SyntaxWarning)
+ assert str(w.message).startswith('invalid escape sequence')
+
+ assert escape == f'\\{char}'
diff --git a/dev-python/graphviz/graphviz-0.20.1-r1.ebuild b/dev-python/graphviz/graphviz-0.20.1-r1.ebuild
new file mode 100644
index 000000000000..8757908d0fc5
--- /dev/null
+++ b/dev-python/graphviz/graphviz-0.20.1-r1.ebuild
@@ -0,0 +1,53 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DISTUTILS_USE_PEP517=setuptools
+PYTHON_COMPAT=( python3_{10..12} )
+
+inherit distutils-r1
+
+DESCRIPTION="Simple Python interface for Graphviz"
+HOMEPAGE="
+ https://graphviz.readthedocs.io/
+ https://github.com/xflr6/graphviz/
+ https://pypi.org/project/graphviz/
+"
+SRC_URI="
+ https://github.com/xflr6/graphviz/archive/${PV}.tar.gz
+ -> ${P}.gh.tar.gz
+"
+
+LICENSE="MIT"
+KEYWORDS="amd64 ~riscv x86 ~amd64-linux ~x86-linux"
+SLOT="0"
+
+RDEPEND="
+ media-gfx/graphviz
+"
+BDEPEND="
+ test? (
+ >=dev-python/mock-2.0.0[${PYTHON_USEDEP}]
+ >=dev-python/pytest-mock-1.8[${PYTHON_USEDEP}]
+ media-gfx/graphviz[gts,pdf]
+ )
+"
+
+PATCHES="
+ ${FILESDIR}/${P}_fix_python3_12_test_deprecated_escape.patch
+"
+
+distutils_enable_tests pytest
+
+src_prepare() {
+ sed -e 's:license_file:license_files:' \
+ -e 's:--cov --cov-report=term --cov-report=html::' \
+ -i setup.cfg || die
+ distutils-r1_src_prepare
+}
+
+python_test() {
+ "${EPYTHON}" run-tests.py -vv -ra -l -Wdefault -p no:xdoctest ||
+ die "Tests failed with ${EPYTHON}"
+}
diff --git a/dev-python/graphviz/metadata.xml b/dev-python/graphviz/metadata.xml
index b806233b4cf6..a16a2d40fe06 100644
--- a/dev-python/graphviz/metadata.xml
+++ b/dev-python/graphviz/metadata.xml
@@ -13,5 +13,6 @@
<stabilize-allarches/>
<upstream>
<remote-id type="pypi">graphviz</remote-id>
+ <remote-id type="github">xflr6/graphviz</remote-id>
</upstream>
</pkgmetadata>