Commit 39c11f58 authored by Robert Schütz's avatar Robert Schütz
Browse files
parent 80dbe60a
Loading
Loading
Loading
Loading
+3 −10
Original line number Diff line number Diff line
@@ -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 = ''
+8 −8
Original line number Diff line number Diff line
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