Merge pull request #66304 from marsam/fix-python-colorcet

pythonPackages.colorcet: fix build on darwin
This commit is contained in:
Marek Mahut
2019-08-08 09:19:08 +02:00
committed by GitHub
2 changed files with 11 additions and 5 deletions
@@ -1,4 +1,4 @@
{ lib { stdenv
, buildPythonPackage , buildPythonPackage
, fetchPypi , fetchPypi
, param , param
@@ -35,10 +35,11 @@ buildPythonPackage rec {
mkdir -p $HOME/.config/matplotlib mkdir -p $HOME/.config/matplotlib
echo "backend: ps" > $HOME/.config/matplotlib/matplotlibrc echo "backend: ps" > $HOME/.config/matplotlib/matplotlibrc
pytest colorcet # 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
''; '';
meta = with lib; { meta = with stdenv.lib; {
description = "Collection of perceptually uniform colormaps"; description = "Collection of perceptually uniform colormaps";
homepage = https://colorcet.pyviz.org; homepage = https://colorcet.pyviz.org;
license = licenses.cc-by-40; license = licenses.cc-by-40;
@@ -1,4 +1,4 @@
{ lib { stdenv
, buildPythonPackage , buildPythonPackage
, fetchPypi , fetchPypi
, pytest , pytest
@@ -15,6 +15,8 @@ buildPythonPackage rec {
sha256 = "7006e63bf1ca9c50bea3d189c0f862751a16ce40bb373197b218f57af5b837c0"; sha256 = "7006e63bf1ca9c50bea3d189c0f862751a16ce40bb373197b218f57af5b837c0";
}; };
buildInputs = [ pytest ];
propagatedBuildInputs = [ propagatedBuildInputs = [
matplotlib matplotlib
nose nose
@@ -24,6 +26,9 @@ buildPythonPackage rec {
pytest pytest
]; ];
# disable tests on darwin, because it requires a framework build of Python
doCheck = !stdenv.isDarwin;
checkPhase = '' checkPhase = ''
export HOME=$(mktemp -d) export HOME=$(mktemp -d)
mkdir -p $HOME/.config/matplotlib mkdir -p $HOME/.config/matplotlib
@@ -32,7 +37,7 @@ buildPythonPackage rec {
pytest pytest
''; '';
meta = with lib; { meta = with stdenv.lib; {
description = "Pytest plugin to help with testing figures output from Matplotlib"; description = "Pytest plugin to help with testing figures output from Matplotlib";
homepage = https://github.com/matplotlib/pytest-mpl; homepage = https://github.com/matplotlib/pytest-mpl;
license = licenses.bsd3; license = licenses.bsd3;