Upgrade 3.6.2
Signed-off-by: cherry530 <xuping33@huawei.com> (cherry picked from commit 3c152cedddb38f7bb5533df906313b1ecabde105)
This commit is contained in:
parent
c203584c65
commit
462410c875
@ -1,7 +1,7 @@
|
|||||||
From 60ab4094d885067c50694d2f11cd640dc5c0f0c6 Mon Sep 17 00:00:00 2001
|
From 3e43f06eaad8cdb48d30b4cbe23a881c6fa5c1ff Mon Sep 17 00:00:00 2001
|
||||||
From: Elliott Sales de Andrade <quantum.analyst@gmail.com>
|
From: Elliott Sales de Andrade <quantum.analyst@gmail.com>
|
||||||
Date: Wed, 27 Sep 2017 19:35:59 -0400
|
Date: Wed, 27 Sep 2017 19:35:59 -0400
|
||||||
Subject: [PATCH 1/2] matplotlibrc path search fix
|
Subject: [PATCH 1/4] matplotlibrc path search fix
|
||||||
|
|
||||||
Signed-off-by: Elliott Sales de Andrade <quantum.analyst@gmail.com>
|
Signed-off-by: Elliott Sales de Andrade <quantum.analyst@gmail.com>
|
||||||
---
|
---
|
||||||
@ -9,10 +9,10 @@ Signed-off-by: Elliott Sales de Andrade <quantum.analyst@gmail.com>
|
|||||||
1 file changed, 4 insertions(+), 1 deletion(-)
|
1 file changed, 4 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
diff --git a/lib/matplotlib/__init__.py b/lib/matplotlib/__init__.py
|
diff --git a/lib/matplotlib/__init__.py b/lib/matplotlib/__init__.py
|
||||||
index 71c68a3d6b..88be8e97b0 100644
|
index 77d25bbe33..9786447e23 100644
|
||||||
--- a/lib/matplotlib/__init__.py
|
--- a/lib/matplotlib/__init__.py
|
||||||
+++ b/lib/matplotlib/__init__.py
|
+++ b/lib/matplotlib/__init__.py
|
||||||
@@ -473,7 +473,8 @@ def get_cachedir():
|
@@ -540,7 +540,8 @@ def get_cachedir():
|
||||||
@_logged_cached('matplotlib data path: %s')
|
@_logged_cached('matplotlib data path: %s')
|
||||||
def get_data_path():
|
def get_data_path():
|
||||||
"""Return the path to Matplotlib data."""
|
"""Return the path to Matplotlib data."""
|
||||||
@ -22,7 +22,7 @@ index 71c68a3d6b..88be8e97b0 100644
|
|||||||
|
|
||||||
|
|
||||||
def matplotlib_fname():
|
def matplotlib_fname():
|
||||||
@@ -493,6 +494,7 @@ def matplotlib_fname():
|
@@ -560,6 +561,7 @@ def matplotlib_fname():
|
||||||
is not defined)
|
is not defined)
|
||||||
- On other platforms,
|
- On other platforms,
|
||||||
- ``$HOME/.matplotlib/matplotlibrc`` if ``$HOME`` is defined
|
- ``$HOME/.matplotlib/matplotlibrc`` if ``$HOME`` is defined
|
||||||
@ -30,7 +30,7 @@ index 71c68a3d6b..88be8e97b0 100644
|
|||||||
- Lastly, it looks in ``$MATPLOTLIBDATA/matplotlibrc``, which should always
|
- Lastly, it looks in ``$MATPLOTLIBDATA/matplotlibrc``, which should always
|
||||||
exist.
|
exist.
|
||||||
"""
|
"""
|
||||||
@@ -511,6 +513,7 @@ def matplotlib_fname():
|
@@ -578,6 +580,7 @@ def matplotlib_fname():
|
||||||
yield matplotlibrc
|
yield matplotlibrc
|
||||||
yield os.path.join(matplotlibrc, 'matplotlibrc')
|
yield os.path.join(matplotlibrc, 'matplotlibrc')
|
||||||
yield os.path.join(get_configdir(), 'matplotlibrc')
|
yield os.path.join(get_configdir(), 'matplotlibrc')
|
||||||
@ -39,5 +39,5 @@ index 71c68a3d6b..88be8e97b0 100644
|
|||||||
|
|
||||||
for fname in gen_candidates():
|
for fname in gen_candidates():
|
||||||
--
|
--
|
||||||
2.31.1
|
2.36.1
|
||||||
|
|
||||||
|
|||||||
@ -1,37 +1,36 @@
|
|||||||
From 7ca8afa7fa3e141464c1ef2b2c58b23b586bf310 Mon Sep 17 00:00:00 2001
|
From c7f6a197992cfd989fddb858afcde5abcdecf70e Mon Sep 17 00:00:00 2001
|
||||||
From: Elliott Sales de Andrade <quantum.analyst@gmail.com>
|
From: Elliott Sales de Andrade <quantum.analyst@gmail.com>
|
||||||
Date: Fri, 14 Feb 2020 06:05:42 -0500
|
Date: Fri, 14 Feb 2020 06:05:42 -0500
|
||||||
Subject: [PATCH 2/2] Set FreeType version to 2.10.4 and update tolerances.
|
Subject: [PATCH 2/4] Set FreeType version to 2.12.1 and update tolerances.
|
||||||
|
|
||||||
Signed-off-by: Elliott Sales de Andrade <quantum.analyst@gmail.com>
|
Signed-off-by: Elliott Sales de Andrade <quantum.analyst@gmail.com>
|
||||||
---
|
---
|
||||||
lib/matplotlib/__init__.py | 2 +-
|
lib/matplotlib/__init__.py | 2 +-
|
||||||
lib/matplotlib/tests/test_axes.py | 4 ++--
|
lib/matplotlib/tests/test_axes.py | 4 ++--
|
||||||
lib/matplotlib/tests/test_constrainedlayout.py | 2 +-
|
lib/matplotlib/tests/test_constrainedlayout.py | 6 +++---
|
||||||
lib/matplotlib/tests/test_mathtext.py | 7 +++++--
|
|
||||||
lib/matplotlib/tests/test_polar.py | 2 +-
|
lib/matplotlib/tests/test_polar.py | 2 +-
|
||||||
lib/matplotlib/tests/test_tightlayout.py | 10 +++++-----
|
lib/matplotlib/tests/test_tightlayout.py | 10 +++++-----
|
||||||
setupext.py | 9 ++++++++-
|
setupext.py | 15 +++++++++++++--
|
||||||
7 files changed, 23 insertions(+), 13 deletions(-)
|
6 files changed, 25 insertions(+), 14 deletions(-)
|
||||||
|
|
||||||
diff --git a/lib/matplotlib/__init__.py b/lib/matplotlib/__init__.py
|
diff --git a/lib/matplotlib/__init__.py b/lib/matplotlib/__init__.py
|
||||||
index 88be8e97b0..22dc74181e 100644
|
index 9786447e23..56266f0688 100644
|
||||||
--- a/lib/matplotlib/__init__.py
|
--- a/lib/matplotlib/__init__.py
|
||||||
+++ b/lib/matplotlib/__init__.py
|
+++ b/lib/matplotlib/__init__.py
|
||||||
@@ -1137,7 +1137,7 @@ default_test_modules = [
|
@@ -1213,7 +1213,7 @@ default_test_modules = [
|
||||||
def _init_tests():
|
def _init_tests():
|
||||||
# The version of FreeType to install locally for running the
|
# The version of FreeType to install locally for running the
|
||||||
# tests. This must match the value in `setupext.py`
|
# tests. This must match the value in `setupext.py`
|
||||||
- LOCAL_FREETYPE_VERSION = '2.6.1'
|
- LOCAL_FREETYPE_VERSION = '2.6.1'
|
||||||
+ LOCAL_FREETYPE_VERSION = '2.10.4'
|
+ LOCAL_FREETYPE_VERSION = '2.12.1'
|
||||||
|
|
||||||
from matplotlib import ft2font
|
from matplotlib import ft2font
|
||||||
if (ft2font.__freetype_version__ != LOCAL_FREETYPE_VERSION or
|
if (ft2font.__freetype_version__ != LOCAL_FREETYPE_VERSION or
|
||||||
diff --git a/lib/matplotlib/tests/test_axes.py b/lib/matplotlib/tests/test_axes.py
|
diff --git a/lib/matplotlib/tests/test_axes.py b/lib/matplotlib/tests/test_axes.py
|
||||||
index 7950e5b830..046dbbe1b8 100644
|
index 8d6466c749..c8604b8657 100644
|
||||||
--- a/lib/matplotlib/tests/test_axes.py
|
--- a/lib/matplotlib/tests/test_axes.py
|
||||||
+++ b/lib/matplotlib/tests/test_axes.py
|
+++ b/lib/matplotlib/tests/test_axes.py
|
||||||
@@ -6500,7 +6500,7 @@ def test_normal_axes():
|
@@ -7210,7 +7210,7 @@ def test_normal_axes():
|
||||||
]
|
]
|
||||||
for nn, b in enumerate(bbaxis):
|
for nn, b in enumerate(bbaxis):
|
||||||
targetbb = mtransforms.Bbox.from_bounds(*target[nn])
|
targetbb = mtransforms.Bbox.from_bounds(*target[nn])
|
||||||
@ -40,7 +39,7 @@ index 7950e5b830..046dbbe1b8 100644
|
|||||||
|
|
||||||
target = [
|
target = [
|
||||||
[150.0, 119.999, 930.0, 11.111],
|
[150.0, 119.999, 930.0, 11.111],
|
||||||
@@ -6518,7 +6518,7 @@ def test_normal_axes():
|
@@ -7228,7 +7228,7 @@ def test_normal_axes():
|
||||||
|
|
||||||
target = [85.5138, 75.88888, 1021.11, 1017.11]
|
target = [85.5138, 75.88888, 1021.11, 1017.11]
|
||||||
targetbb = mtransforms.Bbox.from_bounds(*target)
|
targetbb = mtransforms.Bbox.from_bounds(*target)
|
||||||
@ -50,10 +49,10 @@ index 7950e5b830..046dbbe1b8 100644
|
|||||||
# test that get_position roundtrips to get_window_extent
|
# test that get_position roundtrips to get_window_extent
|
||||||
axbb = ax.get_position().transformed(fig.transFigure).bounds
|
axbb = ax.get_position().transformed(fig.transFigure).bounds
|
||||||
diff --git a/lib/matplotlib/tests/test_constrainedlayout.py b/lib/matplotlib/tests/test_constrainedlayout.py
|
diff --git a/lib/matplotlib/tests/test_constrainedlayout.py b/lib/matplotlib/tests/test_constrainedlayout.py
|
||||||
index 117b221cc2..d009912dfa 100644
|
index 64906b74c3..bfa53cd430 100644
|
||||||
--- a/lib/matplotlib/tests/test_constrainedlayout.py
|
--- a/lib/matplotlib/tests/test_constrainedlayout.py
|
||||||
+++ b/lib/matplotlib/tests/test_constrainedlayout.py
|
+++ b/lib/matplotlib/tests/test_constrainedlayout.py
|
||||||
@@ -429,7 +429,7 @@ def test_hidden_axes():
|
@@ -431,7 +431,7 @@ def test_hidden_axes():
|
||||||
extents1 = np.copy(axs[0, 0].get_position().extents)
|
extents1 = np.copy(axs[0, 0].get_position().extents)
|
||||||
|
|
||||||
np.testing.assert_allclose(
|
np.testing.assert_allclose(
|
||||||
@ -62,42 +61,29 @@ index 117b221cc2..d009912dfa 100644
|
|||||||
|
|
||||||
|
|
||||||
def test_colorbar_align():
|
def test_colorbar_align():
|
||||||
diff --git a/lib/matplotlib/tests/test_mathtext.py b/lib/matplotlib/tests/test_mathtext.py
|
@@ -637,7 +637,7 @@ def test_compressed1():
|
||||||
index b5fd906d2f..8e3801a231 100644
|
fig.draw_without_rendering()
|
||||||
--- 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
|
pos = axs[0, 0].get_position()
|
||||||
@@ -189,7 +190,8 @@ def baseline_images(request, fontset, index, text):
|
- np.testing.assert_allclose(pos.x0, 0.2344, atol=1e-3)
|
||||||
@pytest.mark.parametrize(
|
+ np.testing.assert_allclose(pos.x0, 0.2344, atol=1e-2)
|
||||||
'fontset', ['cm', 'stix', 'stixsans', 'dejavusans', 'dejavuserif'])
|
pos = axs[0, 1].get_position()
|
||||||
@pytest.mark.parametrize('baseline_images', ['mathtext'], indirect=True)
|
np.testing.assert_allclose(pos.x1, 0.7024, atol=1e-3)
|
||||||
-@image_comparison(baseline_images=None)
|
|
||||||
+@image_comparison(baseline_images=None,
|
@@ -652,7 +652,7 @@ def test_compressed1():
|
||||||
+ tol=0.011 if platform.machine() in ('ppc64le', 's390x') else 0)
|
|
||||||
def test_mathtext_rendering(baseline_images, fontset, index, text):
|
pos = axs[0, 0].get_position()
|
||||||
mpl.rcParams['mathtext.fontset'] = fontset
|
np.testing.assert_allclose(pos.x0, 0.06195, atol=1e-3)
|
||||||
fig = plt.figure(figsize=(5.25, 0.75))
|
- np.testing.assert_allclose(pos.y1, 0.8537, atol=1e-3)
|
||||||
@@ -213,7 +215,8 @@ def test_mathtext_rendering_lightweight(baseline_images, fontset, index, text):
|
+ np.testing.assert_allclose(pos.y1, 0.8537, atol=1e-2)
|
||||||
@pytest.mark.parametrize(
|
pos = axs[1, 2].get_position()
|
||||||
'fontset', ['cm', 'stix', 'stixsans', 'dejavusans', 'dejavuserif'])
|
np.testing.assert_allclose(pos.x1, 0.8618, atol=1e-3)
|
||||||
@pytest.mark.parametrize('baseline_images', ['mathfont'], indirect=True)
|
np.testing.assert_allclose(pos.y0, 0.1934, atol=1e-3)
|
||||||
-@image_comparison(baseline_images=None, extensions=['png'])
|
|
||||||
+@image_comparison(baseline_images=None, extensions=['png'],
|
|
||||||
+ tol=0.011 if platform.machine() in ('ppc64le', 's390x') else 0)
|
|
||||||
def test_mathfont_rendering(baseline_images, fontset, index, text):
|
|
||||||
mpl.rcParams['mathtext.fontset'] = fontset
|
|
||||||
fig = plt.figure(figsize=(5.25, 0.75))
|
|
||||||
diff --git a/lib/matplotlib/tests/test_polar.py b/lib/matplotlib/tests/test_polar.py
|
diff --git a/lib/matplotlib/tests/test_polar.py b/lib/matplotlib/tests/test_polar.py
|
||||||
index c614eff027..daf4e26fb8 100644
|
index c51508ae22..942ffcb521 100644
|
||||||
--- a/lib/matplotlib/tests/test_polar.py
|
--- a/lib/matplotlib/tests/test_polar.py
|
||||||
+++ b/lib/matplotlib/tests/test_polar.py
|
+++ b/lib/matplotlib/tests/test_polar.py
|
||||||
@@ -312,7 +312,7 @@ def test_get_tightbbox_polar():
|
@@ -314,7 +314,7 @@ def test_get_tightbbox_polar():
|
||||||
fig.canvas.draw()
|
fig.canvas.draw()
|
||||||
bb = ax.get_tightbbox(fig.canvas.get_renderer())
|
bb = ax.get_tightbbox(fig.canvas.get_renderer())
|
||||||
assert_allclose(
|
assert_allclose(
|
||||||
@ -107,10 +93,10 @@ index c614eff027..daf4e26fb8 100644
|
|||||||
|
|
||||||
@check_figures_equal(extensions=["png"])
|
@check_figures_equal(extensions=["png"])
|
||||||
diff --git a/lib/matplotlib/tests/test_tightlayout.py b/lib/matplotlib/tests/test_tightlayout.py
|
diff --git a/lib/matplotlib/tests/test_tightlayout.py b/lib/matplotlib/tests/test_tightlayout.py
|
||||||
index 23d363b508..e94c863477 100644
|
index 1eb7b4b453..697eba3211 100644
|
||||||
--- a/lib/matplotlib/tests/test_tightlayout.py
|
--- a/lib/matplotlib/tests/test_tightlayout.py
|
||||||
+++ b/lib/matplotlib/tests/test_tightlayout.py
|
+++ b/lib/matplotlib/tests/test_tightlayout.py
|
||||||
@@ -172,12 +172,12 @@ def test_outward_ticks():
|
@@ -173,12 +173,12 @@ def test_outward_ticks():
|
||||||
plt.tight_layout()
|
plt.tight_layout()
|
||||||
# These values were obtained after visual checking that they correspond
|
# These values were obtained after visual checking that they correspond
|
||||||
# to a tight layouting that did take the ticks into account.
|
# to a tight layouting that did take the ticks into account.
|
||||||
@ -129,10 +115,10 @@ index 23d363b508..e94c863477 100644
|
|||||||
|
|
||||||
|
|
||||||
diff --git a/setupext.py b/setupext.py
|
diff --git a/setupext.py b/setupext.py
|
||||||
index d8d0b6b393..e44d3b046a 100644
|
index 0387223b94..13096a812c 100644
|
||||||
--- a/setupext.py
|
--- a/setupext.py
|
||||||
+++ b/setupext.py
|
+++ b/setupext.py
|
||||||
@@ -167,12 +167,18 @@ _freetype_hashes = {
|
@@ -168,13 +168,23 @@ _freetype_hashes = {
|
||||||
'955e17244e9b38adb0c98df66abb50467312e6bb70eac07e49ce6bd1a20e809a',
|
'955e17244e9b38adb0c98df66abb50467312e6bb70eac07e49ce6bd1a20e809a',
|
||||||
'2.10.1':
|
'2.10.1':
|
||||||
'3a60d391fd579440561bf0e7f31af2222bc610ad6ce4d9d7bd2165bca8669110',
|
'3a60d391fd579440561bf0e7f31af2222bc610ad6ce4d9d7bd2165bca8669110',
|
||||||
@ -142,17 +128,23 @@ index d8d0b6b393..e44d3b046a 100644
|
|||||||
+ '5eab795ebb23ac77001cfb68b7d4d50b5d6c7469247b0b01b2c953269f658dac',
|
+ '5eab795ebb23ac77001cfb68b7d4d50b5d6c7469247b0b01b2c953269f658dac',
|
||||||
+ '2.11.0':
|
+ '2.11.0':
|
||||||
+ 'a45c6b403413abd5706f3582f04c8339d26397c4304b78fa552f2215df64101f',
|
+ 'a45c6b403413abd5706f3582f04c8339d26397c4304b78fa552f2215df64101f',
|
||||||
|
'2.11.1':
|
||||||
|
- 'f8db94d307e9c54961b39a1cc799a67d46681480696ed72ecf78d4473770f09b'
|
||||||
|
+ 'f8db94d307e9c54961b39a1cc799a67d46681480696ed72ecf78d4473770f09b',
|
||||||
|
+ '2.12.0':
|
||||||
|
+ '7940a46eeb0255baaa87c553d72778c4f8daa2b8888c8e2a05766a2a8686740c',
|
||||||
|
+ '2.12.1':
|
||||||
|
+ 'efe71fd4b8246f1b0b1b9bfca13cfff1c9ad85930340c27df469733bbb620938',
|
||||||
}
|
}
|
||||||
# This is the version of FreeType to use when building a local
|
# This is the version of FreeType to use when building a local version. It
|
||||||
# version. It must match the value in
|
# must match the value in lib/matplotlib.__init__.py, and the cache path in
|
||||||
# lib/matplotlib.__init__.py and also needs to be changed below in the
|
# `.circleci/config.yml`.
|
||||||
# embedded windows build script (grep for "REMINDER" in this file)
|
-TESTING_VERSION_OF_FREETYPE = '2.6.1'
|
||||||
-LOCAL_FREETYPE_VERSION = '2.6.1'
|
+TESTING_VERSION_OF_FREETYPE = '2.12.1'
|
||||||
+LOCAL_FREETYPE_VERSION = '2.10.4'
|
if sys.platform.startswith('win') and platform.machine() == 'ARM64':
|
||||||
LOCAL_FREETYPE_HASH = _freetype_hashes.get(LOCAL_FREETYPE_VERSION, 'unknown')
|
# older versions of freetype are not supported for win/arm64
|
||||||
|
# Matplotlib tests will not pass
|
||||||
LOCAL_QHULL_VERSION = '2020.2'
|
@@ -584,6 +594,7 @@ class FreeType(SetupPackage):
|
||||||
@@ -565,6 +571,7 @@ class FreeType(SetupPackage):
|
|
||||||
ext.extra_objects.insert(
|
ext.extra_objects.insert(
|
||||||
0, str(src_path / 'objs' / '.libs' / libfreetype))
|
0, str(src_path / 'objs' / '.libs' / libfreetype))
|
||||||
ext.define_macros.append(('FREETYPE_BUILD_TYPE', 'local'))
|
ext.define_macros.append(('FREETYPE_BUILD_TYPE', 'local'))
|
||||||
@ -161,5 +153,5 @@ index d8d0b6b393..e44d3b046a 100644
|
|||||||
def do_custom_build(self, env):
|
def do_custom_build(self, env):
|
||||||
# We're using a system freetype
|
# We're using a system freetype
|
||||||
--
|
--
|
||||||
2.31.1
|
2.36.1
|
||||||
|
|
||||||
158
0003-Increase-a-few-test-tolerances-on-some-arches.patch
Normal file
158
0003-Increase-a-few-test-tolerances-on-some-arches.patch
Normal file
@ -0,0 +1,158 @@
|
|||||||
|
From 0939c27b1d47cabd19c09fc09f15ef4fb18331b4 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Elliott Sales de Andrade <quantum.analyst@gmail.com>
|
||||||
|
Date: Tue, 24 Aug 2021 04:47:50 -0400
|
||||||
|
Subject: [PATCH 3/4] Increase a few test tolerances on some arches.
|
||||||
|
|
||||||
|
Signed-off-by: Elliott Sales de Andrade <quantum.analyst@gmail.com>
|
||||||
|
---
|
||||||
|
lib/matplotlib/tests/test_axes.py | 6 ++++--
|
||||||
|
lib/matplotlib/tests/test_backend_pgf.py | 2 +-
|
||||||
|
lib/matplotlib/tests/test_colorbar.py | 5 ++++-
|
||||||
|
lib/matplotlib/tests/test_contour.py | 3 ++-
|
||||||
|
lib/matplotlib/tests/test_image.py | 4 ++--
|
||||||
|
lib/matplotlib/tests/test_lines.py | 4 +++-
|
||||||
|
lib/matplotlib/tests/test_mathtext.py | 7 +++++--
|
||||||
|
7 files changed, 21 insertions(+), 10 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/lib/matplotlib/tests/test_axes.py b/lib/matplotlib/tests/test_axes.py
|
||||||
|
index c8604b8657..da72bb9415 100644
|
||||||
|
--- a/lib/matplotlib/tests/test_axes.py
|
||||||
|
+++ b/lib/matplotlib/tests/test_axes.py
|
||||||
|
@@ -1031,7 +1031,8 @@ def test_imshow():
|
||||||
|
ax.imshow("r", data=data)
|
||||||
|
|
||||||
|
|
||||||
|
-@image_comparison(['imshow_clip'], style='mpl20')
|
||||||
|
+@image_comparison(['imshow_clip'], style='mpl20',
|
||||||
|
+ tol=0 if platform.machine() == 'x86_64' else 1.24)
|
||||||
|
def test_imshow_clip():
|
||||||
|
# As originally reported by Gellule Xg <gellule.xg@free.fr>
|
||||||
|
# use former defaults to match existing baseline image
|
||||||
|
@@ -2340,7 +2341,8 @@ def test_contour_hatching():
|
||||||
|
extend='both', alpha=0.5)
|
||||||
|
|
||||||
|
|
||||||
|
-@image_comparison(['contour_colorbar'], style='mpl20')
|
||||||
|
+@image_comparison(['contour_colorbar'], style='mpl20',
|
||||||
|
+ tol=0 if platform.machine() == 'x86_64' else 0.02)
|
||||||
|
def test_contour_colorbar():
|
||||||
|
x, y, z = contour_dat()
|
||||||
|
|
||||||
|
diff --git a/lib/matplotlib/tests/test_backend_pgf.py b/lib/matplotlib/tests/test_backend_pgf.py
|
||||||
|
index 482bc073a7..ab16d9736c 100644
|
||||||
|
--- a/lib/matplotlib/tests/test_backend_pgf.py
|
||||||
|
+++ b/lib/matplotlib/tests/test_backend_pgf.py
|
||||||
|
@@ -169,7 +169,7 @@ def test_pathclip():
|
||||||
|
# test mixed mode rendering
|
||||||
|
@needs_pgf_xelatex
|
||||||
|
@pytest.mark.backend('pgf')
|
||||||
|
-@image_comparison(['pgf_mixedmode.pdf'], style='default')
|
||||||
|
+@image_comparison(['pgf_mixedmode.pdf'], style='default', tol=0.9)
|
||||||
|
def test_mixedmode():
|
||||||
|
mpl.rcParams.update({'font.family': 'serif', 'pgf.rcfonts': False})
|
||||||
|
Y, X = np.ogrid[-1:1:40j, -1:1:40j]
|
||||||
|
diff --git a/lib/matplotlib/tests/test_colorbar.py b/lib/matplotlib/tests/test_colorbar.py
|
||||||
|
index 4336b761f6..7d3927408b 100644
|
||||||
|
--- a/lib/matplotlib/tests/test_colorbar.py
|
||||||
|
+++ b/lib/matplotlib/tests/test_colorbar.py
|
||||||
|
@@ -1,3 +1,5 @@
|
||||||
|
+import platform
|
||||||
|
+
|
||||||
|
import numpy as np
|
||||||
|
import pytest
|
||||||
|
|
||||||
|
@@ -233,7 +235,8 @@ def test_colorbar_single_ax_panchor_east(constrained):
|
||||||
|
assert ax.get_anchor() == 'E'
|
||||||
|
|
||||||
|
|
||||||
|
-@image_comparison(['contour_colorbar.png'], remove_text=True)
|
||||||
|
+@image_comparison(['contour_colorbar.png'], remove_text=True,
|
||||||
|
+ tol=0 if platform.machine() == 'x86_64' else 0.01)
|
||||||
|
def test_contour_colorbar():
|
||||||
|
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 8bf77f0d54..82c0b09ac3 100644
|
||||||
|
--- a/lib/matplotlib/tests/test_contour.py
|
||||||
|
+++ b/lib/matplotlib/tests/test_contour.py
|
||||||
|
@@ -319,7 +319,8 @@ def test_contourf_log_extension():
|
||||||
|
|
||||||
|
|
||||||
|
@image_comparison(['contour_addlines.png'],
|
||||||
|
- remove_text=True, style='mpl20', tol=0.03)
|
||||||
|
+ remove_text=True, style='mpl20',
|
||||||
|
+ tol=0.03 if platform.machine() == 'x86_64' else 0.15)
|
||||||
|
# tolerance is because image changed minutely when tick finding on
|
||||||
|
# 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 46dbe4cfe8..268473c6c0 100644
|
||||||
|
--- a/lib/matplotlib/tests/test_image.py
|
||||||
|
+++ b/lib/matplotlib/tests/test_image.py
|
||||||
|
@@ -1322,8 +1322,8 @@ def test_nonuniform_and_pcolor():
|
||||||
|
ax.set(xlim=(0, 10))
|
||||||
|
|
||||||
|
|
||||||
|
-@image_comparison(["rgba_antialias.png"], style="mpl20",
|
||||||
|
- remove_text=True)
|
||||||
|
+@image_comparison(["rgba_antialias.png"], style="mpl20", remove_text=True,
|
||||||
|
+ tol=0 if platform.machine() == 'x86_64' else 0.007)
|
||||||
|
def test_rgba_antialias():
|
||||||
|
fig, axs = plt.subplots(2, 2, figsize=(3.5, 3.5), sharex=False,
|
||||||
|
sharey=False, constrained_layout=True)
|
||||||
|
diff --git a/lib/matplotlib/tests/test_lines.py b/lib/matplotlib/tests/test_lines.py
|
||||||
|
index e7002df8a5..8738fd94a0 100644
|
||||||
|
--- a/lib/matplotlib/tests/test_lines.py
|
||||||
|
+++ b/lib/matplotlib/tests/test_lines.py
|
||||||
|
@@ -3,6 +3,7 @@ Tests specific to the lines module.
|
||||||
|
"""
|
||||||
|
|
||||||
|
import itertools
|
||||||
|
+import platform
|
||||||
|
import timeit
|
||||||
|
from types import SimpleNamespace
|
||||||
|
|
||||||
|
@@ -165,7 +166,8 @@ def test_set_drawstyle():
|
||||||
|
assert len(line.get_path().vertices) == len(x)
|
||||||
|
|
||||||
|
|
||||||
|
-@image_comparison(['line_collection_dashes'], remove_text=True, style='mpl20')
|
||||||
|
+@image_comparison(['line_collection_dashes'], remove_text=True, style='mpl20',
|
||||||
|
+ tol=0 if platform.machine() == 'x86_64' else 0.62)
|
||||||
|
def test_set_line_coll_dash_image():
|
||||||
|
fig, ax = plt.subplots()
|
||||||
|
np.random.seed(0)
|
||||||
|
diff --git a/lib/matplotlib/tests/test_mathtext.py b/lib/matplotlib/tests/test_mathtext.py
|
||||||
|
index 7f8b06fa0e..d7d5e687fe 100644
|
||||||
|
--- a/lib/matplotlib/tests/test_mathtext.py
|
||||||
|
+++ b/lib/matplotlib/tests/test_mathtext.py
|
||||||
|
@@ -1,5 +1,6 @@
|
||||||
|
import io
|
||||||
|
from pathlib import Path
|
||||||
|
+import platform
|
||||||
|
import re
|
||||||
|
import shlex
|
||||||
|
from xml.etree import ElementTree as ET
|
||||||
|
@@ -198,7 +199,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))
|
||||||
|
@@ -239,7 +241,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)
|
||||||
|
-@image_comparison(baseline_images=None, extensions=['png'])
|
||||||
|
+@image_comparison(baseline_images=None, extensions=['png'],
|
||||||
|
+ tol=0.011 if platform.machine() in ('ppc64le', 's390x') else 0)
|
||||||
|
def test_mathfont_rendering(baseline_images, fontset, index, text):
|
||||||
|
mpl.rcParams['mathtext.fontset'] = fontset
|
||||||
|
fig = plt.figure(figsize=(5.25, 0.75))
|
||||||
|
--
|
||||||
|
2.36.1
|
||||||
|
|
||||||
@ -0,0 +1,36 @@
|
|||||||
|
From 77d0ef4bac7e14da704556a6f1f99962b0864a6a Mon Sep 17 00:00:00 2001
|
||||||
|
From: Elliott Sales de Andrade <quantum.analyst@gmail.com>
|
||||||
|
Date: Mon, 22 Aug 2022 18:43:28 -0400
|
||||||
|
Subject: [PATCH 4/4] Use old stride_windows implementation on 32-bit x86
|
||||||
|
|
||||||
|
Signed-off-by: Elliott Sales de Andrade <quantum.analyst@gmail.com>
|
||||||
|
---
|
||||||
|
lib/matplotlib/mlab.py | 5 ++++-
|
||||||
|
1 file changed, 4 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/lib/matplotlib/mlab.py b/lib/matplotlib/mlab.py
|
||||||
|
index 5e85a9c119..d75acf6d26 100644
|
||||||
|
--- a/lib/matplotlib/mlab.py
|
||||||
|
+++ b/lib/matplotlib/mlab.py
|
||||||
|
@@ -52,6 +52,7 @@ Spectral functions
|
||||||
|
|
||||||
|
import functools
|
||||||
|
from numbers import Number
|
||||||
|
+import sys
|
||||||
|
|
||||||
|
import numpy as np
|
||||||
|
|
||||||
|
@@ -252,7 +253,9 @@ def stride_windows(x, n, noverlap=None, axis=0):
|
||||||
|
|
||||||
|
def _stride_windows(x, n, noverlap=0, axis=0):
|
||||||
|
# np>=1.20 provides sliding_window_view, and we only ever use axis=0.
|
||||||
|
- if hasattr(np.lib.stride_tricks, "sliding_window_view") and axis == 0:
|
||||||
|
+ if (sys.maxsize > 2**32 and # NumPy version on 32-bit OOMs.
|
||||||
|
+ hasattr(np.lib.stride_tricks, "sliding_window_view") and
|
||||||
|
+ axis == 0):
|
||||||
|
if noverlap >= n:
|
||||||
|
raise ValueError('noverlap must be less than n')
|
||||||
|
return np.lib.stride_tricks.sliding_window_view(
|
||||||
|
--
|
||||||
|
2.36.1
|
||||||
|
|
||||||
28
adapted-requires-package-version.patch
Normal file
28
adapted-requires-package-version.patch
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
diff --git a/setup.py b/setup.py
|
||||||
|
index d1f1de7..1d64d11 100644
|
||||||
|
--- a/setup.py
|
||||||
|
+++ b/setup.py
|
||||||
|
@@ -303,12 +303,11 @@ setup( # Finally, pass this all along to setuptools to do the heavy lifting.
|
||||||
|
setup_requires=[
|
||||||
|
"certifi>=2020.06.20",
|
||||||
|
"numpy>=1.19",
|
||||||
|
- "setuptools_scm>=7",
|
||||||
|
+ "setuptools_scm>=4",
|
||||||
|
],
|
||||||
|
install_requires=[
|
||||||
|
- "contourpy>=1.0.1",
|
||||||
|
"cycler>=0.10",
|
||||||
|
- "fonttools>=4.22.0",
|
||||||
|
+ "fonttools>=3.29.0",
|
||||||
|
"kiwisolver>=1.0.1",
|
||||||
|
"numpy>=1.19",
|
||||||
|
"packaging>=20.0",
|
||||||
|
@@ -317,7 +316,7 @@ setup( # Finally, pass this all along to setuptools to do the heavy lifting.
|
||||||
|
"python-dateutil>=2.7",
|
||||||
|
] + (
|
||||||
|
# Installing from a git checkout that is not producing a wheel.
|
||||||
|
- ["setuptools_scm>=7"] if (
|
||||||
|
+ ["setuptools_scm>=4"] if (
|
||||||
|
Path(__file__).with_name(".git").exists() and
|
||||||
|
os.environ.get("CIBUILDWHEEL", "0") != "1"
|
||||||
|
) else []
|
||||||
Binary file not shown.
Binary file not shown.
@ -6,6 +6,3 @@ system_qhull = True
|
|||||||
tests = True
|
tests = True
|
||||||
toolkits = True
|
toolkits = True
|
||||||
toolkits_tests = True
|
toolkits_tests = True
|
||||||
|
|
||||||
[rc_options]
|
|
||||||
backend = GTKAgg
|
|
||||||
@ -1,17 +1,22 @@
|
|||||||
Name: python-matplotlib
|
Name: python-matplotlib
|
||||||
Version: 3.4.3
|
Version: 3.6.2
|
||||||
Release: 2
|
Release: 1
|
||||||
Summary: A comprehensive library for creating static, animated, and interactive visualizations
|
Summary: A comprehensive library for creating static, animated, and interactive visualizations
|
||||||
License: Python and MIT and OFL-1.1 and Public Domain
|
License: Python and MIT and OFL-1.1 and Public Domain
|
||||||
URL: https://github.com/matplotlib/matplotlib
|
URL: https://github.com/matplotlib/matplotlib
|
||||||
Source0: https://github.com/matplotlib/matplotlib/archive/v%{version}/matplotlib-%{version}.tar.gz
|
Source0: https://github.com/matplotlib/matplotlib/archive/v%{version}/matplotlib-%{version}.tar.gz
|
||||||
# The config file for python-matplotlib
|
# The config file for python-matplotlib
|
||||||
Source1: setup.cfg
|
Source1: mplsetup.cfg
|
||||||
Source1000: https://github.com/QuLogic/mpl-images/archive/v3.4.3-with-freetype-2.10.4/matplotlib-3.4.3-with-freetype-2.10.4.tar.gz
|
Source1000: https://github.com/QuLogic/mpl-images/archive/v3.6.1-with-freetype-2.12.1/matplotlib-3.6.1-with-freetype-2.12.1.tar.gz
|
||||||
Patch0001: 0001-matplotlibrc-path-search-fix.patch
|
Patch0001: 0001-matplotlibrc-path-search-fix.patch
|
||||||
Patch0002: 0002-Set-FreeType-version-to-2.10.4-and-update-tolerances.patch
|
Patch0002: 0002-Set-FreeType-version-to-2.12.1-and-update-tolerances.patch
|
||||||
|
Patch0003: 0003-Increase-a-few-test-tolerances-on-some-arches.patch
|
||||||
|
Patch0004: 0004-Use-old-stride_windows-implementation-on-32-bit-x86.patch
|
||||||
|
Patch0005: adapted-requires-package-version.patch
|
||||||
|
|
||||||
BuildRequires: freetype-devel libpng-devel qhull-devel texlive-cm xorg-x11-server-Xvfb zlib-devel
|
BuildRequires: freetype-devel libpng-devel qhull-devel texlive-cm xorg-x11-server-Xvfb zlib-devel
|
||||||
BuildRequires: python3-certifi
|
BuildRequires: python3-certifi
|
||||||
|
BuildRequires: python3-numpy python3-pip python3-wheel python3-setuptools_scm ghostscript
|
||||||
|
|
||||||
|
|
||||||
%description
|
%description
|
||||||
@ -101,10 +106,14 @@ Test data for python3-matplotlib.
|
|||||||
%autosetup -n matplotlib-%{version} -N
|
%autosetup -n matplotlib-%{version} -N
|
||||||
%patch0001 -p1
|
%patch0001 -p1
|
||||||
%patch0002 -p1
|
%patch0002 -p1
|
||||||
gzip -dc %SOURCE1000 | tar xvf - --transform='s~^mpl-images-3.4.3-with-freetype-2.10.4/\([^/]\+\)/~lib/\1/tests/baseline_images/~'
|
%patch0005 -p1
|
||||||
|
gzip -dc %SOURCE1000 | tar xvf - --transform='s~^mpl-images-3.6.1-with-freetype-2.12.1/\([^/]\+\)/~lib/\1/tests/baseline_images/~'
|
||||||
|
|
||||||
# Copy setup.cfg to the builddir
|
# Copy setup.cfg to the builddir
|
||||||
cp -p %{SOURCE1} setup.cfg
|
cp -p %{SOURCE1} mplsetup.cfg
|
||||||
|
|
||||||
|
%patch0003 -p1
|
||||||
|
%patch0004 -p1
|
||||||
|
|
||||||
%build
|
%build
|
||||||
export http_proxy=http://127.0.0.1/
|
export http_proxy=http://127.0.0.1/
|
||||||
@ -135,7 +144,6 @@ mv %{buildroot}%{python3_sitearch}/matplotlib/mpl-data %{buildroot}%{_datadir}/m
|
|||||||
%{python3_sitearch}/{pylab.py*,__pycache__/*}
|
%{python3_sitearch}/{pylab.py*,__pycache__/*}
|
||||||
%exclude %{python3_sitearch}/matplotlib/tests/baseline_images/*
|
%exclude %{python3_sitearch}/matplotlib/tests/baseline_images/*
|
||||||
%exclude %{python3_sitearch}/mpl_toolkits/tests/baseline_images/*
|
%exclude %{python3_sitearch}/mpl_toolkits/tests/baseline_images/*
|
||||||
%exclude %{python3_sitearch}/matplotlib/backends/{backend_qt4*,__pycache__/backend_qt4*}
|
|
||||||
%exclude %{python3_sitearch}/matplotlib/backends/{backend_qt5*,__pycache__/backend_qt5*}
|
%exclude %{python3_sitearch}/matplotlib/backends/{backend_qt5*,__pycache__/backend_qt5*}
|
||||||
%exclude %{python3_sitearch}/matplotlib/backends/{backend_gtk*,__pycache__/backend_gtk*}
|
%exclude %{python3_sitearch}/matplotlib/backends/{backend_gtk*,__pycache__/backend_gtk*}
|
||||||
%exclude %{python3_sitearch}/matplotlib/backends/{backend_tkagg.*,__pycache__/backend_tkagg.*}
|
%exclude %{python3_sitearch}/matplotlib/backends/{backend_tkagg.*,__pycache__/backend_tkagg.*}
|
||||||
@ -146,10 +154,6 @@ mv %{buildroot}%{python3_sitearch}/matplotlib/mpl-data %{buildroot}%{_datadir}/m
|
|||||||
%{python3_sitearch}/matplotlib/tests/baseline_images/
|
%{python3_sitearch}/matplotlib/tests/baseline_images/
|
||||||
%{python3_sitearch}/mpl_toolkits/tests/baseline_images/
|
%{python3_sitearch}/mpl_toolkits/tests/baseline_images/
|
||||||
|
|
||||||
%files -n python3-matplotlib-qt4
|
|
||||||
%{python3_sitearch}/matplotlib/backends/{backend_qt4.*,__pycache__/backend_qt4.*}
|
|
||||||
%{python3_sitearch}/matplotlib/backends/{backend_qt4agg.*,__pycache__/backend_qt4agg.*}
|
|
||||||
|
|
||||||
%files -n python3-matplotlib-qt5
|
%files -n python3-matplotlib-qt5
|
||||||
%{python3_sitearch}/matplotlib/backends/{backend_qt5.*,__pycache__/backend_qt5.*}
|
%{python3_sitearch}/matplotlib/backends/{backend_qt5.*,__pycache__/backend_qt5.*}
|
||||||
%{python3_sitearch}/matplotlib/backends/{backend_qt5agg.*,__pycache__/backend_qt5agg.*}
|
%{python3_sitearch}/matplotlib/backends/{backend_qt5agg.*,__pycache__/backend_qt5agg.*}
|
||||||
@ -162,6 +166,9 @@ mv %{buildroot}%{python3_sitearch}/matplotlib/mpl-data %{buildroot}%{_datadir}/m
|
|||||||
%{python3_sitearch}/matplotlib/backends/{tkagg.*,__pycache__/tkagg.*,_tkagg.*}
|
%{python3_sitearch}/matplotlib/backends/{tkagg.*,__pycache__/tkagg.*,_tkagg.*}
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Thu Dec 01 2022 xu_ping <xuping33@h-partners.com> - 3.6.2-1
|
||||||
|
- Upgrade 3.6.2 to fix oscilloscope -h error
|
||||||
|
|
||||||
* Sat Mar 05 2022 chenchen <chen_aka_jan@163.com> - 3.4.3-2
|
* Sat Mar 05 2022 chenchen <chen_aka_jan@163.com> - 3.4.3-2
|
||||||
- enable debuginfo
|
- enable debuginfo
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user