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