Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 60799d134cb7
Choose a base ref
...
head repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: a824dc6bdd9a
Choose a head ref
  • 4 commits
  • 5 files changed
  • 1 contributor

Commits on Jan 18, 2021

  1. Copy the full SHA
    762622c View commit details
  2. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    b17123a View commit details
  3. pythonPackages.pydotplus: drop

    It is no longer maintained whereas pydot is.
    dotlambda committed Jan 18, 2021
    Copy the full SHA
    cfa8f9a View commit details

Commits on Jan 20, 2021

  1. Merge pull request #109507 from dotlambda/python-graphviz-0.16

    pythonPackages.graphviz: 0.14.1 -> 0.16
    dotlambda authored Jan 20, 2021
    Copy the full SHA
    a824dc6 View commit details
12 changes: 4 additions & 8 deletions pkgs/development/python-modules/graphviz/default.nix
Original file line number Diff line number Diff line change
@@ -6,21 +6,21 @@
, makeFontsConf
, freefont_ttf
, mock
, pytest
, pytestCheckHook
, pytest-mock
, pytestcov
}:

buildPythonPackage rec {
pname = "graphviz";
version = "0.14.1";
version = "0.16";

# patch does not apply to PyPI tarball due to different line endings
src = fetchFromGitHub {
owner = "xflr6";
repo = "graphviz";
rev = version;
sha256 = "02bdiac5x93f2mjw5kpgs6kv81hzg07y0mw1nxvhyg8aignzmh3c";
sha256 = "147vi60mi57z623lhllwwzczzicv2iwj1yrmllj5xx5788i73j6g";
};

patches = [
@@ -35,11 +35,7 @@ buildPythonPackage rec {
fontDirectories = [ freefont_ttf ];
};

checkInputs = [ mock pytest pytest-mock pytestcov ];

checkPhase = ''
pytest
'';
checkInputs = [ mock pytestCheckHook pytest-mock pytestcov ];

meta = with lib; {
description = "Simple Python interface for Graphviz";
Original file line number Diff line number Diff line change
@@ -1,30 +1,39 @@
diff --git a/graphviz/backend.py b/graphviz/backend.py
index 6f4cc0c..bc4781e 100644
index d2c4b97..f7175cd 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)

output_format = [f for f in (format_, renderer, formatter) if f is not None]
- cmd = [engine, '-T%s' % ':'.join(output_format)]
+ cmd = [os.path.join('@graphviz@/bin', engine), '-T%s' % ':'.join(output_format)]
- cmd = ['dot', '-K%s' % engine, '-T%s' % ':'.join(output_format)]
+ cmd = ['@graphviz@/bin/dot', '-K%s' % engine, '-T%s' % ':'.join(output_format)]

if filepath is None:
rendered = None
@@ -255,7 +255,7 @@ def version():
subprocess.CalledProcessError: If the exit status is non-zero.
RuntimmeError: If the output cannot be parsed into a version number.
@@ -275,7 +275,7 @@ def unflatten(source,
if fanout and stagger is None:
raise RequiredArgumentError('fanout given without stagger')

- cmd = ['unflatten']
+ cmd = ['@graphviz@/bin/unflatten']
if stagger is not None:
cmd += ['-l', str(stagger)]
if fanout:
@@ -304,7 +304,7 @@ def version():
Graphviz Release version entry format
https://gitlab.com/graphviz/graphviz/-/blob/f94e91ba819cef51a4b9dcb2d76153684d06a913/gen_version.py#L17-20
"""
- cmd = ['dot', '-V']
+ cmd = ['@graphviz@/bin/dot', '-V']
out, _ = run(cmd, check=True, encoding='ascii',
stdout=subprocess.PIPE,
stderr=subprocess.STDOUT)
diff --git a/tests/test_backend.py b/tests/test_backend.py
index 9f307f5..e43bf5b 100644
index d10ef1a..e4aba58 100644
--- a/tests/test_backend.py
+++ b/tests/test_backend.py
@@ -50,7 +50,7 @@ def test_run_encoding_mocked(mocker, Popen, input=u'sp\xe4m', encoding='utf-8'):
@@ -52,7 +52,7 @@ def test_run_encoding_mocked(mocker, Popen, input=u'sp\xe4m', encoding='utf-8'):
m.decode.assert_called_once_with(encoding)


@@ -33,34 +42,43 @@ index 9f307f5..e43bf5b 100644
@pytest.mark.usefixtures('empty_path')
@pytest.mark.parametrize('func, args', [
(render, ['dot', 'pdf', 'nonfilepath']),
@@ -143,7 +143,7 @@ def test_render_mocked(capsys, mocker, Popen, quiet): # noqa: N803
@@ -146,7 +146,7 @@ def test_render_mocked(capsys, mocker, Popen, quiet): # noqa: N803

assert render('dot', 'pdf', 'nonfilepath', quiet=quiet) == 'nonfilepath.pdf'

- Popen.assert_called_once_with(['dot', '-Tpdf', '-O', 'nonfilepath'],
+ Popen.assert_called_once_with(['@graphviz@/bin/dot', '-Tpdf', '-O', 'nonfilepath'],
- Popen.assert_called_once_with(['dot', '-Kdot', '-Tpdf', '-O', 'nonfilepath'],
+ Popen.assert_called_once_with(['@graphviz@/bin/dot', '-Kdot', '-Tpdf', '-O', 'nonfilepath'],
stdout=subprocess.PIPE,
stderr=subprocess.PIPE,
cwd=None, startupinfo=mocker.ANY)
@@ -201,7 +201,7 @@ def test_pipe_pipe_invalid_data_mocked(mocker, py2, Popen, quiet): # noqa: N803
@@ -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
e.value.stdout = mocker.sentinel.new_stdout
assert e.value.stdout is mocker.sentinel.new_stdout
- Popen.assert_called_once_with(['dot', '-Tpng'],
+ Popen.assert_called_once_with(['@graphviz@/bin/dot', '-Tpng'],
- Popen.assert_called_once_with(['dot', '-Kdot', '-Tpng'],
+ Popen.assert_called_once_with(['@graphviz@/bin/dot', '-Kdot', '-Tpng'],
stdin=subprocess.PIPE,
stdout=subprocess.PIPE,
stderr=subprocess.PIPE,
@@ -224,7 +224,7 @@ def test_pipe_mocked(capsys, mocker, Popen, quiet): # noqa: N803
@@ -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

- Popen.assert_called_once_with(['dot', '-Tpng'],
+ Popen.assert_called_once_with(['@graphviz@/bin/dot', '-Tpng'],
- Popen.assert_called_once_with(['dot', '-Kdot', '-Tpng'],
+ Popen.assert_called_once_with(['@graphviz@/bin/dot', '-Kdot', '-Tpng'],
stdin=subprocess.PIPE,
stdout=subprocess.PIPE,
stderr=subprocess.PIPE,
@@ -259,7 +259,7 @@ def test_unflatten_mocked(capsys, mocker, Popen):
proc.communicate.return_value = (b'nonresult', b'')

assert unflatten('nonsource') == 'nonresult'
- Popen.assert_called_once_with(['unflatten'],
+ Popen.assert_called_once_with(['@graphviz@/bin/unflatten'],
stdin=subprocess.PIPE,
stdout=subprocess.PIPE,
stderr=subprocess.PIPE,
@@ -250,7 +250,7 @@ def test_version_parsefail_mocked(mocker, Popen): # noqa: N803
@@ -290,7 +290,7 @@ def test_version_parsefail_mocked(mocker, Popen): # noqa: N803
with pytest.raises(RuntimeError, match=r'nonversioninfo'):
version()

@@ -69,7 +87,7 @@ index 9f307f5..e43bf5b 100644
stdout=subprocess.PIPE,
stderr=subprocess.STDOUT,
startupinfo=mocker.ANY)
@@ -269,7 +269,7 @@ def test_version_mocked(mocker, Popen, stdout, expected): # noqa: N803
@@ -312,7 +312,7 @@ def test_version_mocked(mocker, Popen, stdout, expected): # noqa: N803

assert version() == expected

14 changes: 0 additions & 14 deletions pkgs/development/python-modules/prov/default.nix
Original file line number Diff line number Diff line change
@@ -4,11 +4,8 @@
, lxml
, networkx
, dateutil
, six
, pydotplus
, rdflib
, pydot
, glibcLocales
}:

buildPythonPackage rec {
@@ -20,28 +17,17 @@ buildPythonPackage rec {
sha256 = "b6438f2195ecb9f6e8279b58971e02bc51814599b5d5383366eef91d867422ee";
};

prePatch = ''
substituteInPlace setup.py --replace "six==1.10.0" "six>=1.10.0"
'';

propagatedBuildInputs = [
lxml
networkx
dateutil
six
pydotplus
rdflib
];

checkInputs = [
pydot
glibcLocales
];

preCheck = ''
export LC_ALL="en_US.utf-8"
'';

meta = with lib; {
description = "A Python library for W3C Provenance Data Model (PROV)";
homepage = "https://github.com/trungdong/prov";
28 changes: 0 additions & 28 deletions pkgs/development/python-modules/pydotplus/default.nix

This file was deleted.

2 changes: 0 additions & 2 deletions pkgs/top-level/python-packages.nix
Original file line number Diff line number Diff line change
@@ -5278,8 +5278,6 @@ in {

pydot = callPackage ../development/python-modules/pydot { inherit (pkgs) graphviz; };

pydotplus = callPackage ../development/python-modules/pydotplus { };

pydrive = callPackage ../development/python-modules/pydrive { };

pydsdl = callPackage ../development/python-modules/pydsdl { };