1{ lib, 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 ? null
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 jinja2
37 ] ++ lib.optionals (pythonOlder "3.5") [ typing ];
38
39 checkInputs = [
40 glibcLocales
41 ipython
42 pytest
43 recommonmark
44 sphinx
45 vega_datasets
46 ];
47
48 pythonImportsCheck = [ "altair" ];
49
50 checkPhase = ''
51 export LANG=en_US.UTF-8
52 # histogram_responsive.py attempt network access, and cannot be disabled through pytest flags
53 rm altair/examples/histogram_responsive.py
54 pytest --doctest-modules altair
55 '';
56
57 meta = with lib; {
58 description = "A declarative statistical visualization library for Python.";
59 homepage = "https://github.com/altair-viz/altair";
60 license = licenses.bsd3;
61 maintainers = with maintainers; [ teh ];
62 platforms = platforms.unix;
63 };
64}