python3Packages.matplotlib: 3.10.9 -> 3.11.0

Changelog: https://github.com/matplotlib/matplotlib/releases/tag/v3.11.0

Disable withOutdatedFreetype passthru test, comment explains why.
This commit is contained in:
Doron Behar 2026-06-12 10:03:26 +03:00
commit c4a9aae5c7

View file

@ -19,13 +19,8 @@
# native libraries
ffmpeg-headless,
freetype,
# By default, almost all tests fail due to the fact we use our version of
# freetype. We still use this argument to define the overridden
# derivation `matplotlib.passthru.tests.withoutOutdatedFreetype` - which
# builds matplotlib with the freetype version they default to, with which all
# tests should pass.
doCheck ? false,
qhull,
libraqm,
# propagates
contourpy,
@ -76,13 +71,13 @@ let
in
buildPythonPackage (finalAttrs: {
version = "3.10.9";
version = "3.11.0";
pname = "matplotlib";
pyproject = true;
src = fetchPypi {
inherit (finalAttrs) pname version;
hash = "sha256-/WZQjoxod9mOWGZUtgigRW241+ilRuseJgDv2VcwI1g=";
hash = "sha256-aMDHvgGzDcyjY4k09/WR33NAEjXL2/DRqxxx59t/i1c=";
};
env.XDG_RUNTIME_DIR = "/tmp";
@ -99,10 +94,6 @@ buildPythonPackage (finalAttrs: {
--replace-fail "/usr/bin/env python3" "/usr/bin/env pypy3"
''
+ ''
substituteInPlace pyproject.toml \
--replace-fail "meson-python>=0.13.1,<0.17.0" meson-python \
--replace-fail "setuptools_scm>=7,<10" setuptools_scm
patchShebangs tools
''
+ lib.optionalString (stdenv.hostPlatform.isLinux && interactive) ''
@ -118,6 +109,7 @@ buildPythonPackage (finalAttrs: {
ffmpeg-headless
freetype
qhull
libraqm
]
++ lib.optionals enableGtk3 [
cairo
@ -159,6 +151,7 @@ buildPythonPackage (finalAttrs: {
mesonFlags = lib.mapAttrsToList lib.mesonBool {
system-freetype = true;
system-qhull = true;
system-libraqm = true;
# Otherwise GNU's `ar` binary fails to put symbols from libagg into the
# matplotlib shared objects. See:
# -https://github.com/matplotlib/matplotlib/issues/28260#issuecomment-2146243663
@ -168,20 +161,14 @@ buildPythonPackage (finalAttrs: {
passthru.tests = {
inherit sage;
withOutdatedFreetype = matplotlib.override {
doCheck = true;
freetype = freetype.overrideAttrs (_: {
src = fetchurl {
url = "mirror://savannah/freetype/freetype-old/freetype-2.6.1.tar.gz";
hash = "sha256-Cjx9+9ptoej84pIy6OltmHq6u79x68jHVlnkEyw2cBQ=";
};
patches = [ ];
});
};
};
pythonImportsCheck = [ "matplotlib" ];
inherit doCheck;
# Running the tests requires a specific freetype version, so pixel-to-pixel
# comparisons will pass. Since matplotlib depends directly & indirectly on
# freetype, this would be too expensive to even test this (correctly) in
# `passthru.tests`.
doCheck = false;
nativeCheckInputs = [ pytestCheckHook ];
preCheck = ''
# https://matplotlib.org/devdocs/devel/testing.html#obtain-the-reference-images