Skip to content

Commit

Permalink
python3.pkgs.nbclient: always disable tests
Browse files Browse the repository at this point in the history
Overriding a Python package in propagatedBuildInputs is a bad idea as
you may end up with multiple versions in your closure. This happened,
and when installing to $out the package for which the tests were run,
the site packages folder was empty.

Possible improvement is to add the tests as a separate derivation.
  • Loading branch information
FRidh authored and erictapen committed May 4, 2022
1 parent e006a2a commit ab0bd3a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions pkgs/development/python-modules/nbclient/default.nix
@@ -1,7 +1,6 @@
{ lib, buildPythonPackage, fetchPypi, pythonOlder,
async_generator, traitlets, nbformat, nest-asyncio, jupyter-client,
pytest, xmltodict, nbconvert, ipywidgets
, doCheck ? true
}:

buildPythonPackage rec {
Expand All @@ -14,7 +13,7 @@ buildPythonPackage rec {
sha256 = "sha256-QMUsm148MfrsruafICs/U+ONfBxWPeD63enX7aD9r+g=";
};

inherit doCheck;
doCheck = false; # Avoid infinite recursion
checkInputs = [ pytest xmltodict nbconvert ipywidgets ];
propagatedBuildInputs = [ async_generator traitlets nbformat nest-asyncio jupyter-client ];

Expand Down
2 changes: 1 addition & 1 deletion pkgs/development/python-modules/nbconvert/default.nix
Expand Up @@ -47,7 +47,7 @@ buildPythonPackage rec {
entrypoints bleach mistune jinja2 pygments traitlets testpath
jupyter_core nbformat ipykernel pandocfilters tornado jupyter-client
defusedxml beautifulsoup4
(nbclient.override { doCheck = false; }) # avoid infinite recursion
nbclient
jupyterlab-pygments
];

Expand Down

0 comments on commit ab0bd3a

Please sign in to comment.