diff --git a/.gitignore b/.gitignore index 94a56a3..e238ff4 100644 --- a/.gitignore +++ b/.gitignore @@ -121,3 +121,5 @@ matplotlib-1.0.0-without-gpc.tar.gz /matplotlib-3.10.3-with-freetype-2.13.1.tar.gz /matplotlib-3.10.5.tar.gz /matplotlib-3.10.6.tar.gz +/matplotlib-3.10.8.tar.gz +/matplotlib-3.10.8-with-freetype-2.14.1.tar.gz diff --git a/0001-matplotlibrc-path-search-fix.patch b/0001-matplotlibrc-path-search-fix.patch index 6b742dc..13aaf24 100644 --- a/0001-matplotlibrc-path-search-fix.patch +++ b/0001-matplotlibrc-path-search-fix.patch @@ -1,7 +1,7 @@ -From 5a669e4d5c8bfd28cf487316f52b7703aa34c2fb Mon Sep 17 00:00:00 2001 -From: Elliott Sales de Andrade +From 50c46d80a99b6bdbb61733b0eef69649f22701ab Mon Sep 17 00:00:00 2001 +From: Sandro Tosi Date: Wed, 27 Sep 2017 19:35:59 -0400 -Subject: [PATCH 1/6] matplotlibrc path search fix +Subject: [PATCH 1/5] matplotlibrc path search fix Signed-off-by: Elliott Sales de Andrade --- @@ -29,5 +29,5 @@ index 2786f9b7b9..79cccf0892 100644 for fname in gen_candidates(): -- -2.50.0 +2.52.0 diff --git a/0002-Set-FreeType-version-to-2.13.1-and-update-tolerances.patch b/0002-Set-FreeType-version-to-2.14.1-and-update-tolerances.patch similarity index 94% rename from 0002-Set-FreeType-version-to-2.13.1-and-update-tolerances.patch rename to 0002-Set-FreeType-version-to-2.14.1-and-update-tolerances.patch index 52006ce..420514c 100644 --- a/0002-Set-FreeType-version-to-2.13.1-and-update-tolerances.patch +++ b/0002-Set-FreeType-version-to-2.14.1-and-update-tolerances.patch @@ -1,7 +1,7 @@ -From 58b9eb1ef95ec927eec3f554a69eb7efeea5602f Mon Sep 17 00:00:00 2001 +From 4550b06f9de6c23d7b87a34d2bca1c9aaa594a3e Mon Sep 17 00:00:00 2001 From: Elliott Sales de Andrade Date: Fri, 14 Feb 2020 06:05:42 -0500 -Subject: [PATCH 2/6] Set FreeType version to 2.13.1 and update tolerances +Subject: [PATCH 2/5] Set FreeType version to 2.14.1 and update tolerances Signed-off-by: Elliott Sales de Andrade --- @@ -15,7 +15,7 @@ Signed-off-by: Elliott Sales de Andrade 7 files changed, 11 insertions(+), 11 deletions(-) diff --git a/extern/meson.build b/extern/meson.build -index 5463183a90..c7233815af 100644 +index 5463183a90..928eb6bd56 100644 --- a/extern/meson.build +++ b/extern/meson.build @@ -13,7 +13,7 @@ else @@ -23,12 +23,12 @@ index 5463183a90..c7233815af 100644 # in `docs/devel/dependencies.rst`. Bump the cache key in # `.circleci/config.yml` when changing requirements. - LOCAL_FREETYPE_VERSION = '2.6.1' -+ LOCAL_FREETYPE_VERSION = '2.13.1' ++ LOCAL_FREETYPE_VERSION = '2.14.1' freetype_proj = subproject( f'freetype-@LOCAL_FREETYPE_VERSION@', diff --git a/lib/matplotlib/__init__.py b/lib/matplotlib/__init__.py -index 79cccf0892..3b81bf54bc 100644 +index 79cccf0892..04d716b54c 100644 --- a/lib/matplotlib/__init__.py +++ b/lib/matplotlib/__init__.py @@ -1363,7 +1363,7 @@ def _val_or_rc(val, rc_name): @@ -36,7 +36,7 @@ index 79cccf0892..3b81bf54bc 100644 # The version of FreeType to install locally for running the tests. This must match # the value in `meson.build`. - LOCAL_FREETYPE_VERSION = '2.6.1' -+ LOCAL_FREETYPE_VERSION = '2.13.1' ++ LOCAL_FREETYPE_VERSION = '2.14.1' from matplotlib import ft2font if (ft2font.__freetype_version__ != LOCAL_FREETYPE_VERSION or @@ -123,5 +123,5 @@ index 844ab8cf3a..826a8a0c3a 100644 @check_figures_equal(extensions=["png"]) -- -2.50.0 +2.52.0 diff --git a/0003-Unpin-meson-python-build-requirement.patch b/0003-Unpin-meson-python-build-requirement.patch index 2d8c738..08000db 100644 --- a/0003-Unpin-meson-python-build-requirement.patch +++ b/0003-Unpin-meson-python-build-requirement.patch @@ -1,7 +1,7 @@ -From 2341947e31162df25ef5bbdc77e858b3d9038c6e Mon Sep 17 00:00:00 2001 +From ff0a79b707eb6603c0cb0bd3778c3c88fbacfac8 Mon Sep 17 00:00:00 2001 From: Elliott Sales de Andrade Date: Fri, 13 Dec 2024 02:03:33 -0500 -Subject: [PATCH 3/6] Unpin meson-python build requirement +Subject: [PATCH 3/5] Unpin meson-python build requirement This is pinned to fix sdists, but we already have one and are building a wheel, which should be fine. @@ -12,10 +12,10 @@ Signed-off-by: Elliott Sales de Andrade 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml -index e6d1abaf53..76755eec25 100644 +index 23c441b52c..f762c85d98 100644 --- a/pyproject.toml +++ b/pyproject.toml -@@ -47,7 +47,7 @@ requires-python = ">=3.10" +@@ -48,7 +48,7 @@ requires-python = ">=3.10" [project.optional-dependencies] # Should be a copy of the build dependencies below. dev = [ @@ -24,7 +24,7 @@ index e6d1abaf53..76755eec25 100644 "pybind11>=2.13.2,!=2.13.3", "setuptools_scm>=7", # Not required by us but setuptools_scm without a version, cso _if_ -@@ -71,7 +71,7 @@ dev = [ +@@ -72,7 +72,7 @@ dev = [ build-backend = "mesonpy" # Also keep in sync with optional dependencies above. requires = [ @@ -34,5 +34,5 @@ index e6d1abaf53..76755eec25 100644 "setuptools_scm>=7", ] -- -2.50.0 +2.52.0 diff --git a/0004-Use-old-stride_windows-implementation-on-32-bit-x86.patch b/0004-Use-old-stride_windows-implementation-on-32-bit-x86.patch index ca2d217..30588d2 100644 --- a/0004-Use-old-stride_windows-implementation-on-32-bit-x86.patch +++ b/0004-Use-old-stride_windows-implementation-on-32-bit-x86.patch @@ -1,7 +1,7 @@ -From 0ff1d42e090eff8b6333e7eef1463153ba70d26e Mon Sep 17 00:00:00 2001 +From abf5f01b8fa262c71f7ccdf189c608f189028a44 Mon Sep 17 00:00:00 2001 From: Elliott Sales de Andrade Date: Mon, 22 Aug 2022 18:43:28 -0400 -Subject: [PATCH 4/6] Use old stride_windows implementation on 32-bit x86 +Subject: [PATCH 4/5] Use old stride_windows implementation on 32-bit x86 Signed-off-by: Elliott Sales de Andrade --- @@ -80,5 +80,5 @@ index 8326ac186e..bdaa34b734 100644 resultY = resultY * window.reshape((-1, 1)) resultY = np.fft.fft(resultY, n=pad_to, axis=0)[:numFreqs, :] -- -2.50.0 +2.52.0 diff --git a/0005-Partially-revert-TST-Fix-minor-issues-in-interactive.patch b/0005-Partially-revert-TST-Fix-minor-issues-in-interactive.patch index 8f33e35..6e1a35d 100644 --- a/0005-Partially-revert-TST-Fix-minor-issues-in-interactive.patch +++ b/0005-Partially-revert-TST-Fix-minor-issues-in-interactive.patch @@ -1,7 +1,7 @@ -From cda997ca3325e80b9a958775dda5e76a89a33e01 Mon Sep 17 00:00:00 2001 +From 7a5bbfe3bd5905a7daefac690ebdfd7403c8ef7a Mon Sep 17 00:00:00 2001 From: Elliott Sales de Andrade Date: Tue, 12 Nov 2024 01:05:25 -0500 -Subject: [PATCH 5/6] Partially revert "TST: Fix minor issues in interactive +Subject: [PATCH 5/5] Partially revert "TST: Fix minor issues in interactive backend test (#28838)" This reverts commit 7c7f94c5f71e99f148255e3bb570fec25c8fe754. @@ -28,5 +28,5 @@ index 4e3c1bbc2b..903ae87cbb 100644 @pytest.mark.parametrize("env", _get_testable_interactive_backends()) -- -2.50.0 +2.52.0 diff --git a/0006-TST-Use-a-temporary-directory-for-test_save_figure_r.patch b/0006-TST-Use-a-temporary-directory-for-test_save_figure_r.patch deleted file mode 100644 index 02de93b..0000000 --- a/0006-TST-Use-a-temporary-directory-for-test_save_figure_r.patch +++ /dev/null @@ -1,39 +0,0 @@ -From 56eba126ee1286a23799976c2d4e6463bd58d6c7 Mon Sep 17 00:00:00 2001 -From: Elliott Sales de Andrade -Date: Fri, 29 Aug 2025 23:58:54 -0400 -Subject: [PATCH 6/6] TST: Use a temporary directory for - test_save_figure_return - -This avoids having to manually clean up the resulting file, which seems -flaky. - -Signed-off-by: Elliott Sales de Andrade ---- - lib/matplotlib/tests/test_backend_qt.py | 5 +++-- - 1 file changed, 3 insertions(+), 2 deletions(-) - -diff --git a/lib/matplotlib/tests/test_backend_qt.py b/lib/matplotlib/tests/test_backend_qt.py -index 962f5ce942..e191dd73eb 100644 ---- a/lib/matplotlib/tests/test_backend_qt.py -+++ b/lib/matplotlib/tests/test_backend_qt.py -@@ -219,14 +219,15 @@ def test_figureoptions(): - - - @pytest.mark.backend('QtAgg', skip_on_importerror=True) --def test_save_figure_return(): -+def test_save_figure_return(tmp_path): -+ os.chdir(tmp_path) - fig, ax = plt.subplots() - ax.imshow([[1]]) - prop = "matplotlib.backends.qt_compat.QtWidgets.QFileDialog.getSaveFileName" - with mock.patch(prop, return_value=("foobar.png", None)): - fname = fig.canvas.manager.toolbar.save_figure() -- os.remove("foobar.png") - assert fname == "foobar.png" -+ assert (tmp_path / "foobar.png").exists() - with mock.patch(prop, return_value=(None, None)): - fname = fig.canvas.manager.toolbar.save_figure() - assert fname is None --- -2.50.0 - diff --git a/30675.patch b/30675.patch deleted file mode 100644 index d738c67..0000000 --- a/30675.patch +++ /dev/null @@ -1,59 +0,0 @@ -From b843483d308ce1f8bb94e1449bdb2b77da9a327c Mon Sep 17 00:00:00 2001 -From: Elliott Sales de Andrade -Date: Tue, 21 Oct 2025 03:55:51 -0400 -Subject: [PATCH] Backport PR #30657: Fix `AttributeError: module 'gi' has no - attribute 'require_version'` - ---- - lib/matplotlib/backends/backend_gtk3.py | 4 ++-- - lib/matplotlib/backends/backend_gtk4.py | 5 +++-- - 2 files changed, 5 insertions(+), 4 deletions(-) - -diff --git a/lib/matplotlib/backends/backend_gtk3.py b/lib/matplotlib/backends/backend_gtk3.py -index 888f5a770f5d..c27b57e36a0a 100644 ---- a/lib/matplotlib/backends/backend_gtk3.py -+++ b/lib/matplotlib/backends/backend_gtk3.py -@@ -10,14 +10,14 @@ - CloseEvent, KeyEvent, LocationEvent, MouseEvent, ResizeEvent) - - try: -- import gi -+ from gi import require_version as gi_require_version - except ImportError as err: - raise ImportError("The GTK3 backends require PyGObject") from err - - try: - # :raises ValueError: If module/version is already loaded, already - # required, or unavailable. -- gi.require_version("Gtk", "3.0") -+ gi_require_version("Gtk", "3.0") - except ValueError as e: - # in this case we want to re-raise as ImportError so the - # auto-backend selection logic correctly skips. -diff --git a/lib/matplotlib/backends/backend_gtk4.py b/lib/matplotlib/backends/backend_gtk4.py -index cd38968779ed..e3d3548c1cd1 100644 ---- a/lib/matplotlib/backends/backend_gtk4.py -+++ b/lib/matplotlib/backends/backend_gtk4.py -@@ -9,19 +9,20 @@ - KeyEvent, LocationEvent, MouseEvent, ResizeEvent, CloseEvent) - - try: -- import gi -+ from gi import require_version as gi_require_version - except ImportError as err: - raise ImportError("The GTK4 backends require PyGObject") from err - - try: - # :raises ValueError: If module/version is already loaded, already - # required, or unavailable. -- gi.require_version("Gtk", "4.0") -+ gi_require_version("Gtk", "4.0") - except ValueError as e: - # in this case we want to re-raise as ImportError so the - # auto-backend selection logic correctly skips. - raise ImportError(e) from e - -+import gi - from gi.repository import Gio, GLib, Gtk, Gdk, GdkPixbuf - from . import _backend_gtk - from ._backend_gtk import ( # noqa: F401 # pylint: disable=W0611 diff --git a/python-matplotlib.spec b/python-matplotlib.spec index b6e5c4b..493cd6a 100644 --- a/python-matplotlib.spec +++ b/python-matplotlib.spec @@ -32,13 +32,13 @@ %global _docdir_fmt %{name} # Updated test images for new FreeType. -%global mpl_images_version 3.10.3 +%global mpl_images_version 3.10.8 # The version of FreeType in this Fedora branch. -%global ftver 2.13.1 +%global ftver 2.14.1 Name: python-matplotlib -Version: 3.10.6 +Version: 3.10.8 %global Version %{version_no_tilde %{quote:%nil}} Release: %autorelease Summary: Python 2D plotting library @@ -65,12 +65,6 @@ Patch0001: 0004-Use-old-stride_windows-implementation-on-32-bit-x86.patch # Temporary fix for some tests. Patch0002: 0005-Partially-revert-TST-Fix-minor-issues-in-interactive.patch -# https://github.com/matplotlib/matplotlib/pull/30497 -Patch0003: 0006-TST-Use-a-temporary-directory-for-test_save_figure_r.patch - -# Fix AttributeError: module 'gi' has no attribute 'require_version' -Patch0004: https://github.com/matplotlib/matplotlib/pull/30675.patch - BuildRequires: gcc BuildRequires: gcc-c++ BuildRequires: glibc-langpack-en @@ -246,10 +240,14 @@ Requires: python3dist(pyqt6) %package -n python3-matplotlib-gtk3 Summary: GTK3 backend for python3-matplotlib %ifnarch %{ix86} +# For Cairo and xlib typelib files. +BuildRequires: gobject-introspection # This should be converted to typelib(Gtk) when supported BuildRequires: gtk3 BuildRequires: python3-gobject %endif +# For Cairo and xlib typelib files. +Requires: gobject-introspection Requires: gtk3%{?_isa} Requires: python3-gobject%{?_isa} Requires: python3-matplotlib%{?_isa} = %{version}-%{release} @@ -260,10 +258,14 @@ Requires: python3-matplotlib%{?_isa} = %{version}-%{release} %package -n python3-matplotlib-gtk4 Summary: GTK4 backend for python3-matplotlib %ifnarch %{ix86} +# For Cairo and xlib typelib files. +BuildRequires: gobject-introspection # This should be converted to typelib(Gtk) when supported BuildRequires: gtk4 BuildRequires: python3-gobject %endif +# For Cairo and xlib typelib files. +Requires: gobject-introspection Requires: gtk4%{?_isa} Requires: python3-gobject%{?_isa} Requires: python3-matplotlib%{?_isa} = %{version}-%{release} diff --git a/sources b/sources index 13fb1f3..7aaf430 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (matplotlib-3.10.6.tar.gz) = c12686d52229bbbd3c16fa5b1d633a7a6eec8e9bae58221554dc3d9595ceae05f985ebb3207425ad2e134e4dae671f590225b1d692b66c2099dd78da13cc6332 -SHA512 (matplotlib-3.10.3-with-freetype-2.13.1.tar.gz) = bb32e57bbd341c652d03361e3785145a9e89f59709eb588882f81cba4061c8aa7250c0d46ed07a588d75a055d72bbc6126c59e8777634385a458287f6ef8812f +SHA512 (matplotlib-3.10.8.tar.gz) = 66d07fb0b13821e88f6e6fe9f9882542340c074198dce7d5f8bf5d65d1c64326ae7517ad38d6357491c54aedd8cd1b03f555ad6d9337754db5dbd43c6305ab3f +SHA512 (matplotlib-3.10.8-with-freetype-2.14.1.tar.gz) = 03f5b406caced1e2a59f914a64808b146954ce2285551cb2314664f883a05cbc93a92a28f5c259817a77e048012542d09a0180a230591e40ccef297f477a1e5b