diff options
| author | github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> | 2021-11-21 06:01:53 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-11-21 06:01:53 +0000 |
| commit | daffc694ef4e4d4d92cc75ff96207c34cf09eeb4 (patch) | |
| tree | 1f8e6944220ea99048872a192e7a3a65cfdf82c2 /pkgs/development/python-modules | |
| parent | 197135904fe611b380aaa15808df1f5bd6978b36 (diff) | |
| parent | 6ad93ecdbb115566d66b7a04b914e7ac3d780cd9 (diff) | |
Merge staging-next into staging
Diffstat (limited to 'pkgs/development/python-modules')
5 files changed, 78 insertions, 12 deletions
diff --git a/pkgs/development/python-modules/envisage/default.nix b/pkgs/development/python-modules/envisage/default.nix index 20051804328b..b8513fd1d9ae 100644 --- a/pkgs/development/python-modules/envisage/default.nix +++ b/pkgs/development/python-modules/envisage/default.nix @@ -1,7 +1,12 @@ -{ lib, fetchPypi, isPy27 +{ lib +, fetchPypi +, isPy27 , buildPythonPackage -, traits, apptools, pytestCheckHook -, ipykernel, ipython, setuptools +, traits +, apptools +, pytestCheckHook +, ipython +, setuptools }: buildPythonPackage rec { @@ -15,6 +20,8 @@ buildPythonPackage rec { sha256 = "8864c29aa344f7ac26eeb94788798f2d0cc791dcf95c632da8d79ebc580e114c"; }; + # for the optional dependency ipykernel, only versions < 6 are + # supported, so it's not included in the tests, and not propagated propagatedBuildInputs = [ traits apptools setuptools ]; preCheck = '' @@ -22,7 +29,8 @@ buildPythonPackage rec { ''; checkInputs = [ - ipykernel ipython pytestCheckHook + ipython + pytestCheckHook ]; meta = with lib; { diff --git a/pkgs/development/python-modules/libasyncns/default.nix b/pkgs/development/python-modules/libasyncns/default.nix index 38ca9b26360c..bd28c2207340 100644 --- a/pkgs/development/python-modules/libasyncns/default.nix +++ b/pkgs/development/python-modules/libasyncns/default.nix @@ -1,5 +1,10 @@ -{ lib, buildPythonPackage, fetchurl -, libasyncns, pkg-config }: +{ lib +, stdenv +, buildPythonPackage +, fetchurl +, libasyncns +, pkg-config +}: buildPythonPackage rec { pname = "libasyncns-python"; @@ -12,10 +17,17 @@ buildPythonPackage rec { patches = [ ./libasyncns-fix-res-consts.patch ]; + postPatch = lib.optionalString stdenv.isDarwin '' + substituteInPlace resquery.c \ + --replace '<arpa/nameser.h>' '<arpa/nameser_compat.h>' + ''; + buildInputs = [ libasyncns ]; nativeBuildInputs = [ pkg-config ]; doCheck = false; # requires network access + pythonImportsCheck = [ "libasyncns" ]; + meta = with lib; { description = "libasyncns-python is a python binding for the asynchronous name service query library"; license = licenses.lgpl21; diff --git a/pkgs/development/python-modules/python-crontab/default.nix b/pkgs/development/python-modules/python-crontab/default.nix index d91418fc1d0e..9de0801d5375 100644 --- a/pkgs/development/python-modules/python-crontab/default.nix +++ b/pkgs/development/python-modules/python-crontab/default.nix @@ -10,7 +10,11 @@ buildPythonPackage rec { }; checkInputs = [ pytestCheckHook ]; - disabledTests = [ "test_07_non_posix_shell"]; + disabledTests = [ + "test_07_non_posix_shell" + # doctest that assumes /tmp is writeable, awkward to patch + "test_03_usage" + ]; propagatedBuildInputs = [ python-dateutil ]; diff --git a/pkgs/development/python-modules/termplotlib/default.nix b/pkgs/development/python-modules/termplotlib/default.nix index 06432b673afd..fde1080491e0 100644 --- a/pkgs/development/python-modules/termplotlib/default.nix +++ b/pkgs/development/python-modules/termplotlib/default.nix @@ -1,4 +1,5 @@ { lib +, substituteAll , buildPythonPackage , fetchFromGitHub , pytestCheckHook @@ -19,13 +20,28 @@ buildPythonPackage rec { }; format = "pyproject"; - checkInputs = [ pytestCheckHook numpy exdown gnuplot ]; + checkInputs = [ + pytestCheckHook + exdown + ]; pythonImportsCheck = [ "termplotlib" ]; - # there seems to be a newline in the very front of the output - # which causes the test to fail, since it apparently doesn't - # strip whitespace. might be a gnuplot choice? sigh... - disabledTests = [ "test_plot_lim" ]; + propagatedBuildInputs = [ numpy ]; + + patches = [ + (substituteAll { + src = ./gnuplot-subprocess.patch; + gnuplot = "${gnuplot.out}/bin/gnuplot"; + }) + ]; + + # The current gnuplot version renders slightly different test + # graphs, with emphasis on slightly. The plots are still correct. + # Tests pass on gnuplot 5.4.1, but fail on 5.4.2. + disabledTests = [ + "test_plot" + "test_nolabel" + ]; meta = with lib; { description = "matplotlib for your terminal"; diff --git a/pkgs/development/python-modules/termplotlib/gnuplot-subprocess.patch b/pkgs/development/python-modules/termplotlib/gnuplot-subprocess.patch new file mode 100644 index 000000000000..5935dbda1265 --- /dev/null +++ b/pkgs/development/python-modules/termplotlib/gnuplot-subprocess.patch @@ -0,0 +1,26 @@ +diff --git a/src/termplotlib/helpers.py b/src/termplotlib/helpers.py +index 4b67fd0..38a2242 100644 +--- a/src/termplotlib/helpers.py ++++ b/src/termplotlib/helpers.py +@@ -32,7 +32,7 @@ def is_unicode_standard_output(): + + + def get_gnuplot_version(): +- out = subprocess.check_output(["gnuplot", "--version"]).decode() ++ out = subprocess.check_output(["@gnuplot@", "--version"]).decode() + m = re.match("gnuplot (\\d).(\\d) patchlevel (\\d)\n", out) + if m is None: + raise RuntimeError("Couldn't get gnuplot version") +diff --git a/src/termplotlib/plot.py b/src/termplotlib/plot.py +index 0f46b87..1418fd1 100644 +--- a/src/termplotlib/plot.py ++++ b/src/termplotlib/plot.py +@@ -17,7 +17,7 @@ def plot( + ticks_scale: int = 0, + ): + p = subprocess.Popen( +- ["gnuplot"], ++ ["@gnuplot@"], + stdout=subprocess.PIPE, + stdin=subprocess.PIPE, + stderr=subprocess.PIPE, |
