diff options
author | OTABI Tomoya <tomoya.otabi@gmail.com> | 2023-08-12 12:07:54 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-08-12 12:07:54 +0900 |
commit | e67e1871ffd8597491fe9759b7bea43b1760f0fd (patch) | |
tree | daa50e2110d96729ca3fec443ae1df232cadf3e8 /pkgs/development | |
parent | 8ea93b8c80adc7d9ced5b995905515c07ef6332f (diff) | |
parent | ee23cf82513024a0563c5f7854f93a222269f810 (diff) |
Merge pull request #248515 from tjni/seaborn
python3.pkgs.seaborn: patch tests using new matplotlib and numpy
Diffstat (limited to 'pkgs/development')
-rw-r--r-- | pkgs/development/python-modules/seaborn/default.nix | 29 |
1 files changed, 24 insertions, 5 deletions
diff --git a/pkgs/development/python-modules/seaborn/default.nix b/pkgs/development/python-modules/seaborn/default.nix index 7b40b674b4cb7..267b6065ed735 100644 --- a/pkgs/development/python-modules/seaborn/default.nix +++ b/pkgs/development/python-modules/seaborn/default.nix @@ -1,6 +1,7 @@ { lib , stdenv , buildPythonPackage +, fetchpatch , fetchPypi , flit-core , matplotlib @@ -24,6 +25,24 @@ buildPythonPackage rec { hash = "sha256-N0ZF82UJ0NyriVy6W0fa8Fhvd7/js2yXxgfbfaW+ATk="; }; + 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="; + }) + ]; + nativeBuildInputs = [ flit-core ]; @@ -41,12 +60,12 @@ buildPythonPackage rec { ]; disabledTests = [ - # incompatible with matplotlib 3.7 - # https://github.com/mwaskom/seaborn/issues/3288 - "test_subplot_kws" - # requires internet connection "test_load_dataset_string_error" + + # per https://github.com/mwaskom/seaborn/issues/3431, we can enable this + # once matplotlib releases version > 3.7.2 + "test_share_xy" ] ++ lib.optionals (!stdenv.hostPlatform.isx86) [ # overly strict float tolerances "TestDendrogram" @@ -54,7 +73,7 @@ buildPythonPackage rec { # All platforms should use Agg. Let's set it explicitly to avoid probing GUI # backends (leads to crashes on macOS). - MPLBACKEND="Agg"; + env.MPLBACKEND="Agg"; pythonImportsCheck = [ "seaborn" |