about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/graphviz
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2021-09-08 17:57:14 +0000
committerAlyssa Ross <hi@alyssa.is>2021-09-13 11:31:47 +0000
commitee7984efa14902a2ddd820c937457667a4f40c6a (patch)
treec9c1d046733cefe5e21fdd8a52104175d47b2443 /nixpkgs/pkgs/development/python-modules/graphviz
parentffc9d4ba381da62fd08b361bacd1e71e2a3d934d (diff)
parentb3c692172e5b5241b028a98e1977f9fb12eeaf42 (diff)
downloadnixlib-ee7984efa14902a2ddd820c937457667a4f40c6a.tar
nixlib-ee7984efa14902a2ddd820c937457667a4f40c6a.tar.gz
nixlib-ee7984efa14902a2ddd820c937457667a4f40c6a.tar.bz2
nixlib-ee7984efa14902a2ddd820c937457667a4f40c6a.tar.lz
nixlib-ee7984efa14902a2ddd820c937457667a4f40c6a.tar.xz
nixlib-ee7984efa14902a2ddd820c937457667a4f40c6a.tar.zst
nixlib-ee7984efa14902a2ddd820c937457667a4f40c6a.zip
Merge commit 'b3c692172e5b5241b028a98e1977f9fb12eeaf42'
Diffstat (limited to 'nixpkgs/pkgs/development/python-modules/graphviz')
-rw-r--r--nixpkgs/pkgs/development/python-modules/graphviz/default.nix7
-rw-r--r--nixpkgs/pkgs/development/python-modules/graphviz/hardcode-graphviz-path.patch26
2 files changed, 18 insertions, 15 deletions
diff --git a/nixpkgs/pkgs/development/python-modules/graphviz/default.nix b/nixpkgs/pkgs/development/python-modules/graphviz/default.nix
index 0a2413e9d761..d0483864ff85 100644
--- a/nixpkgs/pkgs/development/python-modules/graphviz/default.nix
+++ b/nixpkgs/pkgs/development/python-modules/graphviz/default.nix
@@ -1,5 +1,6 @@
 { lib
 , buildPythonPackage
+, pythonOlder
 , fetchFromGitHub
 , substituteAll
 , graphviz
@@ -12,14 +13,16 @@
 
 buildPythonPackage rec {
   pname = "graphviz";
-  version = "0.16";
+  version = "0.17";
+
+  disabled = pythonOlder "3.6";
 
   # patch does not apply to PyPI tarball due to different line endings
   src = fetchFromGitHub {
     owner = "xflr6";
     repo = "graphviz";
     rev = version;
-    sha256 = "147vi60mi57z623lhllwwzczzicv2iwj1yrmllj5xx5788i73j6g";
+    sha256 = "sha256-K6z2C7hQH2A9bqgRR4MRqxVAH/k2NQBEelb2/6KDUr0=";
   };
 
   patches = [
diff --git a/nixpkgs/pkgs/development/python-modules/graphviz/hardcode-graphviz-path.patch b/nixpkgs/pkgs/development/python-modules/graphviz/hardcode-graphviz-path.patch
index fa2f634bbc29..ba25d54e3703 100644
--- a/nixpkgs/pkgs/development/python-modules/graphviz/hardcode-graphviz-path.patch
+++ b/nixpkgs/pkgs/development/python-modules/graphviz/hardcode-graphviz-path.patch
@@ -1,9 +1,9 @@
 diff --git a/graphviz/backend.py b/graphviz/backend.py
-index d2c4b97..f7175cd 100644
+index b66e616..3da4ef0 100644
 --- a/graphviz/backend.py
 +++ b/graphviz/backend.py
-@@ -122,7 +122,7 @@ def command(engine, format_, filepath=None, renderer=None, formatter=None):
-         raise ValueError('unknown formatter: %r' % formatter)
+@@ -124,7 +124,7 @@ def command(engine: str, format_: str, filepath=None,
+         raise ValueError(f'unknown formatter: {formatter!r}')
  
      output_format = [f for f in (format_, renderer, formatter) if f is not None]
 -    cmd = ['dot', '-K%s' % engine, '-T%s' % ':'.join(output_format)]
@@ -11,7 +11,7 @@ index d2c4b97..f7175cd 100644
  
      if filepath is None:
          rendered = None
-@@ -275,7 +275,7 @@ def unflatten(source,
+@@ -297,7 +297,7 @@ def unflatten(source: str,
      if fanout and stagger is None:
          raise RequiredArgumentError('fanout given without stagger')
  
@@ -20,8 +20,8 @@ index d2c4b97..f7175cd 100644
      if stagger is not None:
          cmd += ['-l', str(stagger)]
      if fanout:
-@@ -304,7 +304,7 @@ def version():
-         Graphviz Release version entry format
+@@ -332,7 +332,7 @@ def version() -> typing.Tuple[int, ...]:
+         Graphviz Release version entry format:
          https://gitlab.com/graphviz/graphviz/-/blob/f94e91ba819cef51a4b9dcb2d76153684d06a913/gen_version.py#L17-20
      """
 -    cmd = ['dot', '-V']
@@ -30,19 +30,19 @@ index d2c4b97..f7175cd 100644
                   stdout=subprocess.PIPE,
                   stderr=subprocess.STDOUT)
 diff --git a/tests/test_backend.py b/tests/test_backend.py
-index d10ef1a..e4aba58 100644
+index e0a0e1c..681f178 100644
 --- a/tests/test_backend.py
 +++ b/tests/test_backend.py
-@@ -52,7 +52,7 @@ def test_run_encoding_mocked(mocker, Popen, input=u'sp\xe4m', encoding='utf-8'):
+@@ -54,7 +54,7 @@ def test_run_encoding_mocked(mocker, Popen, input='sp\xe4m', encoding='utf-8'):
          m.decode.assert_called_once_with(encoding)
  
  
--@pytest.exe
+-@pytest.mark.exe
 +@pytest.mark.skip(reason='empty $PATH has no effect')
  @pytest.mark.usefixtures('empty_path')
  @pytest.mark.parametrize('func, args', [
      (render, ['dot', 'pdf', 'nonfilepath']),
-@@ -146,7 +146,7 @@ def test_render_mocked(capsys, mocker, Popen, quiet):  # noqa: N803
+@@ -148,7 +148,7 @@ def test_render_mocked(capsys, mocker, Popen, quiet):  # noqa: N803
  
      assert render('dot', 'pdf', 'nonfilepath', quiet=quiet) == 'nonfilepath.pdf'
  
@@ -51,8 +51,8 @@ index d10ef1a..e4aba58 100644
                                    stdout=subprocess.PIPE,
                                    stderr=subprocess.PIPE,
                                    cwd=None, startupinfo=mocker.ANY)
-@@ -208,7 +208,7 @@ def test_pipe_pipe_invalid_data_mocked(mocker, py2, Popen, quiet):  # noqa: N803
-     assert e.value.stdout is mocker.sentinel.out
+@@ -211,7 +211,7 @@ def test_pipe_pipe_invalid_data_mocked(mocker, Popen, quiet):  # noqa: N803
+     assert e.value.stdout is out
      e.value.stdout = mocker.sentinel.new_stdout
      assert e.value.stdout is mocker.sentinel.new_stdout
 -    Popen.assert_called_once_with(['dot', '-Kdot', '-Tpng'],
@@ -62,7 +62,7 @@ index d10ef1a..e4aba58 100644
                                    stderr=subprocess.PIPE,
 @@ -231,7 +231,7 @@ def test_pipe_mocked(capsys, mocker, Popen, quiet):  # noqa: N803
  
-     assert pipe('dot', 'png', b'nongraph', quiet=quiet) is mocker.sentinel.out
+     assert pipe('dot', 'png', b'nongraph', quiet=quiet) == b'stdout'
  
 -    Popen.assert_called_once_with(['dot', '-Kdot', '-Tpng'],
 +    Popen.assert_called_once_with(['@graphviz@/bin/dot', '-Kdot', '-Tpng'],