Merge pull request #296786 from dotlambda/python3Packages.graphviz

python311Packages.graphviz: 0.20.1 -> 0.20.2
This commit is contained in:
Robert Schütz 2024-04-24 01:44:53 +00:00 committed by GitHub
commit b471f1b0c8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 11 additions and 18 deletions

View File

@ -3,7 +3,6 @@
, buildPythonPackage
, pythonOlder
, fetchFromGitHub
, fetchpatch
, substituteAll
, graphviz-nox
, xdg-utils
@ -18,17 +17,17 @@
buildPythonPackage rec {
pname = "graphviz";
version = "0.20.1";
version = "0.20.2";
pyproject = true;
disabled = pythonOlder "3.7";
disabled = pythonOlder "3.8";
# patch does not apply to PyPI tarball due to different line endings
src = fetchFromGitHub {
owner = "xflr6";
repo = "graphviz";
rev = version;
hash = "sha256-plhWG9mE9DoTMg7mWCvFLAgtBx01LAgJ0gQ/mqBU3yc=";
hash = "sha256-q5y4QPBCtA1kMhxbOECodSeubj2bULnnNDrZZfxiry4=";
};
patches = [
@ -37,12 +36,6 @@ buildPythonPackage rec {
graphviz = graphviz-nox;
xdgutils = xdg-utils;
})
# https://github.com/xflr6/graphviz/issues/209
(fetchpatch {
name = "fix-tests-with-python312.patch";
url = "https://github.com/xflr6/graphviz/commit/5ce9fc5de4f2284baa27d7a8d68ab0885d032868.patch";
hash = "sha256-jREPACSc4aoHY3G+39e8Axqajw4eeKkAeVu2s40v1nI=";
})
];
postPatch = ''

View File

@ -1,5 +1,5 @@
diff --git a/graphviz/backend/dot_command.py b/graphviz/backend/dot_command.py
index 60654bd..2c62b47 100644
index 3a62a85..a38bb9b 100644
--- a/graphviz/backend/dot_command.py
+++ b/graphviz/backend/dot_command.py
@@ -9,7 +9,7 @@ from .. import parameters
@ -38,20 +38,20 @@ index fde74a6..6f29b68 100644
kwargs = {'stderr': subprocess.DEVNULL} if quiet else {}
subprocess.Popen(cmd, **kwargs)
diff --git a/tests/_common.py b/tests/_common.py
index 87b4cbd..4188beb 100644
index edc1309..42d730c 100644
--- a/tests/_common.py
+++ b/tests/_common.py
@@ -14,9 +14,9 @@ __all__ = ['EXPECTED_DOT_BINARY', 'EXPECTED_UNFLATTEN_BINARY',
@@ -14,9 +14,9 @@ __all__ = ['EXPECTED_DOT_BINARY',
'as_cwd',
'check_startupinfo', 'StartupinfoMatcher']
-EXPECTED_DOT_BINARY = _compat.make_subprocess_arg(pathlib.Path('dot'))
+EXPECTED_DOT_BINARY = _compat.make_subprocess_arg(pathlib.Path('@graphviz@/bin/dot'))
-EXPECTED_DOT_BINARY = pathlib.Path('dot')
+EXPECTED_DOT_BINARY = pathlib.Path('@graphviz@/bin/dot')
-EXPECTED_UNFLATTEN_BINARY = _compat.make_subprocess_arg(pathlib.Path('unflatten'))
+EXPECTED_UNFLATTEN_BINARY = _compat.make_subprocess_arg(pathlib.Path('@graphviz@/bin/unflatten'))
-EXPECTED_UNFLATTEN_BINARY = pathlib.Path('unflatten')
+EXPECTED_UNFLATTEN_BINARY = pathlib.Path('@graphviz@/bin/unflatten')
EXPECTED_DEFAULT_ENCODING = 'utf-8'
EXPECTED_DEFAULT_ENGINE = 'dot'
diff --git a/tests/backend/test_execute.py b/tests/backend/test_execute.py
index 2cb853a..8093dfe 100644