From 19bce65d7ffe25a118817f6859102cb1ea31b58a Mon Sep 17 00:00:00 2001 From: Elliott Sales de Andrade Date: Mon, 9 Aug 2021 21:40:15 -0400 Subject: [PATCH] Tweak tolerances for ppc64le and s390x. --- 0001-matplotlibrc-path-search-fix.patch | 2 +- ...sion-to-2.11.0-and-update-tolerances.patch | 2 +- ...-increase-tolerance-on-rcupdate-test.patch | 2 +- ...Use-new-style-for-test_text_urls_tex.patch | 2 +- ...8-FIX-Include-0-when-checking-lognor.patch | 2 +- ...hfont-test-tolerance-on-some-systems.patch | 34 +++++++++++++++++++ python-matplotlib.spec | 3 ++ 7 files changed, 42 insertions(+), 5 deletions(-) create mode 100644 0006-Increase-mathfont-test-tolerance-on-some-systems.patch diff --git a/0001-matplotlibrc-path-search-fix.patch b/0001-matplotlibrc-path-search-fix.patch index effc5be..05d963c 100644 --- a/0001-matplotlibrc-path-search-fix.patch +++ b/0001-matplotlibrc-path-search-fix.patch @@ -1,7 +1,7 @@ From 6277ea0c008b02cd2abe017d041b43a35a407c6c 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.11.0-and-update-tolerances.patch b/0002-Set-FreeType-version-to-2.11.0-and-update-tolerances.patch index 3de20f8..29ac7fc 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,7 +1,7 @@ From 322fe366ece11ae948c7f6ba0191f7dbc5db444b 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.11.0 and update tolerances. +Subject: [PATCH 2/6] Set FreeType version to 2.11.0 and update tolerances. Signed-off-by: Elliott Sales de Andrade --- diff --git a/0003-Slightly-increase-tolerance-on-rcupdate-test.patch b/0003-Slightly-increase-tolerance-on-rcupdate-test.patch index 0d89834..0c639f6 100644 --- a/0003-Slightly-increase-tolerance-on-rcupdate-test.patch +++ b/0003-Slightly-increase-tolerance-on-rcupdate-test.patch @@ -1,7 +1,7 @@ From d807e4e108073ee0fbda02340b206bf3766d9c7c Mon Sep 17 00:00:00 2001 From: Elliott Sales de Andrade Date: Fri, 4 Jun 2021 02:32:31 -0400 -Subject: [PATCH 3/5] Slightly increase tolerance on rcupdate test. +Subject: [PATCH 3/6] Slightly increase tolerance on rcupdate test. Signed-off-by: Elliott Sales de Andrade --- diff --git a/0004-Use-new-style-for-test_text_urls_tex.patch b/0004-Use-new-style-for-test_text_urls_tex.patch index 8759228..c973f2f 100644 --- a/0004-Use-new-style-for-test_text_urls_tex.patch +++ b/0004-Use-new-style-for-test_text_urls_tex.patch @@ -1,7 +1,7 @@ From ea96e5684af98e28e704dc26f12b793c6032ada6 Mon Sep 17 00:00:00 2001 From: Elliott Sales de Andrade Date: Fri, 4 Jun 2021 03:20:38 -0400 -Subject: [PATCH 4/5] Use new style for test_text_urls_tex. +Subject: [PATCH 4/6] Use new style for test_text_urls_tex. This test does not depend on the font style, just that the annotation appears over it. Switching to mpl20 style stops using Helvetica, and diff --git a/0005-Backport-PR-20488-FIX-Include-0-when-checking-lognor.patch b/0005-Backport-PR-20488-FIX-Include-0-when-checking-lognor.patch index 2e7c94c..5599761 100644 --- a/0005-Backport-PR-20488-FIX-Include-0-when-checking-lognor.patch +++ b/0005-Backport-PR-20488-FIX-Include-0-when-checking-lognor.patch @@ -1,7 +1,7 @@ From 982f5255e5da9c5023ca9997aff78c86eb0e8000 Mon Sep 17 00:00:00 2001 From: Elliott Sales de Andrade Date: Thu, 24 Jun 2021 01:45:04 -0400 -Subject: [PATCH 5/5] Backport PR #20488: FIX: Include 0 when checking lognorm +Subject: [PATCH 5/6] Backport PR #20488: FIX: Include 0 when checking lognorm vmin Signed-off-by: Elliott Sales de Andrade diff --git a/0006-Increase-mathfont-test-tolerance-on-some-systems.patch b/0006-Increase-mathfont-test-tolerance-on-some-systems.patch new file mode 100644 index 0000000..1d01636 --- /dev/null +++ b/0006-Increase-mathfont-test-tolerance-on-some-systems.patch @@ -0,0 +1,34 @@ +From 157025487ba0e446933068c01cd50f2c6691a19a Mon Sep 17 00:00:00 2001 +From: Elliott Sales de Andrade +Date: Mon, 9 Aug 2021 21:38:15 -0400 +Subject: [PATCH 6/6] Increase mathfont test tolerance on some systems. + +Signed-off-by: Elliott Sales de Andrade +--- + lib/matplotlib/tests/test_mathtext.py | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/lib/matplotlib/tests/test_mathtext.py b/lib/matplotlib/tests/test_mathtext.py +index b5fd906d2f..726c226d27 100644 +--- a/lib/matplotlib/tests/test_mathtext.py ++++ b/lib/matplotlib/tests/test_mathtext.py +@@ -1,5 +1,6 @@ + import io + import os ++import platform + import re + + import numpy as np +@@ -189,7 +190,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) +-@image_comparison(baseline_images=None) ++@image_comparison(baseline_images=None, ++ tol=0.011 if platform.machine() in ('ppc64le', 's390x') else 0) + def test_mathtext_rendering(baseline_images, fontset, index, text): + mpl.rcParams['mathtext.fontset'] = fontset + fig = plt.figure(figsize=(5.25, 0.75)) +-- +2.31.1 + diff --git a/python-matplotlib.spec b/python-matplotlib.spec index 6c55b47..720408b 100644 --- a/python-matplotlib.spec +++ b/python-matplotlib.spec @@ -71,6 +71,8 @@ Patch1003: 0003-Slightly-increase-tolerance-on-rcupdate-test.patch Patch1004: 0004-Use-new-style-for-test_text_urls_tex.patch # https://github.com/matplotlib/matplotlib/pull/20488 Patch1005: 0005-Backport-PR-20488-FIX-Include-0-when-checking-lognor.patch +# Tweak tolerances a bit. +Patch1006: 0006-Increase-mathfont-test-tolerance-on-some-systems.patch BuildRequires: gcc BuildRequires: gcc-c++ @@ -329,6 +331,7 @@ cp -p %{SOURCE1} setup.cfg %patch1003 -p1 %patch1004 -p1 %patch1005 -p1 +%patch1006 -p1 %build