git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #66304 from marsam/fix-python-colorcet

pythonPackages.colorcet: fix build on darwin

commit953942aa05bec8ab3840f6631ac46afcb60407ce authorMarek Mahut <marek.mahut@gmail.com> dateThu 8 Aug 2019, 09:19 (7 years ago) parenta62b1c89a6a055
2 files changed+11−5
pkgs/development/python-modules/colorcet/default.nix+4−3 pkgs/development/python-modules/pytest-mpl/default.nix+7−2
pkgs/development/python-modules/colorcet/default.nix+4−3
@@ -1,4 +1,4 @@
1−{ lib
1+{ stdenv
22, buildPythonPackage
33, fetchPypi
44, param
@@ -35,10 +35,11 @@ buildPythonPackage rec {
3535 mkdir -p $HOME/.config/matplotlib
3636 echo "backend: ps" > $HOME/.config/matplotlib/matplotlibrc
3737
38− pytest colorcet
38+ # disable matplotlib tests on darwin, because it requires a framework build of Python
39+ pytest ${stdenv.lib.optionalString stdenv.isDarwin "--ignore=colorcet/tests/test_matplotlib.py"} colorcet
3940 '';
4041
41− meta = with lib; {
42+ meta = with stdenv.lib; {
4243 description = "Collection of perceptually uniform colormaps";
4344 homepage = https://colorcet.pyviz.org;
4445 license = licenses.cc-by-40;
pkgs/development/python-modules/pytest-mpl/default.nix+7−2
@@ -1,4 +1,4 @@
1−{ lib
1+{ stdenv
22, buildPythonPackage
33, fetchPypi
44, pytest
@@ -15,6 +15,8 @@ buildPythonPackage rec {
1515 sha256 = "7006e63bf1ca9c50bea3d189c0f862751a16ce40bb373197b218f57af5b837c0";
1616 };
1717
18+ buildInputs = [ pytest ];
19+
1820 propagatedBuildInputs = [
1921 matplotlib
2022 nose
@@ -24,6 +26,9 @@ buildPythonPackage rec {
2426 pytest
2527 ];
2628
29+ # disable tests on darwin, because it requires a framework build of Python
30+ doCheck = !stdenv.isDarwin;
31+
2732 checkPhase = ''
2833 export HOME=$(mktemp -d)
2934 mkdir -p $HOME/.config/matplotlib
@@ -32,7 +37,7 @@ buildPythonPackage rec {
3237 pytest
3338 '';
3439
35− meta = with lib; {
40+ meta = with stdenv.lib; {
3641 description = "Pytest plugin to help with testing figures output from Matplotlib";
3742 homepage = https://github.com/matplotlib/pytest-mpl;
3843 license = licenses.bsd3;