2018-07-15 13:38:42 +00:00
|
|
|
{ stdenv, buildPythonPackage, fetchPypi, fetchpatch
|
|
|
|
, pytest, jinja2, sphinx, vega_datasets, ipython, glibcLocales
|
2018-12-02 13:04:24 +00:00
|
|
|
, entrypoints, jsonschema, numpy, pandas, six, toolz, typing
|
|
|
|
, pythonOlder, recommonmark }:
|
2017-07-15 05:58:25 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "altair";
|
2018-12-02 13:04:24 +00:00
|
|
|
version = "2.2.2";
|
2017-07-15 05:58:25 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2018-12-02 13:04:24 +00:00
|
|
|
sha256 = "c158699026eb5a19f95c1ca742e2e82bc20c27013ef5785f10836283e2233f8a";
|
2017-07-15 05:58:25 +00:00
|
|
|
};
|
|
|
|
|
2018-12-02 13:04:24 +00:00
|
|
|
checkInputs = [ pytest jinja2 sphinx vega_datasets ipython glibcLocales recommonmark ];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [ entrypoints jsonschema numpy pandas six toolz ]
|
|
|
|
++ stdenv.lib.optionals (pythonOlder "3.5") [ typing ];
|
2018-03-20 15:33:08 +00:00
|
|
|
|
2018-12-02 13:04:24 +00:00
|
|
|
# hack to prevent typing from being required for python > 3.5
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace requirements.txt \
|
|
|
|
--replace "typing" ""
|
|
|
|
'';
|
2017-07-15 05:58:25 +00:00
|
|
|
|
|
|
|
checkPhase = ''
|
|
|
|
export LANG=en_US.UTF-8
|
|
|
|
py.test altair --doctest-modules
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "A declarative statistical visualization library for Python.";
|
|
|
|
homepage = https://github.com/altair-viz/altair;
|
|
|
|
license = licenses.bsd3;
|
|
|
|
maintainers = with maintainers; [ teh ];
|
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|