2019-08-08 01:54:19 +02:00
|
|
|
{ stdenv
|
2019-07-14 23:31:28 +02:00
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
|
|
|
, pytest
|
|
|
|
, matplotlib
|
|
|
|
, nose
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pytest-mpl";
|
|
|
|
version = "0.10";
|
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
|
|
|
sha256 = "7006e63bf1ca9c50bea3d189c0f862751a16ce40bb373197b218f57af5b837c0";
|
|
|
|
};
|
|
|
|
|
2019-08-08 01:54:19 +02:00
|
|
|
buildInputs = [ pytest ];
|
|
|
|
|
2019-07-14 23:31:28 +02:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
matplotlib
|
|
|
|
nose
|
|
|
|
];
|
|
|
|
|
|
|
|
checkInputs = [
|
|
|
|
pytest
|
|
|
|
];
|
|
|
|
|
2019-08-08 01:54:19 +02:00
|
|
|
# disable tests on darwin, because it requires a framework build of Python
|
|
|
|
doCheck = !stdenv.isDarwin;
|
|
|
|
|
2019-07-14 23:31:28 +02:00
|
|
|
checkPhase = ''
|
2019-07-16 14:00:08 +02:00
|
|
|
export HOME=$(mktemp -d)
|
|
|
|
mkdir -p $HOME/.config/matplotlib
|
|
|
|
echo "backend: ps" > $HOME/.config/matplotlib/matplotlibrc
|
|
|
|
|
2019-07-14 23:31:28 +02:00
|
|
|
pytest
|
|
|
|
'';
|
|
|
|
|
2019-08-08 01:54:19 +02:00
|
|
|
meta = with stdenv.lib; {
|
2019-07-16 14:00:08 +02:00
|
|
|
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 ];
|
|
|
|
};
|
|
|
|
}
|