2020-04-24 23:36:52 +00:00
|
|
|
{ lib
|
2022-05-18 14:49:53 +00:00
|
|
|
, stdenv
|
2020-04-24 23:36:52 +00:00
|
|
|
, buildPythonPackage
|
2023-08-22 20:05:09 +00:00
|
|
|
, fetchpatch
|
2020-04-24 23:36:52 +00:00
|
|
|
, fetchPypi
|
2022-09-30 11:47:45 +00:00
|
|
|
, flit-core
|
2020-04-24 23:36:52 +00:00
|
|
|
, matplotlib
|
2023-03-15 16:39:30 +00:00
|
|
|
, pytest-xdist
|
2021-12-06 16:07:01 +00:00
|
|
|
, pytestCheckHook
|
|
|
|
, numpy
|
|
|
|
, pandas
|
|
|
|
, pythonOlder
|
|
|
|
, scipy
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "seaborn";
|
2023-03-15 16:39:30 +00:00
|
|
|
version = "0.12.2";
|
2022-09-30 11:47:45 +00:00
|
|
|
format = "pyproject";
|
2021-12-06 16:07:01 +00:00
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
disabled = pythonOlder "3.6";
|
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2023-03-15 16:39:30 +00:00
|
|
|
hash = "sha256-N0ZF82UJ0NyriVy6W0fa8Fhvd7/js2yXxgfbfaW+ATk=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2023-08-22 20:05:09 +00:00
|
|
|
patches = [
|
|
|
|
(fetchpatch {
|
|
|
|
name = "fix-test-using-matplotlib-3.7.patch";
|
|
|
|
url = "https://github.com/mwaskom/seaborn/commit/db7ae11750fc2dfb695457239708448d54e9b8cd.patch";
|
|
|
|
hash = "sha256-LbieI0GeC/0NpFVxV/NRQweFjP/lj/TR2D/SLMPYqJg=";
|
|
|
|
})
|
|
|
|
(fetchpatch {
|
|
|
|
name = "fix-pandas-deprecation.patch";
|
|
|
|
url = "https://github.com/mwaskom/seaborn/commit/a48601d6bbf8381f9435be48624f1a77d6fbfced.patch";
|
|
|
|
hash = "sha256-LuN8jn6Jo9Fvdl5iGZ2LgINYujSDvvs+hSclnadV1F4=";
|
|
|
|
})
|
|
|
|
(fetchpatch {
|
|
|
|
name = "fix-tests-using-numpy-1.25.patch";
|
|
|
|
url = "https://github.com/mwaskom/seaborn/commit/b6737d5aec9a91bb8840cdda896a7970e1830d56.patch";
|
|
|
|
hash = "sha256-Xj82yyB5Vy2xKRl0ideDmJ5Zr4Xc+8cEHU/liVwMSvE=";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2022-09-30 11:47:45 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
flit-core
|
|
|
|
];
|
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
matplotlib
|
|
|
|
numpy
|
|
|
|
pandas
|
|
|
|
scipy
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2023-03-15 16:39:30 +00:00
|
|
|
pytest-xdist
|
2021-12-06 16:07:01 +00:00
|
|
|
pytestCheckHook
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-12-26 17:43:05 +00:00
|
|
|
disabledTests = [
|
2023-02-22 10:55:15 +00:00
|
|
|
# requires internet connection
|
|
|
|
"test_load_dataset_string_error"
|
2023-08-22 20:05:09 +00:00
|
|
|
|
|
|
|
# per https://github.com/mwaskom/seaborn/issues/3431, we can enable this
|
|
|
|
# once matplotlib releases version > 3.7.2
|
|
|
|
"test_share_xy"
|
2022-05-18 14:49:53 +00:00
|
|
|
] ++ lib.optionals (!stdenv.hostPlatform.isx86) [
|
|
|
|
# overly strict float tolerances
|
|
|
|
"TestDendrogram"
|
2021-12-26 17:43:05 +00:00
|
|
|
];
|
|
|
|
|
2023-02-22 10:55:15 +00:00
|
|
|
# All platforms should use Agg. Let's set it explicitly to avoid probing GUI
|
|
|
|
# backends (leads to crashes on macOS).
|
2023-08-22 20:05:09 +00:00
|
|
|
env.MPLBACKEND="Agg";
|
2023-02-22 10:55:15 +00:00
|
|
|
|
2022-05-18 14:49:53 +00:00
|
|
|
pythonImportsCheck = [
|
2021-12-06 16:07:01 +00:00
|
|
|
"seaborn"
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-12-26 17:43:05 +00:00
|
|
|
meta = with lib; {
|
2022-09-30 11:47:45 +00:00
|
|
|
description = "Statistical data visualization";
|
2020-10-07 09:15:18 +00:00
|
|
|
homepage = "https://seaborn.pydata.org/";
|
2021-12-26 17:43:05 +00:00
|
|
|
license = with licenses; [ bsd3 ];
|
|
|
|
maintainers = with maintainers; [ fridh ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|