nixpkgs/pkgs/development/python-modules/pytest-mpl/default.nix

47 lines
893 B
Nix
Raw Normal View History

{ stdenv
2019-07-14 23:31:28 +02:00
, buildPythonPackage
, fetchPypi
, pytest
, matplotlib
, nose
, pillow
2019-07-14 23:31:28 +02:00
}:
buildPythonPackage rec {
pname = "pytest-mpl";
2019-12-19 20:31:20 +01:00
version = "0.11";
2019-07-14 23:31:28 +02:00
src = fetchPypi {
inherit pname version;
2019-12-19 20:31:20 +01:00
sha256 = "26c5a47a8fdbc04652f18b65c587da642c6cc0354680ee44b16c161d9800a2ce";
2019-07-14 23:31:28 +02:00
};
buildInputs = [ pytest ];
2019-07-14 23:31:28 +02:00
propagatedBuildInputs = [
matplotlib
nose
pillow
2019-07-14 23:31:28 +02:00
];
checkInputs = [
pytest
];
checkPhase = ''
export HOME=$(mktemp -d)
mkdir -p $HOME/.config/matplotlib
echo "backend: ps" > $HOME/.config/matplotlib/matplotlibrc
ln -s $HOME/.config/matplotlib $HOME/.matplotlib
2019-07-14 23:31:28 +02:00
pytest
'';
meta = with stdenv.lib; {
description = "Pytest plugin to help with testing figures output from Matplotlib";
2019-07-14 23:31:28 +02:00
homepage = https://github.com/matplotlib/pytest-mpl;
license = licenses.bsd3;
maintainers = [ maintainers.costrouc ];
};
}