diff --git a/0002-Set-FreeType-version-to-2.12.1-and-update-tolerances.patch b/0002-Set-FreeType-version-to-2.13.1-and-update-tolerances.patch similarity index 52% rename from 0002-Set-FreeType-version-to-2.12.1-and-update-tolerances.patch rename to 0002-Set-FreeType-version-to-2.13.1-and-update-tolerances.patch index 7fb1c85820da245faf413c7d6d890bb6a0567596..1ce37afd6ca3c2f4a5e9f4e8ef190acd973d278f 100644 --- a/0002-Set-FreeType-version-to-2.12.1-and-update-tolerances.patch +++ b/0002-Set-FreeType-version-to-2.13.1-and-update-tolerances.patch @@ -1,19 +1,38 @@ -diff -Nur a/lib/matplotlib/__init__.py b/lib/matplotlib/__init__.py ---- a/lib/matplotlib/__init__.py 2023-04-13 09:25:35.984951580 +0800 -+++ b/lib/matplotlib/__init__.py 2023-04-13 09:28:23.220951580 +0800 -@@ -1284,7 +1284,7 @@ +From a5490ca593e1515bddbc96491efd8d1ff5e372d6 Mon Sep 17 00:00:00 2001 +From: Elliott Sales de Andrade +Date: Fri, 14 Feb 2020 06:05:42 -0500 +Subject: [PATCH 3/5] Set FreeType version to 2.13.1 and update tolerances + +Signed-off-by: Elliott Sales de Andrade +--- + lib/matplotlib/__init__.py | 2 +- + lib/matplotlib/tests/test_axes.py | 4 ++-- + lib/matplotlib/tests/test_backend_pgf.py | 2 +- + .../tests/test_constrainedlayout.py | 10 ++++----- + lib/matplotlib/tests/test_legend.py | 4 ++-- + lib/matplotlib/tests/test_polar.py | 2 +- + lib/matplotlib/tests/test_tightlayout.py | 10 ++++----- + setupext.py | 21 +++++++++++++++++-- + 8 files changed, 36 insertions(+), 19 deletions(-) + +diff --git a/lib/matplotlib/__init__.py b/lib/matplotlib/__init__.py +index 26dd9372e1..81b77d455f 100644 +--- a/lib/matplotlib/__init__.py ++++ b/lib/matplotlib/__init__.py +@@ -1307,7 +1307,7 @@ def _val_or_rc(val, rc_name): def _init_tests(): # The version of FreeType to install locally for running the # tests. This must match the value in `setupext.py` - LOCAL_FREETYPE_VERSION = '2.6.1' -+ LOCAL_FREETYPE_VERSION = '2.12.1' ++ LOCAL_FREETYPE_VERSION = '2.13.1' from matplotlib import ft2font if (ft2font.__freetype_version__ != LOCAL_FREETYPE_VERSION or -diff -Nur a/lib/matplotlib/tests/test_axes.py b/lib/matplotlib/tests/test_axes.py ---- a/lib/matplotlib/tests/test_axes.py 2023-03-04 12:50:36.000000000 +0800 -+++ b/lib/matplotlib/tests/test_axes.py 2023-04-13 09:32:11.064951580 +0800 -@@ -7388,7 +7388,7 @@ +diff --git a/lib/matplotlib/tests/test_axes.py b/lib/matplotlib/tests/test_axes.py +index 6c5dd712b7..0a70c37891 100644 +--- a/lib/matplotlib/tests/test_axes.py ++++ b/lib/matplotlib/tests/test_axes.py +@@ -7623,7 +7623,7 @@ def test_normal_axes(): ] for nn, b in enumerate(bbaxis): targetbb = mtransforms.Bbox.from_bounds(*target[nn]) @@ -22,7 +41,7 @@ diff -Nur a/lib/matplotlib/tests/test_axes.py b/lib/matplotlib/tests/test_axes.p target = [ [150.0, 119.999, 930.0, 11.111], -@@ -7406,7 +7406,7 @@ +@@ -7641,7 +7641,7 @@ def test_normal_axes(): target = [85.5138, 75.88888, 1021.11, 1017.11] targetbb = mtransforms.Bbox.from_bounds(*target) @@ -31,10 +50,24 @@ diff -Nur a/lib/matplotlib/tests/test_axes.py b/lib/matplotlib/tests/test_axes.p # test that get_position roundtrips to get_window_extent axbb = ax.get_position().transformed(fig.transFigure).bounds -diff -Nur a/lib/matplotlib/tests/test_constrainedlayout.py b/lib/matplotlib/tests/test_constrainedlayout.py ---- a/lib/matplotlib/tests/test_constrainedlayout.py 2023-03-04 12:50:36.000000000 +0800 -+++ b/lib/matplotlib/tests/test_constrainedlayout.py 2023-04-13 09:35:13.840951580 +0800 -@@ -431,7 +431,7 @@ +diff --git a/lib/matplotlib/tests/test_backend_pgf.py b/lib/matplotlib/tests/test_backend_pgf.py +index a866916c58..a746cc2ca9 100644 +--- a/lib/matplotlib/tests/test_backend_pgf.py ++++ b/lib/matplotlib/tests/test_backend_pgf.py +@@ -165,7 +165,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.87) + 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_constrainedlayout.py b/lib/matplotlib/tests/test_constrainedlayout.py +index 6703dfe315..ea6a8d9630 100644 +--- a/lib/matplotlib/tests/test_constrainedlayout.py ++++ b/lib/matplotlib/tests/test_constrainedlayout.py +@@ -432,7 +432,7 @@ def test_hidden_axes(): extents1 = np.copy(axs[0, 0].get_position().extents) np.testing.assert_allclose( @@ -43,16 +76,19 @@ diff -Nur a/lib/matplotlib/tests/test_constrainedlayout.py b/lib/matplotlib/test def test_colorbar_align(): -@@ -637,7 +637,7 @@ +@@ -638,9 +638,9 @@ def test_compressed1(): fig.draw_without_rendering() pos = axs[0, 0].get_position() - np.testing.assert_allclose(pos.x0, 0.2344, atol=1e-3) + np.testing.assert_allclose(pos.x0, 0.2344, atol=1e-2) pos = axs[0, 1].get_position() - np.testing.assert_allclose(pos.x1, 0.7024, atol=1e-3) +- np.testing.assert_allclose(pos.x1, 0.7024, atol=1e-3) ++ np.testing.assert_allclose(pos.x1, 0.7024, atol=1e-2) -@@ -652,10 +652,10 @@ + # wider than tall + fig, axs = plt.subplots(2, 3, layout='compressed', +@@ -653,10 +653,10 @@ def test_compressed1(): pos = axs[0, 0].get_position() np.testing.assert_allclose(pos.x0, 0.06195, atol=1e-3) @@ -65,10 +101,11 @@ diff -Nur a/lib/matplotlib/tests/test_constrainedlayout.py b/lib/matplotlib/test @pytest.mark.parametrize('arg, state', [ -diff -Nur a/lib/matplotlib/tests/test_legend.py b/lib/matplotlib/tests/test_legend.py ---- a/lib/matplotlib/tests/test_legend.py 2023-03-04 12:50:36.000000000 +0800 -+++ b/lib/matplotlib/tests/test_legend.py 2023-04-13 09:37:03.376951580 +0800 -@@ -522,9 +522,9 @@ +diff --git a/lib/matplotlib/tests/test_legend.py b/lib/matplotlib/tests/test_legend.py +index 759ac6aada..8140d4d69f 100644 +--- a/lib/matplotlib/tests/test_legend.py ++++ b/lib/matplotlib/tests/test_legend.py +@@ -516,9 +516,9 @@ def test_figure_legend_outside(): fig.draw_without_rendering() assert_allclose(axs.get_window_extent().extents, @@ -80,10 +117,11 @@ diff -Nur a/lib/matplotlib/tests/test_legend.py b/lib/matplotlib/tests/test_lege @image_comparison(['legend_stackplot.png']) -diff -Nur a/lib/matplotlib/tests/test_polar.py b/lib/matplotlib/tests/test_polar.py ---- a/lib/matplotlib/tests/test_polar.py 2023-03-04 12:50:36.000000000 +0800 -+++ b/lib/matplotlib/tests/test_polar.py 2023-04-13 09:38:17.120951580 +0800 -@@ -321,7 +321,7 @@ +diff --git a/lib/matplotlib/tests/test_polar.py b/lib/matplotlib/tests/test_polar.py +index 9d6e78da2c..5f6ed538d1 100644 +--- a/lib/matplotlib/tests/test_polar.py ++++ b/lib/matplotlib/tests/test_polar.py +@@ -321,7 +321,7 @@ def test_get_tightbbox_polar(): fig.canvas.draw() bb = ax.get_tightbbox(fig.canvas.get_renderer()) assert_allclose( @@ -92,10 +130,11 @@ diff -Nur a/lib/matplotlib/tests/test_polar.py b/lib/matplotlib/tests/test_polar @check_figures_equal(extensions=["png"]) -diff -Nur a/lib/matplotlib/tests/test_tightlayout.py b/lib/matplotlib/tests/test_tightlayout.py ---- a/lib/matplotlib/tests/test_tightlayout.py 2023-03-04 12:50:36.000000000 +0800 -+++ b/lib/matplotlib/tests/test_tightlayout.py 2023-04-13 09:41:04.536951580 +0800 -@@ -173,12 +173,12 @@ +diff --git a/lib/matplotlib/tests/test_tightlayout.py b/lib/matplotlib/tests/test_tightlayout.py +index 968f0da7b5..89caa81b98 100644 +--- a/lib/matplotlib/tests/test_tightlayout.py ++++ b/lib/matplotlib/tests/test_tightlayout.py +@@ -173,12 +173,12 @@ def test_outward_ticks(): plt.tight_layout() # These values were obtained after visual checking that they correspond # to a tight layouting that did take the ticks into account. @@ -113,15 +152,18 @@ diff -Nur a/lib/matplotlib/tests/test_tightlayout.py b/lib/matplotlib/tests/test ans[nn]) -diff -Nur a/setupext.py b/setupext.py ---- a/setupext.py 2023-03-04 12:50:36.000000000 +0800 -+++ b/setupext.py 2023-04-13 09:50:01.120951580 +0800 -@@ -176,13 +176,23 @@ +diff --git a/setupext.py b/setupext.py +index 9f78d88c87..6dc740e8f7 100644 +--- a/setupext.py ++++ b/setupext.py +@@ -176,14 +176,30 @@ _freetype_hashes = { '955e17244e9b38adb0c98df66abb50467312e6bb70eac07e49ce6bd1a20e809a', '2.10.1': '3a60d391fd579440561bf0e7f31af2222bc610ad6ce4d9d7bd2165bca8669110', + '2.10.2': + 'e09aa914e4f7a5d723ac381420949c55c0b90b15744adce5d1406046022186ab', ++ '2.10.3': ++ '9dfb4e11efd6e460a87b1991a64bc69344ee7dc219d9b29e7faabc1c168ce8b0', + '2.10.4': + '5eab795ebb23ac77001cfb68b7d4d50b5d6c7469247b0b01b2c953269f658dac', + '2.11.0': @@ -133,20 +175,27 @@ diff -Nur a/setupext.py b/setupext.py + '7940a46eeb0255baaa87c553d72778c4f8daa2b8888c8e2a05766a2a8686740c', + '2.12.1': + 'efe71fd4b8246f1b0b1b9bfca13cfff1c9ad85930340c27df469733bbb620938', ++ '2.13.0': ++ 'a7aca0e532a276ea8d85bd31149f0a74c33d19c8d287116ef8f5f8357b4f1f80', ++ '2.13.1': ++ '0b109c59914f25b4411a8de2a506fdd18fa8457eb86eca6c7b15c19110a92fa5', } # This is the version of FreeType to use when building a local version. It # must match the value in lib/matplotlib.__init__.py, and the cache path in - # `.circleci/config.yml`. + # `.circleci/config.yml`. Also update the docs in + # `docs/devel/dependencies.rst`. -TESTING_VERSION_OF_FREETYPE = '2.6.1' -+TESTING_VERSION_OF_FREETYPE = '2.12.1' ++TESTING_VERSION_OF_FREETYPE = '2.13.1' if sys.platform.startswith('win') and platform.machine() == 'ARM64': # older versions of freetype are not supported for win/arm64 # Matplotlib tests will not pass -@@ -597,6 +607,7 @@ - ext.extra_objects.insert( - 0, str(src_path / 'objs' / '.libs' / libfreetype)) - ext.define_macros.append(('FREETYPE_BUILD_TYPE', 'local')) +@@ -599,6 +615,7 @@ class FreeType(SetupPackage): + name = ext.name.split('.')[-1] + ext.extra_link_args.append( + f'-Wl,-exported_symbol,_PyInit_{name}') + ext.libraries.append('brotlidec') def do_custom_build(self, env): # We're using a system freetype +-- +2.41.0 diff --git a/matplotlib-3.7.1-with-freetype-2.12.1.tar.gz b/matplotlib-3.8.1-with-freetype-2.13.1.tar.gz similarity index 71% rename from matplotlib-3.7.1-with-freetype-2.12.1.tar.gz rename to matplotlib-3.8.1-with-freetype-2.13.1.tar.gz index f4cf9611e5371b30a5738e29b5e29f820f0287e3..8e0f72ee1c95891e0ada73fad3ee6051d6735c43 100644 Binary files a/matplotlib-3.7.1-with-freetype-2.12.1.tar.gz and b/matplotlib-3.8.1-with-freetype-2.13.1.tar.gz differ diff --git a/matplotlib-3.7.1.tar.gz b/matplotlib-3.8.2.tar.gz similarity index 74% rename from matplotlib-3.7.1.tar.gz rename to matplotlib-3.8.2.tar.gz index 909969e54957750300013ff41f629b317de20b0d..0767af6d9ee13884078931295b19b9a334fc73b7 100644 Binary files a/matplotlib-3.7.1.tar.gz and b/matplotlib-3.8.2.tar.gz differ diff --git a/python-matplotlib.spec b/python-matplotlib.spec index aae407d780d9a69a84a6814788fb425826efdccd..86a402b28cb8c917285e04c7379fcff301fd47ba 100644 --- a/python-matplotlib.spec +++ b/python-matplotlib.spec @@ -1,15 +1,15 @@ Name: python-matplotlib -Version: 3.7.1 -Release: 2 +Version: 3.8.2 +Release: 1 Summary: A comprehensive library for creating static, animated, and interactive visualizations License: Python and MIT and OFL-1.1 and Public Domain URL: https://github.com/matplotlib/matplotlib Source0: https://github.com/matplotlib/matplotlib/archive/v%{version}/matplotlib-%{version}.tar.gz # The config file for python-matplotlib Source1: mplsetup.cfg -Source1000: https://github.com/QuLogic/mpl-images/archive/v3.7.1-with-freetype-2.12.1/matplotlib-3.7.1-with-freetype-2.12.1.tar.gz +Source1000: https://github.com/QuLogic/mpl-images/archive/v3.8.1-with-freetype-2.13.1/matplotlib-3.8.1-with-freetype-2.13.1.tar.gz Patch0001: 0001-matplotlibrc-path-search-fix.patch -Patch0002: 0002-Set-FreeType-version-to-2.12.1-and-update-tolerances.patch +Patch0002: 0002-Set-FreeType-version-to-2.13.1-and-update-tolerances.patch BuildRequires: freetype-devel libpng-devel qhull-devel texlive-cm xorg-x11-server-Xvfb zlib-devel BuildRequires: python3-certifi python3-pybind11 gcc-c++ python3-setuptools_scm @@ -92,14 +92,14 @@ Test data for python3-matplotlib. %autosetup -n matplotlib-%{version} -N %patch0001 -p1 %patch0002 -p1 -gzip -dc %SOURCE1000 | tar xvf - --transform='s~^mpl-images-3.7.1-with-freetype-2.12.1/\([^/]\+\)/~lib/\1/tests/baseline_images/~' +gzip -dc %SOURCE1000 | tar xvf - --transform='s~^mpl-images-3.8.1-with-freetype-2.13.1/\([^/]\+\)/~lib/\1/tests/baseline_images/~' # Copy setup.cfg to the builddir cp -p %{SOURCE1} mplsetup.cfg %build export http_proxy=http://127.0.0.1/ -find examples -name '*.py' -exec chmod a-x '{}' \; +find galleries -name '*.py' -exec chmod a-x '{}' \; PLCONFIGDIR=$PWD %py3_build @@ -147,6 +147,9 @@ mv %{buildroot}%{python3_sitearch}/matplotlib/mpl-data %{buildroot}%{_datadir}/m %{python3_sitearch}/matplotlib/backends/{tkagg.*,__pycache__/tkagg.*,_tkagg.*} %changelog +* Tue Mar 12 2024 xu_ping <707078654@qq.com> - 3.8.2-1 +- Upgrade version to 3.8.2 + * Wed May 10 2023 wulei - 3.7.1-2 - Fix the version cannot be detected