diff --git a/.gitignore b/.gitignore index f221992..94a56a3 100644 --- a/.gitignore +++ b/.gitignore @@ -120,3 +120,4 @@ matplotlib-1.0.0-without-gpc.tar.gz /matplotlib-3.10.3.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 diff --git a/0001-matplotlibrc-path-search-fix.patch b/0001-matplotlibrc-path-search-fix.patch index 179afbc..6b742dc 100644 --- a/0001-matplotlibrc-path-search-fix.patch +++ b/0001-matplotlibrc-path-search-fix.patch @@ -1,7 +1,7 @@ -From fde17e6359d32d90abcebc39a464c3f559a3fbca Mon Sep 17 00:00:00 2001 +From 5a669e4d5c8bfd28cf487316f52b7703aa34c2fb Mon Sep 17 00:00:00 2001 From: Elliott Sales de Andrade Date: Wed, 27 Sep 2017 19:35:59 -0400 -Subject: [PATCH 1/5] matplotlibrc path search fix +Subject: [PATCH 1/6] matplotlibrc path search fix Signed-off-by: Elliott Sales de Andrade --- diff --git a/0002-Set-FreeType-version-to-2.13.1-and-update-tolerances.patch b/0002-Set-FreeType-version-to-2.13.1-and-update-tolerances.patch index b8588c9..52006ce 100644 --- a/0002-Set-FreeType-version-to-2.13.1-and-update-tolerances.patch +++ b/0002-Set-FreeType-version-to-2.13.1-and-update-tolerances.patch @@ -1,7 +1,7 @@ -From 77bca4cb9812bb6d3abf4ad727c98e81b2952a15 Mon Sep 17 00:00:00 2001 +From 58b9eb1ef95ec927eec3f554a69eb7efeea5602f Mon Sep 17 00:00:00 2001 From: Elliott Sales de Andrade Date: Fri, 14 Feb 2020 06:05:42 -0500 -Subject: [PATCH 2/5] Set FreeType version to 2.13.1 and update tolerances +Subject: [PATCH 2/6] Set FreeType version to 2.13.1 and update tolerances Signed-off-by: Elliott Sales de Andrade --- diff --git a/0003-Unpin-meson-python-build-requirement.patch b/0003-Unpin-meson-python-build-requirement.patch index cb910d6..2d8c738 100644 --- a/0003-Unpin-meson-python-build-requirement.patch +++ b/0003-Unpin-meson-python-build-requirement.patch @@ -1,7 +1,7 @@ -From 825d864d5210f5a67554b0e0c874ab997cd74676 Mon Sep 17 00:00:00 2001 +From 2341947e31162df25ef5bbdc77e858b3d9038c6e Mon Sep 17 00:00:00 2001 From: Elliott Sales de Andrade Date: Fri, 13 Dec 2024 02:03:33 -0500 -Subject: [PATCH 3/5] Unpin meson-python build requirement +Subject: [PATCH 3/6] 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,7 +12,7 @@ Signed-off-by: Elliott Sales de Andrade 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml -index 5666016f05..2cd1e1c758 100644 +index e6d1abaf53..76755eec25 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -47,7 +47,7 @@ requires-python = ">=3.10" 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 732da2f..ca2d217 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 a91551b8de91535eef12752f95dfcb97aea8aed5 Mon Sep 17 00:00:00 2001 +From 0ff1d42e090eff8b6333e7eef1463153ba70d26e Mon Sep 17 00:00:00 2001 From: Elliott Sales de Andrade Date: Mon, 22 Aug 2022 18:43:28 -0400 -Subject: [PATCH 4/5] Use old stride_windows implementation on 32-bit x86 +Subject: [PATCH 4/6] Use old stride_windows implementation on 32-bit x86 Signed-off-by: Elliott Sales de Andrade --- 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 cf81647..8f33e35 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 ba6139686ff3c884aa2e6a5397c1f2f2cc951346 Mon Sep 17 00:00:00 2001 +From cda997ca3325e80b9a958775dda5e76a89a33e01 Mon Sep 17 00:00:00 2001 From: Elliott Sales de Andrade Date: Tue, 12 Nov 2024 01:05:25 -0500 -Subject: [PATCH 5/5] Partially revert "TST: Fix minor issues in interactive +Subject: [PATCH 5/6] Partially revert "TST: Fix minor issues in interactive backend test (#28838)" This reverts commit 7c7f94c5f71e99f148255e3bb570fec25c8fe754. 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 new file mode 100644 index 0000000..02de93b --- /dev/null +++ b/0006-TST-Use-a-temporary-directory-for-test_save_figure_r.patch @@ -0,0 +1,39 @@ +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/python-matplotlib.spec b/python-matplotlib.spec index 82d3b18..dca89cb 100644 --- a/python-matplotlib.spec +++ b/python-matplotlib.spec @@ -38,7 +38,7 @@ %global ftver 2.13.1 Name: python-matplotlib -Version: 3.10.5 +Version: 3.10.6 %global Version %{version_no_tilde %{quote:%nil}} Release: %autorelease Summary: Python 2D plotting library @@ -65,6 +65,9 @@ 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 + BuildRequires: gcc BuildRequires: gcc-c++ BuildRequires: glibc-langpack-en diff --git a/sources b/sources index f4bb4d9..13fb1f3 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (matplotlib-3.10.5.tar.gz) = 761388d0aad410b80179b3bb97d63b6a99d71338a0eb8801702f4a38f4a1a0fdecd8fbb6401e664d2f30a0256f412167c7c102fc494664c1837495572ebf3caa +SHA512 (matplotlib-3.10.6.tar.gz) = c12686d52229bbbd3c16fa5b1d633a7a6eec8e9bae58221554dc3d9595ceae05f985ebb3207425ad2e134e4dae671f590225b1d692b66c2099dd78da13cc6332 SHA512 (matplotlib-3.10.3-with-freetype-2.13.1.tar.gz) = bb32e57bbd341c652d03361e3785145a9e89f59709eb588882f81cba4061c8aa7250c0d46ed07a588d75a055d72bbc6126c59e8777634385a458287f6ef8812f