Compare commits

..

24 Commits

Author SHA1 Message Date
Kaleb S. KEITHLEY
dae6cb6672 3.9.1-0, again 2024-12-17 15:17:38 -05:00
Kaleb S. KEITHLEY
eef3f0453a - bootstrap epel10
-  temporarily (or is it?) remove qt5 sub-package. Will epel10 get qt5?
-  temporarily remove test w/ xvfb-run until I can figure out the
   proper replacement.
-  inkscape seems to not be needed. Or am I wrong about that? It builds
   without it as a BR. Will add it back when inkscape is built for EPEL10.
2024-12-17 14:48:44 -05:00
Fedora Release Engineering
5211b69b49 Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild 2024-07-19 13:02:11 +00:00
Elliott Sales de Andrade
ec553ec074 Update to latest version (#2295755) 2024-07-05 04:50:41 -04:00
Python Maint
3d74b361b1 Rebuilt for Python 3.13 2024-06-09 22:43:11 +02:00
Python Maint
e7c8d98b41 Bootstrap for Python 3.13 2024-06-08 20:41:40 +02:00
Karolina Surma
51c7ba15fe Move IPython to html dependencies
It's only required for generating the documentation, see:
https://github.com/matplotlib/matplotlib/blob/v3.9.0/requirements/doc/doc-requirements.txt#L12
2024-05-30 09:34:35 +02:00
Elliott Sales de Andrade
aff8846c80 Update to latest version (#2274216) 2024-05-17 01:06:08 -04:00
Elliott Sales de Andrade
97d2c5437b Update to latest version (#2273293) 2024-04-04 02:52:09 -04:00
Elliott Sales de Andrade
1d44751f59 Fix SPDX license expression 2024-03-14 17:41:05 -04:00
Elliott Sales de Andrade
c26fa011b2 Update to latest version (#2264330) 2024-03-14 06:07:40 -04:00
Fedora Release Engineering
cb921b4252 Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild 2024-01-29 11:11:21 +00:00
Fedora Release Engineering
65d146772c Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild 2024-01-26 06:36:39 +00:00
Fedora Release Engineering
b5a125ff69 Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild 2024-01-22 03:15:12 +00:00
Elliott Sales de Andrade
4836060bd0 Update to latest version (#2250372) 2023-11-18 05:25:36 -05:00
Elliott Sales de Andrade
1b16bcd2b0 Update to latest version (#2247356) 2023-11-01 04:17:36 -04:00
Elliott Sales de Andrade
b10c4c84d1 Update to latest version (#2230778) 2023-09-16 00:57:57 -04:00
Elliott Sales de Andrade
52ef239853 Use version_no_tilde macro to simplify spec
[skip changelog]
2023-09-15 23:08:33 -04:00
Elliott Sales de Andrade
829c70b69a Increase a tolerance for SIMD-accelerated x86_64
[skip changelog]
2023-09-13 03:27:14 -04:00
Elliott Sales de Andrade
df0d40dcb0 Prime font cache before testing
[skip changelog]
2023-08-21 20:45:27 -04:00
Elliott Sales de Andrade
acd2786cac Update to latest version (#2230778) 2023-08-14 13:42:16 -04:00
Tom Callaway
e812a3aea3 add upstream sphinx fix 2023-08-11 13:20:57 -04:00
Tom Callaway
6e57c9f80c rebuild for new qhull 2023-08-11 10:19:40 -04:00
Fedora Release Engineering
a366353832 Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2023-07-21 11:17:04 +00:00
10 changed files with 235 additions and 190 deletions

18
.gitignore vendored
View File

@@ -90,8 +90,6 @@ matplotlib-1.0.0-without-gpc.tar.gz
/matplotlib-3.6.1-with-freetype-2.12.1.tar.gz
/matplotlib-3.6.2.tar.gz
/matplotlib-3.6.3.tar.gz
/pgf_pdflatex.pdf
/pgf_rcupdate2.pdf
/matplotlib-3.7.0rc1.tar.gz
/matplotlib-3.7.0rc1-with-freetype-2.12.1.tar.gz
/matplotlib-3.7.0.tar.gz
@@ -100,5 +98,17 @@ matplotlib-1.0.0-without-gpc.tar.gz
/matplotlib-3.7.1-with-freetype-2.12.1.tar.gz
/matplotlib-3.7.2.tar.gz
/matplotlib-3.7.2-with-freetype-2.13.1.tar.gz
/matplotlib-3.7.3.tar.gz
/matplotlib-3.7.4.tar.gz
/matplotlib-3.8.0rc1.tar.gz
/matplotlib-3.8.0rc1-with-freetype-2.13.1.tar.gz
/matplotlib-3.8.0.tar.gz
/matplotlib-3.8.0-with-freetype-2.13.1.tar.gz
/matplotlib-3.8.1.tar.gz
/matplotlib-3.8.1-with-freetype-2.13.1.tar.gz
/matplotlib-3.8.2.tar.gz
/matplotlib-3.8.3.tar.gz
/matplotlib-3.8.3-with-freetype-2.13.1.tar.gz
/matplotlib-3.8.4.tar.gz
/matplotlib-3.9.0.tar.gz
/matplotlib-3.9.0-with-freetype-2.13.1.tar.gz
/matplotlib-3.9.1.tar.gz
/matplotlib-3.9.1-with-freetype-2.13.1.tar.gz

View File

@@ -1,4 +1,4 @@
From 7f525ad4de95f9e9ec90a39498eefd22aadcedda Mon Sep 17 00:00:00 2001
From 7aa7b4d240236c0660be400a7a9ef7d5837e6d47 Mon Sep 17 00:00:00 2001
From: Elliott Sales de Andrade <quantum.analyst@gmail.com>
Date: Wed, 27 Sep 2017 19:35:59 -0400
Subject: [PATCH 1/4] matplotlibrc path search fix
@@ -9,10 +9,10 @@ Signed-off-by: Elliott Sales de Andrade <quantum.analyst@gmail.com>
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/lib/matplotlib/__init__.py b/lib/matplotlib/__init__.py
index ae68094000..06fb76827d 100644
index 9e9325a27d..346e3d3454 100644
--- a/lib/matplotlib/__init__.py
+++ b/lib/matplotlib/__init__.py
@@ -570,7 +570,8 @@ def get_cachedir():
@@ -586,7 +586,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 ae68094000..06fb76827d 100644
def matplotlib_fname():
@@ -590,6 +591,7 @@ def matplotlib_fname():
@@ -606,6 +607,7 @@ def matplotlib_fname():
is not defined)
- On other platforms,
- ``$HOME/.matplotlib/matplotlibrc`` if ``$HOME`` is defined
@@ -30,7 +30,7 @@ index ae68094000..06fb76827d 100644
- Lastly, it looks in ``$MATPLOTLIBDATA/matplotlibrc``, which should always
exist.
"""
@@ -608,6 +610,7 @@ def matplotlib_fname():
@@ -624,6 +626,7 @@ def matplotlib_fname():
yield matplotlibrc
yield os.path.join(matplotlibrc, 'matplotlibrc')
yield os.path.join(get_configdir(), 'matplotlibrc')
@@ -39,5 +39,5 @@ index ae68094000..06fb76827d 100644
for fname in gen_candidates():
--
2.41.0
2.44.0

View File

@@ -1,26 +0,0 @@
From 4fc7594b7f3eb3a9b8c9b2ea53aa7230cc7305a9 Mon Sep 17 00:00:00 2001
From: Elliott Sales de Andrade <quantum.analyst@gmail.com>
Date: Thu, 26 Jan 2023 06:40:06 -0500
Subject: [PATCH 2/4] Don't require oldest-supported-numpy
Signed-off-by: Elliott Sales de Andrade <quantum.analyst@gmail.com>
---
pyproject.toml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pyproject.toml b/pyproject.toml
index e887bd0975..673981f236 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -2,7 +2,7 @@
build-backend = "setuptools.build_meta"
requires = [
"certifi>=2020.06.20",
- "oldest-supported-numpy",
+ "numpy",
"pybind11>=2.6",
"setuptools>=42",
"setuptools_scm>=7",
--
2.41.0

View File

@@ -0,0 +1,41 @@
From 6caae8127c121be0ad36e0e7b47518519543dffd Mon Sep 17 00:00:00 2001
From: Elliott Sales de Andrade <quantum.analyst@gmail.com>
Date: Fri, 11 Aug 2023 02:36:06 -0400
Subject: [PATCH 2/4] Unpin NumPy build requirement
This is so high simply to take advantage of the new
backwards-compatibility guarantee in NumPy 1.25, but Fedora will never
run against a version different from the one it was built against.
Signed-off-by: Elliott Sales de Andrade <quantum.analyst@gmail.com>
---
pyproject.toml | 13 +------------
1 file changed, 1 insertion(+), 12 deletions(-)
diff --git a/pyproject.toml b/pyproject.toml
index fe75b325dc..4c34fa395f 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -75,18 +75,7 @@ requires = [
"meson-python>=0.13.1",
"pybind11>=2.6",
"setuptools_scm>=7",
-
- # Comments on numpy build requirement range:
- #
- # 1. >=2.0.x is the numpy requirement for wheel builds for distribution
- # on PyPI - building against 2.x yields wheels that are also
- # ABI-compatible with numpy 1.x at runtime.
- # 2. Note that building against numpy 1.x works fine too - users and
- # redistributors can do this by installing the numpy version they like
- # and disabling build isolation.
- # 3. The <2.3 upper bound is for matching the numpy deprecation policy,
- # it should not be loosened.
- "numpy>=2.0.0rc1,<2.3",
+ "numpy",
]
[tool.meson-python.args]
--
2.44.0

View File

@@ -1,37 +1,51 @@
From 3701d77ac6d708557ccc12dbbfe1ab114d36c319 Mon Sep 17 00:00:00 2001
From d2ce17b7096e9f83f9ba4ac37052fe5d2e07f223 Mon Sep 17 00:00:00 2001
From: Elliott Sales de Andrade <quantum.analyst@gmail.com>
Date: Fri, 14 Feb 2020 06:05:42 -0500
Subject: [PATCH 3/4] Set FreeType version to 2.13.1 and update tolerances
Signed-off-by: Elliott Sales de Andrade <quantum.analyst@gmail.com>
---
lib/matplotlib/__init__.py | 2 +-
lib/matplotlib/tests/test_axes.py | 4 ++--
.../tests/test_constrainedlayout.py | 8 +++----
lib/matplotlib/tests/test_legend.py | 4 ++--
lib/matplotlib/tests/test_polar.py | 2 +-
lib/matplotlib/tests/test_tightlayout.py | 10 ++++-----
setupext.py | 21 +++++++++++++++++--
7 files changed, 34 insertions(+), 17 deletions(-)
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(-)
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 06fb76827d..0760141c77 100644
index 346e3d3454..ebf5818417 100644
--- a/lib/matplotlib/__init__.py
+++ b/lib/matplotlib/__init__.py
@@ -1288,7 +1288,7 @@ def is_interactive():
@@ -1313,7 +1313,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`
# The version of FreeType to install locally for running the tests. This must match
# the value in `meson.build`.
- 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 cef1c76af6..f1b7a0e884 100644
index 0ed5a11c13..ee220f1854 100644
--- a/lib/matplotlib/tests/test_axes.py
+++ b/lib/matplotlib/tests/test_axes.py
@@ -7433,7 +7433,7 @@ def test_normal_axes():
@@ -7714,7 +7714,7 @@ def test_normal_axes():
]
for nn, b in enumerate(bbaxis):
targetbb = mtransforms.Bbox.from_bounds(*target[nn])
@@ -40,7 +54,7 @@ index cef1c76af6..f1b7a0e884 100644
target = [
[150.0, 119.999, 930.0, 11.111],
@@ -7451,7 +7451,7 @@ def test_normal_axes():
@@ -7732,7 +7732,7 @@ def test_normal_axes():
target = [85.5138, 75.88888, 1021.11, 1017.11]
targetbb = mtransforms.Bbox.from_bounds(*target)
@@ -49,11 +63,24 @@ index cef1c76af6..f1b7a0e884 100644
# test that get_position roundtrips to get_window_extent
axbb = ax.get_position().transformed(fig.transFigure).bounds
diff --git a/lib/matplotlib/tests/test_backend_pgf.py b/lib/matplotlib/tests/test_backend_pgf.py
index 8a83515f16..26bc9d6c48 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 ee08c375c7..8d72db556b 100644
index 4dc4d9501e..47a4e80bb5 100644
--- a/lib/matplotlib/tests/test_constrainedlayout.py
+++ b/lib/matplotlib/tests/test_constrainedlayout.py
@@ -432,7 +432,7 @@ def test_hidden_axes():
@@ -435,7 +435,7 @@ def test_hidden_axes():
extents1 = np.copy(axs[0, 0].get_position().extents)
np.testing.assert_allclose(
@@ -62,16 +89,19 @@ index ee08c375c7..8d72db556b 100644
def test_colorbar_align():
@@ -638,7 +638,7 @@ def test_compressed1():
@@ -641,9 +641,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)
@@ -653,10 +653,10 @@ def test_compressed1():
# wider than tall
fig, axs = plt.subplots(2, 3, layout='compressed',
@@ -656,10 +656,10 @@ def test_compressed1():
pos = axs[0, 0].get_position()
np.testing.assert_allclose(pos.x0, 0.06195, atol=1e-3)
@@ -85,10 +115,10 @@ index ee08c375c7..8d72db556b 100644
@pytest.mark.parametrize('arg, state', [
diff --git a/lib/matplotlib/tests/test_legend.py b/lib/matplotlib/tests/test_legend.py
index a8d7fd107d..cbca9e93e9 100644
index 0353f1408b..f5b341daaa 100644
--- a/lib/matplotlib/tests/test_legend.py
+++ b/lib/matplotlib/tests/test_legend.py
@@ -522,9 +522,9 @@ def test_figure_legend_outside():
@@ -520,9 +520,9 @@ def test_figure_legend_outside():
fig.draw_without_rendering()
assert_allclose(axs.get_window_extent().extents,
@@ -99,9 +129,9 @@ index a8d7fd107d..cbca9e93e9 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 9d6e78da2c..5f6ed538d1 100644
index 6b3c08d2eb..5160112e37 100644
--- a/lib/matplotlib/tests/test_polar.py
+++ b/lib/matplotlib/tests/test_polar.py
@@ -321,7 +321,7 @@ def test_get_tightbbox_polar():
@@ -114,71 +144,28 @@ index 9d6e78da2c..5f6ed538d1 100644
@check_figures_equal(extensions=["png"])
diff --git a/lib/matplotlib/tests/test_tightlayout.py b/lib/matplotlib/tests/test_tightlayout.py
index 968f0da7b5..89caa81b98 100644
index 9c654f4d1f..9678e34a80 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()
@@ -174,13 +174,13 @@ def test_outward_ticks():
# These values were obtained after visual checking that they correspond
# to a tight layouting that did take the ticks into account.
- 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]]]
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]],
]
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),
ans[nn])
expected[nn])
diff --git a/setupext.py b/setupext.py
index a898d642d6..b22d875d6f 100644
--- a/setupext.py
+++ b/setupext.py
@@ -176,13 +176,29 @@ _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`.
-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
@@ -597,6 +613,7 @@ class FreeType(SetupPackage):
ext.extra_objects.insert(
0, str(src_path / 'objs' / '.libs' / libfreetype))
ext.define_macros.append(('FREETYPE_BUILD_TYPE', 'local'))
+ ext.libraries.append('brotlidec')
def do_custom_build(self, env):
# We're using a system freetype
--
2.41.0
2.44.0

View File

@@ -1,18 +1,18 @@
From 5d12c697908d1103dc7fa2d915ad82d357975709 Mon Sep 17 00:00:00 2001
From 0aecbcfd5fd12c79f1f71998be9f86fc4108d91d 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(-)
lib/matplotlib/mlab.py | 39 +++++++++++++++++++++++++++++++++++----
1 file changed, 35 insertions(+), 4 deletions(-)
diff --git a/lib/matplotlib/mlab.py b/lib/matplotlib/mlab.py
index 059cf0f162..943eb18e6f 100644
index e1f08c0da5..5c0d56c74d 100644
--- a/lib/matplotlib/mlab.py
+++ b/lib/matplotlib/mlab.py
@@ -52,6 +52,7 @@ Spectral functions
@@ -49,6 +49,7 @@ Spectral functions
import functools
from numbers import Number
@@ -20,17 +20,65 @@ index 059cf0f162..943eb18e6f 100644
import numpy as np
@@ -252,7 +253,9 @@ def stride_windows(x, n, noverlap=None, axis=0):
@@ -210,6 +211,30 @@ def detrend_linear(y):
return y - (b*x + a)
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(
+def _stride_windows(x, n, noverlap=0):
+ if noverlap >= n:
+ raise ValueError('noverlap must be less than n')
+ if n < 1:
+ raise ValueError('n cannot be less than 1')
+
+ x = np.asarray(x)
+
+ if n == 1 and noverlap == 0:
+ return x[np.newaxis]
+ if n > x.size:
+ raise ValueError('n cannot be greater than the length of x')
+
+ # np.lib.stride_tricks.as_strided easily leads to memory corruption for
+ # non integer shape and strides, i.e. noverlap or n. See #3845.
+ noverlap = int(noverlap)
+ n = int(n)
+
+ step = n - noverlap
+ shape = (n, (x.shape[-1]-noverlap)//step)
+ strides = (x.strides[0], step*x.strides[0])
+ return np.lib.stride_tricks.as_strided(x, shape=shape, strides=strides)
+
+
def _spectral_helper(x, y=None, NFFT=None, Fs=None, detrend_func=None,
window=None, noverlap=None, pad_to=None,
sides=None, scale_by_freq=None, mode=None):
@@ -304,8 +329,11 @@ def _spectral_helper(x, y=None, NFFT=None, Fs=None, detrend_func=None,
raise ValueError(
"The window length must match the data's first dimension")
- result = np.lib.stride_tricks.sliding_window_view(
- x, NFFT, axis=0)[::NFFT - noverlap].T
+ if sys.maxsize > 2**32: # NumPy version on 32-bit OOMs.
+ result = np.lib.stride_tricks.sliding_window_view(
+ x, NFFT, axis=0)[::NFFT - noverlap].T
+ else:
+ result = _stride_windows(x, NFFT, noverlap=noverlap)
result = detrend(result, detrend_func, axis=0)
result = result * window.reshape((-1, 1))
result = np.fft.fft(result, n=pad_to, axis=0)[:numFreqs, :]
@@ -313,8 +341,11 @@ def _spectral_helper(x, y=None, NFFT=None, Fs=None, detrend_func=None,
if not same_data:
# if same_data is False, mode must be 'psd'
- resultY = np.lib.stride_tricks.sliding_window_view(
- y, NFFT, axis=0)[::NFFT - noverlap].T
+ if sys.maxsize > 2**32: # NumPy version on 32-bit OOMs.
+ resultY = np.lib.stride_tricks.sliding_window_view(
+ y, NFFT, axis=0)[::NFFT - noverlap].T
+ else:
+ resultY = _stride_windows(y, NFFT, noverlap=noverlap)
resultY = detrend(resultY, detrend_func, axis=0)
resultY = resultY * window.reshape((-1, 1))
resultY = np.fft.fft(resultY, n=pad_to, axis=0)[:numFreqs, :]
--
2.41.0
2.44.0

View File

@@ -1,3 +1,14 @@
* Tue Dec 17 2024 Kaleb S. KEITHLEY <kkeithle[at]redhat.com> - 3.9.1-0
- bootstrap epel10
- temporarily (or is it?) remove qt5 sub-package. Will epel10 get qt5?
- temporarily remove test w/ xvfb-run until I can figure out the
proper replacement.
- inkscape seems to not be needed. Or am I wrong about that? It builds
without it as a BR. Will add it back when inkscape is built for EPEL10.
* Fri Aug 11 2023 Tom Callaway <spot@fedoraproject.org> - 3.7.2-2
- rebuild for new qhull
* Mon Aug 09 2021 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 3.4.2-5
- Update test images for FreeType 2.11.0
- Backport patch for NumPy 1.21

View File

@@ -1,8 +0,0 @@
[libs]
system_freetype = True
system_qhull = True
[packages]
tests = True
toolkits = True
toolkits_tests = True

View File

@@ -26,26 +26,27 @@
% 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.7.2
%global mpl_images_version 3.9.1
# The version of FreeType in this Fedora branch.
%global ftver 2.13.1
Name: python-matplotlib
Version: 3.7.4
%global Version 3.7.4
Release: %autorelease
Version: 3.9.1
%global Version %{version_no_tilde %{quote:%nil}}
Release: 6%{?dist}
Summary: Python 2D plotting library
# qt_editor backend is MIT
# ResizeObserver at end of lib/matplotlib/backends/web_backend/js/mpl.js is CC0
License: PSF-2.0 and MIT and CC0-1.0
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
@@ -53,7 +54,8 @@ Source1: mplsetup.cfg
Source1000: https://github.com/QuLogic/mpl-images/archive/v%{mpl_images_version}-with-freetype-%{ftver}/matplotlib-%{mpl_images_version}-with-freetype-%{ftver}.tar.gz
# Search in /etc/matplotlibrc:
Patch1001: 0001-matplotlibrc-path-search-fix.patch
Patch1002: 0002-Don-t-require-oldest-supported-numpy.patch
# We don't need to use NumPy 1.25.
Patch1002: 0002-Unpin-NumPy-build-requirement.patch
# Increase tolerances for new FreeType everywhere:
Patch1003: 0003-Set-FreeType-version-to-%{ftver}-and-update-tolerances.patch
@@ -66,7 +68,7 @@ BuildRequires: glibc-langpack-en
BuildRequires: freetype-devel
BuildRequires: libpng-devel
BuildRequires: qhull-devel
BuildRequires: xorg-x11-server-Xvfb
BuildRequires: wlheadless-run
BuildRequires: zlib-devel
BuildRequires: ghostscript
@@ -74,7 +76,7 @@ BuildRequires: ghostscript
%if 0%{?fedora} || (0%{?rhel} && 0%{?rhel} < 8)
BuildRequires: ImageMagick
%endif
BuildRequires: inkscape
## BuildRequires: inkscape
BuildRequires: font(dejavusans)
BuildRequires: font(notosanscjkjp)
@@ -201,22 +203,11 @@ Matplotlib tries to make easy things easy and hard things possible.
You can generate plots, histograms, power spectra, bar charts,
errorcharts, scatterplots, etc, with just a few lines of code.
%package -n python3-matplotlib-qt5
Summary: Qt5 backend for python3-matplotlib
BuildRequires: python3dist(cairocffi)
BuildRequires: python3dist(pyqt5)
Requires: python3-matplotlib%{?_isa} = %{version}-%{release}
Requires: python3dist(cairocffi)
Requires: python3dist(pyqt5)
Obsoletes: python3-matplotlib-qt4 < 3.5.0-0
%description -n python3-matplotlib-qt5
%{summary}
%package -n python3-matplotlib-qt6
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)
@@ -278,6 +269,7 @@ BuildRequires: make
BuildRequires: python3dist(sphinx)
BuildRequires: tex(latex)
BuildRequires: tex-preview
BuildRequires: ipython
%endif
Requires: python3-matplotlib%{?_isa} = %{version}-%{release}
@@ -300,22 +292,19 @@ 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 -r
%pyproject_buildrequires -w %build_backend_args
%build
%set_build_flags
export http_proxy=http://127.0.0.1/
MPLCONFIGDIR=$PWD %pyproject_wheel
MPLCONFIGDIR=$PWD %pyproject_wheel %build_backend_args
%if %{with html}
# Need to make built matplotlib libs available for the sphinx extensions:
MPLCONFIGDIR=$PWD \
@@ -324,7 +313,7 @@ PYTHONPATH="%{pyproject_site_lib}" \
%endif
# Ensure all example files are non-executable so that the -doc
# package doesn't drag in dependencies
find examples -name '*.py' -exec chmod a-x '{}' \;
find galleries -name '*.py' -exec chmod a-x '{}' \;
%install
@@ -333,7 +322,6 @@ 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
@@ -357,22 +345,20 @@ mktexfmt latex.fmt
mktexfmt lualatex.fmt
mktexfmt pdflatex.fmt
mktexfmt xelatex.fmt
# Also prime the font cache.
%{py3_test_envvars} %{python3} -c 'import matplotlib.font_manager'
export http_proxy=http://127.0.0.1/
# 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 '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
# 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
%endif
%files -n python3-matplotlib-data
%{_datadir}/matplotlib/mpl-data/
@@ -386,7 +372,7 @@ MPLCONFIGDIR=$PWD \
%endif
%files -n python3-matplotlib-doc
%doc examples
%doc galleries/examples
%if %{with html}
%doc doc/build/html/*
%endif
@@ -395,7 +381,6 @@ MPLCONFIGDIR=$PWD \
%license LICENSE/
%doc README.md
%{python3_sitearch}/matplotlib-*.dist-info/
%{python3_sitearch}/matplotlib-*-nspkg.pth
%{python3_sitearch}/matplotlib/
%exclude %{python3_sitearch}/matplotlib/tests/baseline_images/*
%{python3_sitearch}/mpl_toolkits/
@@ -415,9 +400,6 @@ MPLCONFIGDIR=$PWD \
%{python3_sitearch}/matplotlib/tests/baseline_images/
%{python3_sitearch}/mpl_toolkits/*/tests/baseline_images/
%files -n python3-matplotlib-qt5
%pycached %{python3_sitearch}/matplotlib/backends/backend_qt5*.py
# This is handled by backend_qt*.py (no number), so the package exists only for
# the dependencies.
%files -n python3-matplotlib-qt6

View File

@@ -1,2 +1,2 @@
SHA512 (matplotlib-3.7.4.tar.gz) = 65c17babc7535aa6bdf9ab3db23681411e66dfba840065ae30c56a212ba472da0d189ddb50f7000adb44e579f04d33f1bf572a0a3c50beea6241e138c17a7669
SHA512 (matplotlib-3.7.2-with-freetype-2.13.1.tar.gz) = 1a8bdaa0b6b3ec3d310aff96c04c99d9350534992592d8d3c99530ef63aa8a4289c5195a791139b9d69b8472eb010ee3d8a248fa8e8dc3941403387321db6e14
SHA512 (matplotlib-3.9.1.tar.gz) = a1d48c42a5f4f04b57e34d25df842917e6380b8d6b6d1018c9b630cbbea4619b1d75729a218a6f52b63d4a61c2204bb26ad8f741566f84e41ca73190e419f672
SHA512 (matplotlib-3.9.1-with-freetype-2.13.1.tar.gz) = 7d7d04d410265e6f3adc95bc103f12432f5c3c2b3788ab11f2326054f1cd116ff795bd2d2999cdb4da997df597bec00bbba61acea6de5eb9d56c686aa47a7bf7