1{ stdenv, buildPythonPackage, fetchPypi, fetchpatch
2, pytest, jinja2, sphinx, vega_datasets, ipython, glibcLocales
3, entrypoints, jsonschema, numpy, pandas, six, toolz, typing
4, pythonOlder, recommonmark }:
5
6buildPythonPackage rec {
7 pname = "altair";
8 version = "2.3.0";
9
10 src = fetchPypi {
11 inherit pname version;
12 sha256 = "9f4bc7cd132c0005deb6b36c7041ee213a69bbdfcd8c0b1a9f1ae8c1fba733f6";
13 };
14
15 postPatch = ''
16 # Tests require network
17 rm altair/examples/boxplot_max_min.py altair/examples/line_percent.py
18 '';
19
20 checkInputs = [ pytest jinja2 sphinx vega_datasets ipython glibcLocales recommonmark ];
21
22 propagatedBuildInputs = [ entrypoints jsonschema numpy pandas six toolz ]
23 ++ stdenv.lib.optionals (pythonOlder "3.5") [ typing ];
24
25 checkPhase = ''
26 export LANG=en_US.UTF-8
27 py.test altair --doctest-modules
28 '';
29
30 meta = with stdenv.lib; {
31 description = "A declarative statistical visualization library for Python.";
32 homepage = https://github.com/altair-viz/altair;
33 license = licenses.bsd3;
34 maintainers = with maintainers; [ teh ];
35 platforms = platforms.unix;
36 };
37}