git.iko.soy/typeable/nixpkgs
on master help sign in
python3Packages.pygraphviz: 1.6 -> 1.7 (#113040)
commit5a0fc991018d7015e102ecffd3e142da631e7fdc authorRobert Schütz <dev@schuetz-co.de> dateSun 28 Feb 2021, 12:36 (6 years ago) parentd032867
3 files changed+38−30
pkgs/development/python-modules/pygraphviz/default.nix+25−17 pkgs/development/python-modules/pygraphviz/graphviz-path.patch−13 pkgs/development/python-modules/pygraphviz/path.patch+13
pkgs/development/python-modules/pygraphviz/default.nix+25−17
@@ -1,40 +1,48 @@
1−{ lib, buildPythonPackage, isPy3k, fetchPypi, substituteAll, graphviz
2−, pkg-config, doctest-ignore-unicode, mock, nose }:
1+{ lib
2+, buildPythonPackage
3+, isPy3k
4+, fetchPypi
5+, substituteAll
6+, graphviz
7+, coreutils
8+, pkg-config
9+, pytest
10+}:
311
412buildPythonPackage rec {
513 pname = "pygraphviz";
6− version = "1.6";
14+ version = "1.7";
715
816 disabled = !isPy3k;
917
1018 src = fetchPypi {
1119 inherit pname version;
12− sha256 = "411ae84a5bc313e3e1523a1cace59159f512336318a510573b47f824edef8860";
20+ sha256 = "a7bec6609f37cf1e64898c59f075afd659106cf9356c5f387cecaa2e0cdb2304";
1321 extension = "zip";
1422 };
1523
16− nativeBuildInputs = [ pkg-config ];
17− buildInputs = [ graphviz ];
18− checkInputs = [ doctest-ignore-unicode mock nose ];
19−
2024 patches = [
21− # pygraphviz depends on graphviz being in PATH. This patch always prepends
22− # graphviz to PATH.
25+ # pygraphviz depends on graphviz executables and wc being in PATH
2326 (substituteAll {
24− src = ./graphviz-path.patch;
25− inherit graphviz;
27+ src = ./path.patch;
28+ path = lib.makeBinPath [ graphviz coreutils ];
2629 })
2730 ];
2831
29− # The tests are currently failing because of a bug in graphviz 2.40.1.
30− # Upstream does not want to skip the relevant tests:
31− # https://github.com/pygraphviz/pygraphviz/pull/129
32− doCheck = false;
32+ nativeBuildInputs = [ pkg-config ];
33+
34+ buildInputs = [ graphviz ];
35+
36+ checkInputs = [ pytest ];
37+
38+ checkPhase = ''
39+ pytest --pyargs pygraphviz
40+ '';
3341
3442 meta = with lib; {
3543 description = "Python interface to Graphviz graph drawing package";
3644 homepage = "https://github.com/pygraphviz/pygraphviz";
3745 license = licenses.bsd3;
38− maintainers = with maintainers; [ matthiasbeyer ];
46+ maintainers = with maintainers; [ matthiasbeyer dotlambda ];
3947 };
4048}
pkgs/development/python-modules/pygraphviz/graphviz-path.patchdeleted−13
@@ -1,13 +0,0 @@
1−diff --git a/pygraphviz/agraph.py b/pygraphviz/agraph.py
2−index 8f72024..2d8358e 100644
3−--- a/pygraphviz/agraph.py
4−+++ b/pygraphviz/agraph.py
5−@@ -1557,7 +1557,7 @@ class AGraph(object):
6− import os
7− import glob
8−
9−- paths = os.environ["PATH"]
10−+ paths = '@graphviz@/bin:' + os.environ["PATH"]
11− if os.name == "nt":
12− exe = ".exe"
13− else:
pkgs/development/python-modules/pygraphviz/path.patchnew file+13
@@ -0,0 +1,13 @@
1+diff --git a/pygraphviz/agraph.py b/pygraphviz/agraph.py
2+index d539ba0..f5bac3f 100644
3+--- a/pygraphviz/agraph.py
4++++ b/pygraphviz/agraph.py
5+@@ -1792,7 +1792,7 @@ class AGraph:
6+ if platform.system() == "Windows":
7+ name += ".exe"
8+
9+- paths = os.environ["PATH"]
10++ paths = '@path@'
11+ for path in paths.split(os.pathsep):
12+ match = glob.glob(os.path.join(path, name))
13+ if match: