From a567434c0d64364e205f11fe2d241860452a34b5 Mon Sep 17 00:00:00 2001 From: Elliott Sales de Andrade Date: Mon, 6 Mar 2023 20:03:16 -0500 Subject: [PATCH] Update to latest version (#2164642) --- .gitignore | 2 + 0001-matplotlibrc-path-search-fix.patch | 4 +- ...Don-t-require-oldest-supported-numpy.patch | 4 +- ...sion-to-2.12.1-and-update-tolerances.patch | 6 +-- ...windows-implementation-on-32-bit-x86.patch | 4 +- 0006-Fix-setting-CSS-with-latest-GTK4.patch | 39 ------------------- ...t_set_line_coll_dash_image-tolerance.patch | 27 ------------- python-matplotlib.spec | 14 ++----- sources | 4 +- 9 files changed, 16 insertions(+), 88 deletions(-) delete mode 100644 0006-Fix-setting-CSS-with-latest-GTK4.patch delete mode 100644 0007-TST-Increase-test_set_line_coll_dash_image-tolerance.patch diff --git a/.gitignore b/.gitignore index d5d85dd..4b6bf93 100644 --- a/.gitignore +++ b/.gitignore @@ -96,3 +96,5 @@ matplotlib-1.0.0-without-gpc.tar.gz /matplotlib-3.7.0rc1-with-freetype-2.12.1.tar.gz /matplotlib-3.7.0.tar.gz /matplotlib-3.7.0-with-freetype-2.12.1.tar.gz +/matplotlib-3.7.1.tar.gz +/matplotlib-3.7.1-with-freetype-2.12.1.tar.gz diff --git a/0001-matplotlibrc-path-search-fix.patch b/0001-matplotlibrc-path-search-fix.patch index 81fb8d2..09d5ebd 100644 --- a/0001-matplotlibrc-path-search-fix.patch +++ b/0001-matplotlibrc-path-search-fix.patch @@ -1,7 +1,7 @@ -From ddfa1c59d9304eed3a70abcc98c6e1786ce3d751 Mon Sep 17 00:00:00 2001 +From e5fc2dc6299a3965fae77246f088a10633e6ba03 Mon Sep 17 00:00:00 2001 From: Elliott Sales de Andrade Date: Wed, 27 Sep 2017 19:35:59 -0400 -Subject: [PATCH 1/7] matplotlibrc path search fix +Subject: [PATCH 1/5] matplotlibrc path search fix Signed-off-by: Elliott Sales de Andrade --- diff --git a/0002-Don-t-require-oldest-supported-numpy.patch b/0002-Don-t-require-oldest-supported-numpy.patch index 752d223..2654876 100644 --- a/0002-Don-t-require-oldest-supported-numpy.patch +++ b/0002-Don-t-require-oldest-supported-numpy.patch @@ -1,7 +1,7 @@ -From a183eed4c8d341af938a49bb646a14f64df0c180 Mon Sep 17 00:00:00 2001 +From 42ccc6269120bea873873e3479f549b30004680b Mon Sep 17 00:00:00 2001 From: Elliott Sales de Andrade Date: Thu, 26 Jan 2023 06:40:06 -0500 -Subject: [PATCH 2/7] Don't require oldest-supported-numpy +Subject: [PATCH 2/5] Don't require oldest-supported-numpy Signed-off-by: Elliott Sales de Andrade --- diff --git a/0003-Set-FreeType-version-to-2.12.1-and-update-tolerances.patch b/0003-Set-FreeType-version-to-2.12.1-and-update-tolerances.patch index 25ef6c5..841eaad 100644 --- a/0003-Set-FreeType-version-to-2.12.1-and-update-tolerances.patch +++ b/0003-Set-FreeType-version-to-2.12.1-and-update-tolerances.patch @@ -1,7 +1,7 @@ -From 13103ca6deedcc82a8c22cee56688c10e18ee30e Mon Sep 17 00:00:00 2001 +From c00966e628018f2b1edc103c2c24e4296a6f24e3 Mon Sep 17 00:00:00 2001 From: Elliott Sales de Andrade Date: Fri, 14 Feb 2020 06:05:42 -0500 -Subject: [PATCH 3/7] Set FreeType version to 2.12.1 and update tolerances +Subject: [PATCH 3/5] Set FreeType version to 2.12.1 and update tolerances Signed-off-by: Elliott Sales de Andrade --- @@ -28,7 +28,7 @@ index 27de76f0c4..179d7ed1ff 100644 from matplotlib import ft2font if (ft2font.__freetype_version__ != LOCAL_FREETYPE_VERSION or diff --git a/lib/matplotlib/tests/test_axes.py b/lib/matplotlib/tests/test_axes.py -index 8bf6051b3e..2072056d9e 100644 +index 004f6320de..bbc3880a49 100644 --- a/lib/matplotlib/tests/test_axes.py +++ b/lib/matplotlib/tests/test_axes.py @@ -7388,7 +7388,7 @@ def test_normal_axes(): 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 b7af91e..bdaadf5 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 b019c8ef0d18c67ddb0350b8821fcbe93ad2ee84 Mon Sep 17 00:00:00 2001 +From c00da95dde370d3b04c0134cd10674d226830c67 Mon Sep 17 00:00:00 2001 From: Elliott Sales de Andrade Date: Mon, 22 Aug 2022 18:43:28 -0400 -Subject: [PATCH 4/7] 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 --- diff --git a/0006-Fix-setting-CSS-with-latest-GTK4.patch b/0006-Fix-setting-CSS-with-latest-GTK4.patch deleted file mode 100644 index 5218341..0000000 --- a/0006-Fix-setting-CSS-with-latest-GTK4.patch +++ /dev/null @@ -1,39 +0,0 @@ -From 49484f456c93830c25dc7d4afe2110da8450a485 Mon Sep 17 00:00:00 2001 -From: Elliott Sales de Andrade -Date: Tue, 21 Feb 2023 20:52:42 -0500 -Subject: [PATCH 6/7] Fix setting CSS with latest GTK4 - -In the upcoming 4.10 release, the type annotation was fixed [1]. There -may be some overrides added in PyGObject [2] to avoid this difference, -but we don't depend on a specific version of it to be able to rely on -that (and it's not released yet.) This code should work with the -override as well. - -[1] https://gitlab.gnome.org/GNOME/gtk/-/merge_requests/5441 -[2] https://gitlab.gnome.org/GNOME/pygobject/-/merge_requests/231 - -Signed-off-by: Elliott Sales de Andrade ---- - lib/matplotlib/backends/backend_gtk4.py | 6 +++++- - 1 file changed, 5 insertions(+), 1 deletion(-) - -diff --git a/lib/matplotlib/backends/backend_gtk4.py b/lib/matplotlib/backends/backend_gtk4.py -index 8628e14de0..3288192920 100644 ---- a/lib/matplotlib/backends/backend_gtk4.py -+++ b/lib/matplotlib/backends/backend_gtk4.py -@@ -74,7 +74,11 @@ class FigureCanvasGTK4(_FigureCanvasGTK, Gtk.DrawingArea): - self.set_focusable(True) - - css = Gtk.CssProvider() -- css.load_from_data(b".matplotlib-canvas { background-color: white; }") -+ style = '.matplotlib-canvas { background-color: white; }' -+ if Gtk.check_version(4, 9, 3) is None: -+ css.load_from_data(style, -1) -+ else: -+ css.load_from_data(style.encode('utf-8')) - style_ctx = self.get_style_context() - style_ctx.add_provider(css, Gtk.STYLE_PROVIDER_PRIORITY_APPLICATION) - style_ctx.add_class("matplotlib-canvas") --- -2.39.2 - diff --git a/0007-TST-Increase-test_set_line_coll_dash_image-tolerance.patch b/0007-TST-Increase-test_set_line_coll_dash_image-tolerance.patch deleted file mode 100644 index 8774158..0000000 --- a/0007-TST-Increase-test_set_line_coll_dash_image-tolerance.patch +++ /dev/null @@ -1,27 +0,0 @@ -From 254394ebc1413a363a678ed589adcd30cc986e0c Mon Sep 17 00:00:00 2001 -From: Elliott Sales de Andrade -Date: Mon, 27 Feb 2023 22:19:23 -0500 -Subject: [PATCH 7/7] TST: Increase test_set_line_coll_dash_image tolerance - slightly. - -Signed-off-by: Elliott Sales de Andrade ---- - lib/matplotlib/tests/test_lines.py | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/lib/matplotlib/tests/test_lines.py b/lib/matplotlib/tests/test_lines.py -index 7eecf5675a..b75d3c01b2 100644 ---- a/lib/matplotlib/tests/test_lines.py -+++ b/lib/matplotlib/tests/test_lines.py -@@ -185,7 +185,7 @@ def test_set_drawstyle(): - - @image_comparison( - ['line_collection_dashes'], remove_text=True, style='mpl20', -- tol=0.62 if platform.machine() in ('aarch64', 'ppc64le', 's390x') else 0) -+ tol=0.65 if platform.machine() in ('aarch64', 'ppc64le', 's390x') else 0) - def test_set_line_coll_dash_image(): - fig, ax = plt.subplots() - np.random.seed(0) --- -2.39.2 - diff --git a/python-matplotlib.spec b/python-matplotlib.spec index 3e2a973..f10b8d8 100644 --- a/python-matplotlib.spec +++ b/python-matplotlib.spec @@ -30,14 +30,14 @@ %global _docdir_fmt %{name} # Updated test images for new FreeType. -%global mpl_images_version 3.7.0 +%global mpl_images_version 3.7.1 # The version of FreeType in this Fedora branch. %global ftver 2.12.1 Name: python-matplotlib -Version: 3.7.0 -%global Version 3.7.0 +Version: 3.7.1 +%global Version 3.7.1 Release: %autorelease Summary: Python 2D plotting library # qt_editor backend is MIT @@ -62,10 +62,6 @@ Patch0001: 0004-Use-old-stride_windows-implementation-on-32-bit-x86.patch # https://github.com/matplotlib/matplotlib/pull/25068 Source2000: pgf_pdflatex.pdf Source2001: pgf_rcupdate2.pdf -# https://github.com/matplotlib/matplotlib/pull/25280 -Patch0002: 0006-Fix-setting-CSS-with-latest-GTK4.patch -# https://github.com/matplotlib/matplotlib/pull/25341 -Patch0003: 0007-TST-Increase-test_set_line_coll_dash_image-tolerance.patch BuildRequires: gcc BuildRequires: gcc-c++ @@ -316,10 +312,6 @@ cp -p %{SOURCE1} mplsetup.cfg %patch0001 -p1 # https://github.com/matplotlib/matplotlib/pull/25068 cp -a %SOURCE2000 %SOURCE2001 lib/matplotlib/tests/baseline_images/test_backend_pgf/ -# https://github.com/matplotlib/matplotlib/pull/25280 -%patch0002 -p1 -# https://github.com/matplotlib/matplotlib/pull/25341 -%patch0003 -p1 %generate_buildrequires diff --git a/sources b/sources index 9e4ec8d..e88acaf 100644 --- a/sources +++ b/sources @@ -1,4 +1,4 @@ -SHA512 (matplotlib-3.7.0.tar.gz) = 60207fb10394422b7a11faffb2775c23c377e6dd72ef9f3fde1099d50e1810c4be55cf814da74fd87faf49a628459472945bb901a4cbe73c9676df54b862ad5c -SHA512 (matplotlib-3.7.0-with-freetype-2.12.1.tar.gz) = 7c70aaba58d4fcc0bea4f8bc76de71e899c71ceca937ee983531ad79d5604568d8e370bd913bef96ab103903fbc1c5f9318eb5c589fbc33cb2d48b39a04bbb21 +SHA512 (matplotlib-3.7.1.tar.gz) = d7db4213d5b38eba779ba06ffaa8e67a435192e4a8cf62f8e1cd4b8079cd257b2e83cb79926df012b7084c785c0ce8b03275035f68cfcf0a36b0dda7322f2e67 +SHA512 (matplotlib-3.7.1-with-freetype-2.12.1.tar.gz) = 51497948bc4759f5ec4064cb40a2d6cd5214addd62ef3d1a1c887bece6c60e65448c918f2c7b56532db344ac22127c5661bbf324feca09911c5213bdca2f0c14 SHA512 (pgf_pdflatex.pdf) = dc81cc2247f54a2aaf9507ce1db556d91170674796b564d32bfb4c23f38effab6543394cb6caee3c29a32639c9d848517b400d1cac8d20f90678367818a62aa1 SHA512 (pgf_rcupdate2.pdf) = 8c0a71047871a055de01a4f0a90aeda9da27e53338d1e89cb20bd52bc54e40a1180df933de0f27c9116d3e983d03b0c47008bebfcf110cf282f8d1d19c026070