{ lib, buildPythonPackage, fetchPypi
, matplotlib
, traitlets

# tests
, ipython
}:

buildPythonPackage rec {
  pname = "matplotlib-inline";
  version = "0.1.3";

  src = fetchPypi {
    inherit pname version;
    sha256 = "a04bfba22e0d1395479f866853ec1ee28eea1485c1d69a6faf00dc3e24ff34ee";
  };

  propagatedBuildInputs = [
    matplotlib # not documented, but required
    traitlets
  ];

  # wants to import ipython, which creates a circular dependency
  doCheck = false;
  pythonImportsCheck = [ "matplotlib_inline" ];

  passthru.tests = { inherit ipython; };

  meta = with lib; {
    description = "Matplotlib Inline Back-end for IPython and Jupyter";
    homepage = "https://github.com/ipython/matplotlib-inline";
    license = licenses.bsd3;
    maintainers = with maintainers; [ jonringer ];
  };
}

{ lib, buildPythonPackage, fetchPypi
, traitlets

# tests
, ipython
}:

buildPythonPackage rec {
  pname = "matplotlib-inline";
  version = "0.1.3";

  src = fetchPypi {
    inherit pname version;
    sha256 = "a04bfba22e0d1395479f866853ec1ee28eea1485c1d69a6faf00dc3e24ff34ee";
  };

  propagatedBuildInputs = [
    traitlets
  ];

  # wants to import ipython, which creates a circular dependency
  doCheck = false;
  pythonImportsCheck = [ "matplotlib_inline" ];

  passthru.tests = { inherit ipython; };

  meta = with lib; {
    description = "Matplotlib Inline Back-end for IPython and Jupyter";
    homepage = "https://github.com/ipython/matplotlib-inline";
    license = licenses.bsd3;
    maintainers = with maintainers; [ jonringer ];
  };
}

Revert "Revert "matplotlib-inline: Don't depend on matplotlib -> smaller ipython closure""
Revert "Revert "matplotlib-inline: Don't depend on matplotlib -> smaller ipython closure""

Un-revert on staging

This reverts commit 37e104da68f8edaf590c6ffdc70d5065545e23e3.
