From 14bebd4f34053e69d5b7f5efc2cd1d431557dca9 Mon Sep 17 00:00:00 2001 From: Elliott Sales de Andrade Date: Fri, 12 Aug 2022 03:23:30 -0400 Subject: [PATCH] Update to latest version (#2117483) --- .gitignore | 2 ++ 0001-matplotlibrc-path-search-fix.patch | 12 +++++----- ...sion-to-2.11.0-and-update-tolerances.patch | 24 +++++++++---------- ...a-few-test-tolerances-on-some-arches.patch | 18 +++++++------- python-matplotlib.spec | 12 ++++------ sources | 4 ++-- 6 files changed, 36 insertions(+), 36 deletions(-) diff --git a/.gitignore b/.gitignore index 9f9b814..939fe29 100644 --- a/.gitignore +++ b/.gitignore @@ -77,3 +77,5 @@ matplotlib-1.0.0-without-gpc.tar.gz /matplotlib-3.5.1-with-freetype-2.11.0.tar.gz /matplotlib-3.5.2.tar.gz /matplotlib-3.5.2-with-freetype-2.11.0.tar.gz +/matplotlib-3.5.3.tar.gz +/matplotlib-3.5.3-with-freetype-2.11.0.tar.gz diff --git a/0001-matplotlibrc-path-search-fix.patch b/0001-matplotlibrc-path-search-fix.patch index 516ff27..1078d15 100644 --- a/0001-matplotlibrc-path-search-fix.patch +++ b/0001-matplotlibrc-path-search-fix.patch @@ -1,4 +1,4 @@ -From 595f7e2f1c1349d1015f13a00da33e08d02d6640 Mon Sep 17 00:00:00 2001 +From a2d7ef7b895d3b0bc9654d31c6cb40935eec0ce9 Mon Sep 17 00:00:00 2001 From: Elliott Sales de Andrade Date: Wed, 27 Sep 2017 19:35:59 -0400 Subject: [PATCH 1/3] matplotlibrc path search fix @@ -9,10 +9,10 @@ Signed-off-by: Elliott Sales de Andrade 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/matplotlib/__init__.py b/lib/matplotlib/__init__.py -index ba9cd6c90c..bc800e1322 100644 +index b8fd4f9860..23841c8377 100644 --- a/lib/matplotlib/__init__.py +++ b/lib/matplotlib/__init__.py -@@ -524,7 +524,8 @@ def get_cachedir(): +@@ -526,7 +526,8 @@ def get_cachedir(): @_logged_cached('matplotlib data path: %s') def get_data_path(): """Return the path to Matplotlib data.""" @@ -22,7 +22,7 @@ index ba9cd6c90c..bc800e1322 100644 def matplotlib_fname(): -@@ -544,6 +545,7 @@ def matplotlib_fname(): +@@ -546,6 +547,7 @@ def matplotlib_fname(): is not defined) - On other platforms, - ``$HOME/.matplotlib/matplotlibrc`` if ``$HOME`` is defined @@ -30,7 +30,7 @@ index ba9cd6c90c..bc800e1322 100644 - Lastly, it looks in ``$MATPLOTLIBDATA/matplotlibrc``, which should always exist. """ -@@ -562,6 +564,7 @@ def matplotlib_fname(): +@@ -564,6 +566,7 @@ def matplotlib_fname(): yield matplotlibrc yield os.path.join(matplotlibrc, 'matplotlibrc') yield os.path.join(get_configdir(), 'matplotlibrc') @@ -39,5 +39,5 @@ index ba9cd6c90c..bc800e1322 100644 for fname in gen_candidates(): -- -2.35.1 +2.36.1 diff --git a/0002-Set-FreeType-version-to-2.11.0-and-update-tolerances.patch b/0002-Set-FreeType-version-to-2.11.0-and-update-tolerances.patch index 6686306..d310a82 100644 --- a/0002-Set-FreeType-version-to-2.11.0-and-update-tolerances.patch +++ b/0002-Set-FreeType-version-to-2.11.0-and-update-tolerances.patch @@ -1,4 +1,4 @@ -From 200afb4b8503031e1aad437482b2bc61b1cede32 Mon Sep 17 00:00:00 2001 +From 1455f1909ac18fb79e234d1d5f78ecb2757fe398 Mon Sep 17 00:00:00 2001 From: Elliott Sales de Andrade Date: Fri, 14 Feb 2020 06:05:42 -0500 Subject: [PATCH 2/3] Set FreeType version to 2.11.0 and update tolerances. @@ -15,10 +15,10 @@ Signed-off-by: Elliott Sales de Andrade 7 files changed, 23 insertions(+), 13 deletions(-) diff --git a/lib/matplotlib/__init__.py b/lib/matplotlib/__init__.py -index bc800e1322..10ff904c8e 100644 +index 23841c8377..94113e7570 100644 --- a/lib/matplotlib/__init__.py +++ b/lib/matplotlib/__init__.py -@@ -1201,7 +1201,7 @@ default_test_modules = [ +@@ -1203,7 +1203,7 @@ default_test_modules = [ def _init_tests(): # The version of FreeType to install locally for running the # tests. This must match the value in `setupext.py` @@ -28,10 +28,10 @@ index bc800e1322..10ff904c8e 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 eb4c34382b..03b92d34fa 100644 +index 3bd3fecac3..f0b247a7bb 100644 --- a/lib/matplotlib/tests/test_axes.py +++ b/lib/matplotlib/tests/test_axes.py -@@ -6710,7 +6710,7 @@ def test_normal_axes(): +@@ -6732,7 +6732,7 @@ def test_normal_axes(): ] for nn, b in enumerate(bbaxis): targetbb = mtransforms.Bbox.from_bounds(*target[nn]) @@ -40,7 +40,7 @@ index eb4c34382b..03b92d34fa 100644 target = [ [150.0, 119.999, 930.0, 11.111], -@@ -6728,7 +6728,7 @@ def test_normal_axes(): +@@ -6750,7 +6750,7 @@ def test_normal_axes(): target = [85.5138, 75.88888, 1021.11, 1017.11] targetbb = mtransforms.Bbox.from_bounds(*target) @@ -63,7 +63,7 @@ index 8fd3cc5a35..b1e0fa57cd 100644 def test_colorbar_align(): diff --git a/lib/matplotlib/tests/test_mathtext.py b/lib/matplotlib/tests/test_mathtext.py -index 80d989922c..c7cbd969b1 100644 +index 6921a17980..ba0e2a3a6c 100644 --- a/lib/matplotlib/tests/test_mathtext.py +++ b/lib/matplotlib/tests/test_mathtext.py @@ -1,5 +1,6 @@ @@ -73,7 +73,7 @@ index 80d989922c..c7cbd969b1 100644 import re import shlex from xml.etree import ElementTree as ET -@@ -191,7 +192,8 @@ def baseline_images(request, fontset, index, text): +@@ -192,7 +193,8 @@ def baseline_images(request, fontset, index, text): @pytest.mark.parametrize( 'fontset', ['cm', 'stix', 'stixsans', 'dejavusans', 'dejavuserif']) @pytest.mark.parametrize('baseline_images', ['mathtext'], indirect=True) @@ -83,7 +83,7 @@ index 80d989922c..c7cbd969b1 100644 def test_mathtext_rendering(baseline_images, fontset, index, text): mpl.rcParams['mathtext.fontset'] = fontset fig = plt.figure(figsize=(5.25, 0.75)) -@@ -215,7 +217,8 @@ def test_mathtext_rendering_lightweight(baseline_images, fontset, index, text): +@@ -216,7 +218,8 @@ def test_mathtext_rendering_lightweight(baseline_images, fontset, index, text): @pytest.mark.parametrize( 'fontset', ['cm', 'stix', 'stixsans', 'dejavusans', 'dejavuserif']) @pytest.mark.parametrize('baseline_images', ['mathfont'], indirect=True) @@ -129,7 +129,7 @@ index e9b01b160d..beab853489 100644 diff --git a/setupext.py b/setupext.py -index 90bc304531..7ae976b8fa 100644 +index ae8c21599f..9656104b0d 100644 --- a/setupext.py +++ b/setupext.py @@ -167,6 +167,12 @@ _freetype_hashes = { @@ -154,7 +154,7 @@ index 90bc304531..7ae976b8fa 100644 if sys.platform.startswith('win') and platform.machine() == 'ARM64': # older versions of freetype are not supported for win/arm64 # Matplotlib tests will not pass -@@ -590,6 +596,7 @@ class FreeType(SetupPackage): +@@ -593,6 +599,7 @@ class FreeType(SetupPackage): ext.extra_objects.insert( 0, str(src_path / 'objs' / '.libs' / libfreetype)) ext.define_macros.append(('FREETYPE_BUILD_TYPE', 'local')) @@ -163,5 +163,5 @@ index 90bc304531..7ae976b8fa 100644 def do_custom_build(self, env): # We're using a system freetype -- -2.35.1 +2.36.1 diff --git a/0003-Increase-a-few-test-tolerances-on-some-arches.patch b/0003-Increase-a-few-test-tolerances-on-some-arches.patch index ed85cc9..9fb29eb 100644 --- a/0003-Increase-a-few-test-tolerances-on-some-arches.patch +++ b/0003-Increase-a-few-test-tolerances-on-some-arches.patch @@ -1,4 +1,4 @@ -From eec799b589e203bfadaed0edb67e1719b843f0fd Mon Sep 17 00:00:00 2001 +From 7ea8c1e5c1527a5b43b229c44f838e8811728839 Mon Sep 17 00:00:00 2001 From: Elliott Sales de Andrade Date: Tue, 24 Aug 2021 04:47:50 -0400 Subject: [PATCH 3/3] Increase a few test tolerances on some arches. @@ -14,7 +14,7 @@ Signed-off-by: Elliott Sales de Andrade 6 files changed, 17 insertions(+), 8 deletions(-) diff --git a/lib/matplotlib/tests/test_axes.py b/lib/matplotlib/tests/test_axes.py -index 03b92d34fa..0149a5d01a 100644 +index f0b247a7bb..0a025bb6c7 100644 --- a/lib/matplotlib/tests/test_axes.py +++ b/lib/matplotlib/tests/test_axes.py @@ -918,7 +918,8 @@ def test_imshow(): @@ -38,7 +38,7 @@ index 03b92d34fa..0149a5d01a 100644 x, y, z = contour_dat() diff --git a/lib/matplotlib/tests/test_colorbar.py b/lib/matplotlib/tests/test_colorbar.py -index 304056f6d1..083c595f6b 100644 +index f103fde7ee..920f392fc5 100644 --- a/lib/matplotlib/tests/test_colorbar.py +++ b/lib/matplotlib/tests/test_colorbar.py @@ -1,3 +1,5 @@ @@ -47,8 +47,8 @@ index 304056f6d1..083c595f6b 100644 import numpy as np import pytest -@@ -218,7 +220,8 @@ def test_colorbar_single_ax_panchor_false(): - plt.colorbar(panchor=False) +@@ -230,7 +232,8 @@ def test_colorbar_single_ax_panchor_east(constrained): + assert ax.get_anchor() == 'E' -@image_comparison(['contour_colorbar.png'], remove_text=True) @@ -58,7 +58,7 @@ index 304056f6d1..083c595f6b 100644 fig, ax = plt.subplots(figsize=(4, 2)) data = np.arange(1200).reshape(30, 40) - 500 diff --git a/lib/matplotlib/tests/test_contour.py b/lib/matplotlib/tests/test_contour.py -index 10fb011166..40f60de022 100644 +index f4854db502..c4f0a2a31d 100644 --- a/lib/matplotlib/tests/test_contour.py +++ b/lib/matplotlib/tests/test_contour.py @@ -345,7 +345,8 @@ def test_contourf_log_extension(): @@ -72,10 +72,10 @@ index 10fb011166..40f60de022 100644 # colorbars was cleaned up... def test_contour_addlines(): diff --git a/lib/matplotlib/tests/test_image.py b/lib/matplotlib/tests/test_image.py -index 719b190578..860a2444df 100644 +index ae02a50727..15f843fd42 100644 --- a/lib/matplotlib/tests/test_image.py +++ b/lib/matplotlib/tests/test_image.py -@@ -1323,8 +1323,8 @@ def test_nonuniform_and_pcolor(): +@@ -1329,8 +1329,8 @@ def test_nonuniform_and_pcolor(): ax.set(xlim=(0, 10)) @@ -123,5 +123,5 @@ index c8824feb06..879d43f28b 100644 X, Y, U, V = velocity_field() plt.streamplot(X, Y, U, V, color=U, density=0.6, linewidth=2, -- -2.35.1 +2.36.1 diff --git a/python-matplotlib.spec b/python-matplotlib.spec index 4ca6e19..c03d2f6 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.5.2 +%global mpl_images_version 3.5.3 # The version of FreeType in this Fedora branch. %global ftver 2.11.0 Name: python-matplotlib -Version: 3.5.2 -%global Version 3.5.2 +Version: 3.5.3 +%global Version 3.5.3 Release: %autorelease Summary: Python 2D plotting library # qt_editor backend is MIT @@ -56,7 +56,6 @@ Patch1001: 0001-matplotlibrc-path-search-fix.patch # Increase tolerances for new FreeType everywhere: Patch1002: 0002-Set-FreeType-version-to-%{ftver}-and-update-tolerances.patch Patch1003: 0003-Increase-a-few-test-tolerances-on-some-arches.patch -Patch0001: https://github.com/matplotlib/matplotlib/pull/22979.patch BuildRequires: gcc BuildRequires: gcc-c++ @@ -294,9 +293,6 @@ cp -p %{SOURCE1} mplsetup.cfg %patch1003 -p1 -# Backports -%patch0001 -p1 - %generate_buildrequires %pyproject_buildrequires -r @@ -398,7 +394,9 @@ MPLCONFIGDIR=$PWD \ %pycached %exclude %{python3_sitearch}/matplotlib/backends/backend_tk*.py %exclude %{python3_sitearch}/matplotlib/backends/_tkagg.* %pycached %exclude %{python3_sitearch}/matplotlib/backends/backend_wx*.py +%if %{with html} %exclude %{_pkgdocdir}/*/ +%endif %files -n python3-matplotlib-test-data %{python3_sitearch}/matplotlib/tests/baseline_images/ diff --git a/sources b/sources index 90a730a..e39d287 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (matplotlib-3.5.2.tar.gz) = 9b6e87aeee69e106c90d1f915d2f97bf42a538bc00d885c884d2723355c2339c2cf036d2d80097db50ffa6c48a3118d96ad4cec7ff38368b19ce33eaae75f396 -SHA512 (matplotlib-3.5.2-with-freetype-2.11.0.tar.gz) = 6485e6cbfc7239af0e07555128e75db8dc1919674e8593caf2d6fa38db20595d306403e326c9b3a4a848b45e1bd48266bddda06df2d0a63f93cd590949528bf7 +SHA512 (matplotlib-3.5.3.tar.gz) = 8d8bc28ef62a2373a0740ba5322f04ddbcc6485caf06883b54904f1ff7c979b9c4425516274d2b9e0cb63607d11bc3149044bee7ccac37de6ccd80480791cd4d +SHA512 (matplotlib-3.5.3-with-freetype-2.11.0.tar.gz) = 96622a7ac10797bfe66c6e06ae666522d01a229aac16c612e3a86580b20783c63cc2e20936d0b988ba4f1140916d4ad8f63c5c5bed9480a3cbd06cc458322caf