1{ stdenv, buildPythonPackage, fetchPypi, isPy27
2, entrypoints
3, glibcLocales
4, ipython
5, jinja2
6, jsonschema
7, numpy
8, pandas
9, pytest
10, pythonOlder
11, recommonmark
12, six
13, sphinx
14, toolz
15, typing
16, vega_datasets
17}:
18
19buildPythonPackage rec {
20 pname = "altair";
21 version = "4.1.0";
22 disabled = isPy27;
23
24 src = fetchPypi {
25 inherit pname version;
26 sha256 = "0c99q5dy6f275yg1f137ird08wmwc1z8wmvjickkf2mvyka31p9y";
27 };
28
29 propagatedBuildInputs = [
30 entrypoints
31 jsonschema
32 numpy
33 pandas
34 six
35 toolz
36 ] ++ stdenv.lib.optionals (pythonOlder "3.5") [ typing ];
37
38 checkInputs = [
39 glibcLocales
40 ipython
41 jinja2
42 pytest
43 recommonmark
44 sphinx
45 vega_datasets
46 ];
47
48 checkPhase = ''
49 export LANG=en_US.UTF-8
50 # histogram_responsive.py attempt network access, and cannot be disabled through pytest flags
51 rm altair/examples/histogram_responsive.py
52 pytest --doctest-modules altair
53 '';
54
55 meta = with stdenv.lib; {
56 description = "A declarative statistical visualization library for Python.";
57 homepage = "https://github.com/altair-viz/altair";
58 license = licenses.bsd3;
59 maintainers = with maintainers; [ teh ];
60 platforms = platforms.unix;
61 };
62}