summaryrefslogtreecommitdiff
path: root/dev-python/graphviz
diff options
context:
space:
mode:
Diffstat (limited to 'dev-python/graphviz')
-rw-r--r--dev-python/graphviz/Manifest1
-rw-r--r--dev-python/graphviz/files/graphviz-0.21_fix_python3_14_tests.patch23
-rw-r--r--dev-python/graphviz/graphviz-0.21.ebuild54
-rw-r--r--dev-python/graphviz/metadata.xml15
4 files changed, 93 insertions, 0 deletions
diff --git a/dev-python/graphviz/Manifest b/dev-python/graphviz/Manifest
new file mode 100644
index 000000000000..f8b482a2a4d1
--- /dev/null
+++ b/dev-python/graphviz/Manifest
@@ -0,0 +1 @@
+DIST graphviz-0.21.gh.tar.gz 190888 BLAKE2B 4aa19b6e5660901346d9a46a30241c984e4ea66c1fea3884e15e872d802e565a2d63903fd08a4fb1b4c0183032ab2f5a2b82f7634bdc9369a2a00f46afe681e8 SHA512 012c80c8f70eddcd8ada5d9f047d877e9078ad338df95aa91057df545e9d0939788c82115f6b251ff197a4868c2e2543a8205e64c83c3d64f5a26e7ec55c02bd
diff --git a/dev-python/graphviz/files/graphviz-0.21_fix_python3_14_tests.patch b/dev-python/graphviz/files/graphviz-0.21_fix_python3_14_tests.patch
new file mode 100644
index 000000000000..1073c6362c42
--- /dev/null
+++ b/dev-python/graphviz/files/graphviz-0.21_fix_python3_14_tests.patch
@@ -0,0 +1,23 @@
+From 7e0fae6d28792a628a25cadd4ec1582c7351a7a3 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Mark=C3=A9ta=20Cal=C3=A1bkov=C3=A1?=
+ <meggy.calabkova@gmail.com>
+Date: Tue, 9 Sep 2025 16:26:28 +0200
+Subject: [PATCH] fix tests on Python 3.14
+
+---
+ tests/test_quoting.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/tests/test_quoting.py b/tests/test_quoting.py
+index 3692d38a12..9dbe45ca50 100644
+--- a/tests/test_quoting.py
++++ b/tests/test_quoting.py
+@@ -17,7 +17,7 @@ def test_deprecated_escape(recwarn, char):
+ assert len(recwarn) == 1
+ w = recwarn.pop(DeprecationWarning if sys.version_info < (3, 12)
+ else SyntaxWarning)
+- assert str(w.message).startswith('invalid escape sequence')
++ assert 'invalid escape sequence' in str(w.message)
+
+ assert escape == f'\\{char}'
+ assert quoting.quote(escape) == f'"\\{char}"'
diff --git a/dev-python/graphviz/graphviz-0.21.ebuild b/dev-python/graphviz/graphviz-0.21.ebuild
new file mode 100644
index 000000000000..1be647fe3835
--- /dev/null
+++ b/dev-python/graphviz/graphviz-0.21.ebuild
@@ -0,0 +1,54 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DISTUTILS_USE_PEP517=setuptools
+PYTHON_COMPAT=( python3_{13..14} )
+
+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"
+SLOT="0"
+KEYWORDS="amd64 ~arm64 ~riscv x86"
+
+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_14_tests.patch" )
+
+distutils_enable_tests pytest
+
+src_prepare() {
+ distutils-r1_src_prepare
+ sed -i -e '/--cov/d' pyproject.toml || die
+}
+
+python_test() {
+ local -x PYTEST_DISABLE_PLUGIN_AUTOLOAD=1
+ local EPYTEST_IGNORE=(
+ # workaround https://github.com/pytest-dev/pytest/issues/12123
+ tests/backend/conftest.py
+ tests/conftest.py
+ )
+ epytest -p pytest_mock
+}
diff --git a/dev-python/graphviz/metadata.xml b/dev-python/graphviz/metadata.xml
new file mode 100644
index 000000000000..93f49d04c956
--- /dev/null
+++ b/dev-python/graphviz/metadata.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://docs.baldeagleos.com/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>python@gentoo.org</email>
+ <name>Python</name>
+ </maintainer>
+ <longdescription>
+ This package facilitates the creation and rendering of graph
+ descriptions in the DOT language of the Graphviz graph drawing
+ software (repo) from Python.
+ </longdescription>
+ <stabilize-allarches />
+ <origin>baldeagleos-repo</origin>
+</pkgmetadata>