nixpkgs/pkgs/development/python-modules/colorcet/default.nix

49 lines
1,008 B
Nix
Raw Normal View History

{ stdenv
2019-07-14 21:31:04 +00:00
, buildPythonPackage
, fetchPypi
, param
, pyct
, nbsmoke
, flake8
, pytest
, pytest-mpl
}:
buildPythonPackage rec {
pname = "colorcet";
version = "2.0.1";
src = fetchPypi {
inherit pname version;
sha256 = "ab1d16aba97f54af190631c7777c356b04b53de549672ff6b01c66d716eddff3";
};
propagatedBuildInputs = [
param
pyct
];
checkInputs = [
nbsmoke
pytest
flake8
pytest-mpl
];
checkPhase = ''
2019-07-14 21:31:28 +00:00
export HOME=$(mktemp -d)
mkdir -p $HOME/.config/matplotlib
echo "backend: ps" > $HOME/.config/matplotlib/matplotlibrc
# disable matplotlib tests on darwin, because it requires a framework build of Python
pytest ${stdenv.lib.optionalString stdenv.isDarwin "--ignore=colorcet/tests/test_matplotlib.py"} colorcet
2019-07-14 21:31:04 +00:00
'';
meta = with stdenv.lib; {
2019-07-14 21:31:04 +00:00
description = "Collection of perceptually uniform colormaps";
homepage = https://colorcet.pyviz.org;
license = licenses.cc-by-40;
maintainers = [ maintainers.costrouc ];
};
}