1{ lib
2, stdenv
3, buildPythonPackage
4, fetchPypi
5, flit-core
6, matplotlib
7, pytest-xdist
8, pytestCheckHook
9, numpy
10, pandas
11, pythonOlder
12, scipy
13}:
14
15buildPythonPackage rec {
16 pname = "seaborn";
17 version = "0.12.2";
18 format = "pyproject";
19
20 disabled = pythonOlder "3.6";
21
22 src = fetchPypi {
23 inherit pname version;
24 hash = "sha256-N0ZF82UJ0NyriVy6W0fa8Fhvd7/js2yXxgfbfaW+ATk=";
25 };
26
27 nativeBuildInputs = [
28 flit-core
29 ];
30
31 propagatedBuildInputs = [
32 matplotlib
33 numpy
34 pandas
35 scipy
36 ];
37
38 nativeCheckInputs = [
39 pytest-xdist
40 pytestCheckHook
41 ];
42
43 disabledTests = [
44 # incompatible with matplotlib 3.7
45 # https://github.com/mwaskom/seaborn/issues/3288
46 "test_subplot_kws"
47
48 # requires internet connection
49 "test_load_dataset_string_error"
50 ] ++ lib.optionals (!stdenv.hostPlatform.isx86) [
51 # overly strict float tolerances
52 "TestDendrogram"
53 ];
54
55 # All platforms should use Agg. Let's set it explicitly to avoid probing GUI
56 # backends (leads to crashes on macOS).
57 MPLBACKEND="Agg";
58
59 pythonImportsCheck = [
60 "seaborn"
61 ];
62
63 meta = with lib; {
64 description = "Statistical data visualization";
65 homepage = "https://seaborn.pydata.org/";
66 license = with licenses; [ bsd3 ];
67 maintainers = with maintainers; [ fridh ];
68 };
69}