From 42e8f282862175863a5a9881be1befd0fe38cc35 Mon Sep 17 00:00:00 2001 From: Dmitry Samoylik Date: Thu, 26 Dec 2024 20:37:57 +0300 Subject: [PATCH] change version --- ..metadata | 2 - .gitignore | 4 +- .python-matplotlib.metadata | 2 + .../0001-matplotlibrc-path-search-fix.patch | 12 +- .../0002-Unpin-NumPy-build-requirement.patch | 14 +- ...sion-to-2.13.1-and-update-tolerances.patch | 139 +++++++++++------- ...Unpin-meson-python-build-requirement.patch | 38 ----- ...indows-implementation-on-32-bit-x86.patch} | 8 +- ...e-some-tolerances-for-non-x86-arches.patch | 26 ++++ SOURCES/mplsetup.cfg | 8 + SPECS/python-matplotlib.spec | 81 +++------- 11 files changed, 161 insertions(+), 173 deletions(-) delete mode 100644 ..metadata create mode 100644 .python-matplotlib.metadata delete mode 100644 SOURCES/0004-Unpin-meson-python-build-requirement.patch rename SOURCES/{0005-Use-old-stride_windows-implementation-on-32-bit-x86.patch => 0004-Use-old-stride_windows-implementation-on-32-bit-x86.patch} (94%) create mode 100644 SOURCES/0005-TST-Increase-some-tolerances-for-non-x86-arches.patch create mode 100644 SOURCES/mplsetup.cfg diff --git a/..metadata b/..metadata deleted file mode 100644 index 273a05c..0000000 --- a/..metadata +++ /dev/null @@ -1,2 +0,0 @@ -e69d8798c1580d7ca02715f11532efd1f163f987 SOURCES/matplotlib-3.9.4.tar.gz -b34c3b5e5cc9163d1420a44d64407ff79643ec15 SOURCES/matplotlib-3.9.3-with-freetype-2.13.1.tar.gz diff --git a/.gitignore b/.gitignore index 94ac992..7c273cd 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,2 @@ -SOURCES/matplotlib-3.9.4.tar.gz -SOURCES/matplotlib-3.9.3-with-freetype-2.13.1.tar.gz +SOURCES/matplotlib-3.8.4.tar.gz +SOURCES/matplotlib-3.8.3-with-freetype-2.13.1.tar.gz diff --git a/.python-matplotlib.metadata b/.python-matplotlib.metadata new file mode 100644 index 0000000..1003f66 --- /dev/null +++ b/.python-matplotlib.metadata @@ -0,0 +1,2 @@ +1e396f85cbd275522fa43fc41c1320cba421337e SOURCES/matplotlib-3.8.4.tar.gz +46dde66f5d993e2b9eb22821372618fadee0faec SOURCES/matplotlib-3.8.3-with-freetype-2.13.1.tar.gz diff --git a/SOURCES/0001-matplotlibrc-path-search-fix.patch b/SOURCES/0001-matplotlibrc-path-search-fix.patch index a189044..170cd01 100644 --- a/SOURCES/0001-matplotlibrc-path-search-fix.patch +++ b/SOURCES/0001-matplotlibrc-path-search-fix.patch @@ -1,4 +1,4 @@ -From fde31cca645d54c6f019d4882b6fe4e71a6dc946 Mon Sep 17 00:00:00 2001 +From ce0e47a95ec43750080afa889b35ec26106a6a47 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 @@ -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 ad4676b11a..b925a4a703 100644 +index 353406832c..26dd9372e1 100644 --- a/lib/matplotlib/__init__.py +++ b/lib/matplotlib/__init__.py -@@ -589,7 +589,8 @@ def get_cachedir(): +@@ -582,7 +582,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 ad4676b11a..b925a4a703 100644 def matplotlib_fname(): -@@ -609,6 +610,7 @@ def matplotlib_fname(): +@@ -602,6 +603,7 @@ def matplotlib_fname(): is not defined) - On other platforms, - ``$HOME/.matplotlib/matplotlibrc`` if ``$HOME`` is defined @@ -30,7 +30,7 @@ index ad4676b11a..b925a4a703 100644 - Lastly, it looks in ``$MATPLOTLIBDATA/matplotlibrc``, which should always exist. """ -@@ -627,6 +629,7 @@ def matplotlib_fname(): +@@ -620,6 +622,7 @@ def matplotlib_fname(): yield matplotlibrc yield os.path.join(matplotlibrc, 'matplotlibrc') yield os.path.join(get_configdir(), 'matplotlibrc') @@ -39,5 +39,5 @@ index ad4676b11a..b925a4a703 100644 for fname in gen_candidates(): -- -2.47.0 +2.43.0 diff --git a/SOURCES/0002-Unpin-NumPy-build-requirement.patch b/SOURCES/0002-Unpin-NumPy-build-requirement.patch index d87498a..f471bf4 100644 --- a/SOURCES/0002-Unpin-NumPy-build-requirement.patch +++ b/SOURCES/0002-Unpin-NumPy-build-requirement.patch @@ -1,4 +1,4 @@ -From 9421754530479435e21a98d2f549330899ed8d85 Mon Sep 17 00:00:00 2001 +From 05484ecf85b7f9ca67da454a4147098023626a81 Mon Sep 17 00:00:00 2001 From: Elliott Sales de Andrade Date: Fri, 11 Aug 2023 02:36:06 -0400 Subject: [PATCH 2/5] Unpin NumPy build requirement @@ -13,12 +13,12 @@ Signed-off-by: Elliott Sales de Andrade 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/pyproject.toml b/pyproject.toml -index aa6aa23506..1894bbf3cd 100644 +index 44f56d8cc1..33ce124527 100644 --- a/pyproject.toml +++ b/pyproject.toml -@@ -76,18 +76,7 @@ requires = [ - "meson-python>=0.13.1,<0.17.0", - "pybind11>=2.6,!=2.13.3", +@@ -5,18 +5,7 @@ requires = [ + "pybind11>=2.6", + "setuptools>=64", "setuptools_scm>=7", - - # Comments on numpy build requirement range: @@ -35,7 +35,7 @@ index aa6aa23506..1894bbf3cd 100644 + "numpy", ] - [tool.meson-python.args] + [tool.setuptools_scm] -- -2.47.0 +2.43.0 diff --git a/SOURCES/0003-Set-FreeType-version-to-2.13.1-and-update-tolerances.patch b/SOURCES/0003-Set-FreeType-version-to-2.13.1-and-update-tolerances.patch index 21d78dc..abbe775 100644 --- a/SOURCES/0003-Set-FreeType-version-to-2.13.1-and-update-tolerances.patch +++ b/SOURCES/0003-Set-FreeType-version-to-2.13.1-and-update-tolerances.patch @@ -1,51 +1,38 @@ -From 283c5005dbbbea1147e539075032d6ec43c88166 Mon Sep 17 00:00:00 2001 +From 1bbba2045f0722ccd97513037d49f2f656e349df 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 --- - extern/meson.build | 2 +- - lib/matplotlib/__init__.py | 2 +- - lib/matplotlib/tests/test_axes.py | 4 ++-- - lib/matplotlib/tests/test_backend_pgf.py | 2 +- - lib/matplotlib/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 +++++----- - 8 files changed, 18 insertions(+), 18 deletions(-) + 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/extern/meson.build b/extern/meson.build -index 662feb7872..df42b908af 100644 ---- a/extern/meson.build -+++ b/extern/meson.build -@@ -14,7 +14,7 @@ else - # must match the value in `lib/matplotlib.__init__.py`. Also update the docs - # in `docs/devel/dependencies.rst`. Bump the cache key in - # `.circleci/config.yml` when changing requirements. -- LOCAL_FREETYPE_VERSION = '2.6.1' -+ LOCAL_FREETYPE_VERSION = '2.13.1' - - freetype_proj = subproject( - f'freetype-@LOCAL_FREETYPE_VERSION@', diff --git a/lib/matplotlib/__init__.py b/lib/matplotlib/__init__.py -index b925a4a703..ec68e4932b 100644 +index 26dd9372e1..81b77d455f 100644 --- a/lib/matplotlib/__init__.py +++ b/lib/matplotlib/__init__.py -@@ -1316,7 +1316,7 @@ def _val_or_rc(val, rc_name): +@@ -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 `meson.build`. + # 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.13.1' 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 e99ef129eb..2355c82f62 100644 +index 0372747009..9cee2dbd41 100644 --- a/lib/matplotlib/tests/test_axes.py +++ b/lib/matplotlib/tests/test_axes.py -@@ -7765,7 +7765,7 @@ def test_normal_axes(): +@@ -7642,7 +7642,7 @@ def test_normal_axes(): ] for nn, b in enumerate(bbaxis): targetbb = mtransforms.Bbox.from_bounds(*target[nn]) @@ -54,7 +41,7 @@ index e99ef129eb..2355c82f62 100644 target = [ [150.0, 119.999, 930.0, 11.111], -@@ -7783,7 +7783,7 @@ def test_normal_axes(): +@@ -7660,7 +7660,7 @@ def test_normal_axes(): target = [85.5138, 75.88888, 1021.11, 1017.11] targetbb = mtransforms.Bbox.from_bounds(*target) @@ -77,10 +64,10 @@ index 8a83515f16..26bc9d6c48 100644 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 4dc4d9501e..47a4e80bb5 100644 +index 6703dfe315..ea6a8d9630 100644 --- a/lib/matplotlib/tests/test_constrainedlayout.py +++ b/lib/matplotlib/tests/test_constrainedlayout.py -@@ -435,7 +435,7 @@ def test_hidden_axes(): +@@ -432,7 +432,7 @@ def test_hidden_axes(): extents1 = np.copy(axs[0, 0].get_position().extents) np.testing.assert_allclose( @@ -89,7 +76,7 @@ index 4dc4d9501e..47a4e80bb5 100644 def test_colorbar_align(): -@@ -641,9 +641,9 @@ def test_compressed1(): +@@ -638,9 +638,9 @@ def test_compressed1(): fig.draw_without_rendering() pos = axs[0, 0].get_position() @@ -101,7 +88,7 @@ index 4dc4d9501e..47a4e80bb5 100644 # wider than tall fig, axs = plt.subplots(2, 3, layout='compressed', -@@ -656,10 +656,10 @@ def test_compressed1(): +@@ -653,10 +653,10 @@ def test_compressed1(): pos = axs[0, 0].get_position() np.testing.assert_allclose(pos.x0, 0.06195, atol=1e-3) @@ -115,10 +102,10 @@ index 4dc4d9501e..47a4e80bb5 100644 @pytest.mark.parametrize('arg, state', [ diff --git a/lib/matplotlib/tests/test_legend.py b/lib/matplotlib/tests/test_legend.py -index 3c2af27564..2b8709f934 100644 +index 759ac6aada..8140d4d69f 100644 --- a/lib/matplotlib/tests/test_legend.py +++ b/lib/matplotlib/tests/test_legend.py -@@ -520,9 +520,9 @@ def test_figure_legend_outside(): +@@ -516,9 +516,9 @@ def test_figure_legend_outside(): fig.draw_without_rendering() assert_allclose(axs.get_window_extent().extents, @@ -129,9 +116,9 @@ index 3c2af27564..2b8709f934 100644 + legbb[nn], rtol=1) - @image_comparison(['legend_stackplot.png'], + @image_comparison(['legend_stackplot.png']) diff --git a/lib/matplotlib/tests/test_polar.py b/lib/matplotlib/tests/test_polar.py -index 6b3c08d2eb..5160112e37 100644 +index 9a1c6be6fc..7df88e96b4 100644 --- a/lib/matplotlib/tests/test_polar.py +++ b/lib/matplotlib/tests/test_polar.py @@ -321,7 +321,7 @@ def test_get_tightbbox_polar(): @@ -144,28 +131,72 @@ index 6b3c08d2eb..5160112e37 100644 @check_figures_equal(extensions=["png"]) diff --git a/lib/matplotlib/tests/test_tightlayout.py b/lib/matplotlib/tests/test_tightlayout.py -index 9c654f4d1f..9678e34a80 100644 +index 968f0da7b5..89caa81b98 100644 --- a/lib/matplotlib/tests/test_tightlayout.py +++ b/lib/matplotlib/tests/test_tightlayout.py -@@ -174,13 +174,13 @@ def test_outward_ticks(): +@@ -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. - expected = [ -- [[0.091, 0.607], [0.433, 0.933]], -- [[0.579, 0.607], [0.922, 0.933]], -- [[0.091, 0.140], [0.433, 0.466]], -- [[0.579, 0.140], [0.922, 0.466]], -+ [[0.09, 0.61], [0.43, 0.93]], -+ [[0.58, 0.61], [0.92, 0.93]], -+ [[0.09, 0.14], [0.43, 0.47]], -+ [[0.58, 0.14], [0.92, 0.47]], - ] +- ans = [[[0.091, 0.607], [0.433, 0.933]], +- [[0.579, 0.607], [0.922, 0.933]], +- [[0.091, 0.140], [0.433, 0.466]], +- [[0.579, 0.140], [0.922, 0.466]]] ++ ans = [[[0.09, 0.61], [0.43, 0.93]], ++ [[0.58, 0.61], [0.92, 0.93]], ++ [[0.09, 0.14], [0.43, 0.47]], ++ [[0.58, 0.14], [0.92, 0.47]]] for nn, ax in enumerate(fig.axes): - assert_array_equal(np.round(ax.get_position().get_points(), 3), + assert_array_equal(np.round(ax.get_position().get_points(), 2), - expected[nn]) - - + ans[nn]) + + +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': ++ 'a45c6b403413abd5706f3582f04c8339d26397c4304b78fa552f2215df64101f', + '2.11.1': +- 'f8db94d307e9c54961b39a1cc799a67d46681480696ed72ecf78d4473770f09b' ++ 'f8db94d307e9c54961b39a1cc799a67d46681480696ed72ecf78d4473770f09b', ++ '2.12.0': ++ '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`. Also update the docs in + # `docs/devel/dependencies.rst`. +-TESTING_VERSION_OF_FREETYPE = '2.6.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 +@@ -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.47.0 +2.43.0 diff --git a/SOURCES/0004-Unpin-meson-python-build-requirement.patch b/SOURCES/0004-Unpin-meson-python-build-requirement.patch deleted file mode 100644 index b7135a0..0000000 --- a/SOURCES/0004-Unpin-meson-python-build-requirement.patch +++ /dev/null @@ -1,38 +0,0 @@ -From b671c4141dc9692ce8745a4ddb9f6b0b14e5e70f Mon Sep 17 00:00:00 2001 -From: Elliott Sales de Andrade -Date: Fri, 13 Dec 2024 02:03:33 -0500 -Subject: [PATCH 4/5] Unpin meson-python build requirement - -This is pinned to fix sdists, but we already have one and are building a -wheel, which should be fine. - -Signed-off-by: Elliott Sales de Andrade ---- - pyproject.toml | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/pyproject.toml b/pyproject.toml -index 1894bbf3cd..bdf2119f1b 100644 ---- a/pyproject.toml -+++ b/pyproject.toml -@@ -48,7 +48,7 @@ requires-python = ">=3.9" - [project.optional-dependencies] - # Should be a copy of the build dependencies below. - dev = [ -- "meson-python>=0.13.1,<0.17.0", -+ "meson-python>=0.13.1", - "numpy>=1.25", - "pybind11>=2.6,!=2.13.3", - "setuptools_scm>=7", -@@ -73,7 +73,7 @@ dev = [ - build-backend = "mesonpy" - # Also keep in sync with optional dependencies above. - requires = [ -- "meson-python>=0.13.1,<0.17.0", -+ "meson-python>=0.13.1", - "pybind11>=2.6,!=2.13.3", - "setuptools_scm>=7", - "numpy", --- -2.47.0 - diff --git a/SOURCES/0005-Use-old-stride_windows-implementation-on-32-bit-x86.patch b/SOURCES/0004-Use-old-stride_windows-implementation-on-32-bit-x86.patch similarity index 94% rename from SOURCES/0005-Use-old-stride_windows-implementation-on-32-bit-x86.patch rename to SOURCES/0004-Use-old-stride_windows-implementation-on-32-bit-x86.patch index 1c729f1..5f99162 100644 --- a/SOURCES/0005-Use-old-stride_windows-implementation-on-32-bit-x86.patch +++ b/SOURCES/0004-Use-old-stride_windows-implementation-on-32-bit-x86.patch @@ -1,7 +1,7 @@ -From f6ecac5a3c02b32d66acd0fff41e1732d0939f60 Mon Sep 17 00:00:00 2001 +From 59c900f49d605c1300c4bdaef23c94ad32a07e29 Mon Sep 17 00:00:00 2001 From: Elliott Sales de Andrade Date: Mon, 22 Aug 2022 18:43:28 -0400 -Subject: [PATCH 5/5] 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 --- @@ -9,7 +9,7 @@ Signed-off-by: Elliott Sales de Andrade 1 file changed, 35 insertions(+), 4 deletions(-) diff --git a/lib/matplotlib/mlab.py b/lib/matplotlib/mlab.py -index e1f08c0da5..5c0d56c74d 100644 +index 1948e6333e..158417a1c0 100644 --- a/lib/matplotlib/mlab.py +++ b/lib/matplotlib/mlab.py @@ -49,6 +49,7 @@ Spectral functions @@ -80,5 +80,5 @@ index e1f08c0da5..5c0d56c74d 100644 resultY = resultY * window.reshape((-1, 1)) resultY = np.fft.fft(resultY, n=pad_to, axis=0)[:numFreqs, :] -- -2.47.0 +2.43.0 diff --git a/SOURCES/0005-TST-Increase-some-tolerances-for-non-x86-arches.patch b/SOURCES/0005-TST-Increase-some-tolerances-for-non-x86-arches.patch new file mode 100644 index 0000000..2c2c672 --- /dev/null +++ b/SOURCES/0005-TST-Increase-some-tolerances-for-non-x86-arches.patch @@ -0,0 +1,26 @@ +From f6edb2b275f8fb4daa047df0b12008eac53306f0 Mon Sep 17 00:00:00 2001 +From: Elliott Sales de Andrade +Date: Fri, 11 Aug 2023 05:13:38 -0400 +Subject: [PATCH 5/5] TST: Increase some tolerances for non-x86 arches + +Signed-off-by: Elliott Sales de Andrade +--- + lib/mpl_toolkits/mplot3d/tests/test_axes3d.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/lib/mpl_toolkits/mplot3d/tests/test_axes3d.py b/lib/mpl_toolkits/mplot3d/tests/test_axes3d.py +index b3fcffcc6e..f400312859 100644 +--- a/lib/mpl_toolkits/mplot3d/tests/test_axes3d.py ++++ b/lib/mpl_toolkits/mplot3d/tests/test_axes3d.py +@@ -2264,7 +2264,7 @@ def test_scatter_masked_color(): + len(super(type(path3d), path3d).get_facecolors()) + + +-@mpl3d_image_comparison(['surface3d_zsort_inf.png'], style='mpl20') ++@mpl3d_image_comparison(['surface3d_zsort_inf.png'], style='mpl20', tol=0.055) + def test_surface3d_zsort_inf(): + fig = plt.figure() + ax = fig.add_subplot(projection='3d') +-- +2.43.0 + diff --git a/SOURCES/mplsetup.cfg b/SOURCES/mplsetup.cfg new file mode 100644 index 0000000..362e6ab --- /dev/null +++ b/SOURCES/mplsetup.cfg @@ -0,0 +1,8 @@ +[libs] +system_freetype = True +system_qhull = True + +[packages] +tests = True +toolkits = True +toolkits_tests = True diff --git a/SPECS/python-matplotlib.spec b/SPECS/python-matplotlib.spec index 7551045..f2e634c 100644 --- a/SPECS/python-matplotlib.spec +++ b/SPECS/python-matplotlib.spec @@ -1,8 +1,8 @@ ## START: Set by rpmautospec -## (rpmautospec version 0.7.3) +## (rpmautospec version 0.6.3) ## RPMAUTOSPEC: autorelease, autochangelog %define autorelease(e:s:pb:n) %{?-p:0.}%{lua: - release_number = 2; + release_number = 1; base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}")); print(release_number + base_release_number - 1); }%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{!?-n:%{?dist}} @@ -36,19 +36,17 @@ % endif %endif -%global build_backend_args -Csetup-args="-Dsystem-freetype=true" -Csetup-args="-Dsystem-qhull=true" -Cinstall-args="--tags=data,python-runtime,runtime,tests" - # Use the same directory of the main package for subpackage licence and docs %global _docdir_fmt %{name} # Updated test images for new FreeType. -%global mpl_images_version 3.9.3 +%global mpl_images_version 3.8.3 # The version of FreeType in this Fedora branch. %global ftver 2.13.1 Name: python-matplotlib -Version: 3.9.4 +Version: 3.8.4 %global Version %{version_no_tilde %{quote:%nil}} Release: %autorelease Summary: Python 2D plotting library @@ -57,6 +55,7 @@ Summary: Python 2D plotting library License: PSF-2.0 AND MIT AND CC0-1.0 URL: https://matplotlib.org Source0: %pypi_source matplotlib %{Version} +Source1: mplsetup.cfg # Fedora-specific patches; see: # https://github.com/fedora-python/matplotlib/tree/fedora-patches @@ -68,11 +67,11 @@ Patch1001: 0001-matplotlibrc-path-search-fix.patch Patch1002: 0002-Unpin-NumPy-build-requirement.patch # Increase tolerances for new FreeType everywhere: Patch1003: 0003-Set-FreeType-version-to-%{ftver}-and-update-tolerances.patch -# We don't need to use older meson-python. -Patch1004: 0004-Unpin-meson-python-build-requirement.patch # https://github.com/matplotlib/matplotlib/pull/21190#issuecomment-1223271888 -Patch0001: 0005-Use-old-stride_windows-implementation-on-32-bit-x86.patch +Patch0001: 0004-Use-old-stride_windows-implementation-on-32-bit-x86.patch +# https://github.com/matplotlib/matplotlib/pull/26502 +Patch0002: 0005-TST-Increase-some-tolerances-for-non-x86-arches.patch BuildRequires: gcc BuildRequires: gcc-c++ @@ -170,7 +169,7 @@ Obsoletes: python-matplotlib-data < 3 Summary: Fonts used by python-matplotlib # Carlogo, STIX and Computer Modern is OFL # DejaVu is Bitstream Vera and Public Domain -License: OFL-1.1 AND Bitstream-Vera AND LicenseRef-Fedora-Public-Domain +License: OFL-1.1 and Bitstream-Vera and LicenseRef-Fedora-Public-Domain BuildArch: noarch Requires: python3-matplotlib-data = %{version}-%{release} Obsoletes: python-matplotlib-data-fonts < 3 @@ -231,7 +230,6 @@ Obsoletes: python3-matplotlib-qt4 < 3.5.0-0 Summary: Qt6 backend for python3-matplotlib BuildRequires: python3dist(cairocffi) BuildRequires: python3dist(pyqt6) -BuildRequires: python3-pyqt6 Requires: python3-matplotlib%{?_isa} = %{version}-%{release} Requires: python3dist(cairocffi) Requires: python3dist(pyqt6) @@ -293,7 +291,6 @@ BuildRequires: make BuildRequires: python3dist(sphinx) BuildRequires: tex(latex) BuildRequires: tex-preview -BuildRequires: ipython %endif Requires: python3-matplotlib%{?_isa} = %{version}-%{release} @@ -316,19 +313,22 @@ Requires: python3-matplotlib%{?_isa} = %{version}-%{release} # Updated test images for new FreeType. gzip -dc %SOURCE1000 | tar xf - --transform='s~^mpl-images-%{mpl_images_version}-with-freetype-%{ftver}/~~' +# Copy mplsetup.cfg to the builddir +cp -p %{SOURCE1} mplsetup.cfg + # Backports or reported upstream %autopatch -p1 -M 999 %generate_buildrequires -%pyproject_buildrequires -p +%pyproject_buildrequires -r %build %set_build_flags export http_proxy=http://127.0.0.1/ -MPLCONFIGDIR=$PWD %pyproject_wheel %build_backend_args +MPLCONFIGDIR=$PWD %pyproject_wheel %if %{with html} # Need to make built matplotlib libs available for the sphinx extensions: MPLCONFIGDIR=$PWD \ @@ -346,6 +346,7 @@ export http_proxy=http://127.0.0.1/ MPLCONFIGDIR=$PWD %pyproject_install # Delete unnecessary files. +rm %{buildroot}%{python3_sitearch}/matplotlib/backends/web_backend/.{eslintrc.js,prettierignore,prettierrc} rm %{buildroot}%{python3_sitearch}/matplotlib/tests/tinypages/.gitignore rm %{buildroot}%{python3_sitearch}/matplotlib/tests/tinypages/_static/.gitignore @@ -373,24 +374,17 @@ mktexfmt xelatex.fmt %{py3_test_envvars} %{python3} -c 'import matplotlib.font_manager' export http_proxy=http://127.0.0.1/ - -# This test checks for "slowness" that often fails on a heavily-loaded builder. -k="${k-}${k+ and }not test_invisible_Line_rendering" -# This test is flaky. -k="${k-}${k+ and }not test_form_widget_get_with_datetime_and_date_fields" -%ifarch %{ix86} -# This test won't work due to Xvfb not existing. -k="${k-}${k+ and }not test_cross_Qt_imports" -%endif - -# This fixes GTK4 which is missing a dependency for its current default renderer. -GSK_RENDERER=cairo \ +# Skips: +# * test_invisible_Line_rendering: Checks for "slowness" that often fails on a +# heavily-loaded builder. +# * test_form_widget_get_with_datetime_and_date_fields is flaky. MPLCONFIGDIR=$PWD \ %ifnarch %{ix86} xvfb-run -a -s "-screen 0 640x480x24" \ %endif env %{pytest} -ra -n auto \ - -m 'not network' -k "${k-}" \ + -m 'not network' \ + -k 'not test_invisible_Line_rendering and not test_form_widget_get_with_datetime_and_date_fields' \ --pyargs matplotlib mpl_toolkits.axes_grid1 mpl_toolkits.axisartist mpl_toolkits.mplot3d %endif @@ -460,40 +454,7 @@ MPLCONFIGDIR=$PWD \ %changelog -* Thu Dec 26 2024 Dmitriy Samoylik - 3.9.4-2 -- Rebuilt for MSVSphere 10 - ## START: Generated by rpmautospec -* Mon Dec 16 2024 Orion Poplawski - 3.9.4-2 -- Rebuild with numpy 2.0 - -* Sat Dec 14 2024 Elliott Sales de Andrade - 3.9.4-1 -- Update to latest version - -* Thu Dec 05 2024 Elliott Sales de Andrade - 3.9.3-1 -- Update to latest version - -* Sat Nov 30 2024 Elliott Sales de Andrade - 3.9.1-3 -- Read the runtime dependencies from pyproject.toml - -* Fri Jul 19 2024 Fedora Release Engineering - 3.9.1-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild - -* Fri Jul 05 2024 Elliott Sales de Andrade - 3.9.1-1 -- Update to latest version (#2295755) - -* Sun Jun 09 2024 Python Maint - 3.9.0-4 -- Rebuilt for Python 3.13 - -* Sat Jun 08 2024 Python Maint - 3.9.0-3 -- Bootstrap for Python 3.13 - -* Thu May 30 2024 Karolina Surma - 3.9.0-2 -- Move IPython to html dependencies - -* Fri May 17 2024 Elliott Sales de Andrade - 3.9.0-1 -- Update to latest version (#2274216) - * Thu Apr 04 2024 Elliott Sales de Andrade - 3.8.4-1 - Update to latest version (#2273293)