Compare commits
58 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9ec656f711 | ||
|
|
4657ee6ac4 | ||
|
|
36bb5d7fa0 | ||
|
|
f2d972fa1d | ||
|
|
d0eaec2e00 | ||
|
|
492a599cee | ||
|
|
3560f7bf0d | ||
|
|
5d73432d40 | ||
|
|
b69289819e | ||
|
|
dabb8167f1 | ||
|
|
f02849f05b | ||
|
|
ed37137f1e | ||
|
|
4271371599 | ||
|
|
8b8c357ab9 | ||
|
|
b7a53bdd09 | ||
|
|
63d95ef5f2 | ||
|
|
db71fa5183 | ||
|
|
5211b69b49 | ||
|
|
ec553ec074 | ||
|
|
3d74b361b1 | ||
|
|
e7c8d98b41 | ||
|
|
51c7ba15fe | ||
|
|
aff8846c80 | ||
|
|
97d2c5437b | ||
|
|
1d44751f59 | ||
|
|
c26fa011b2 | ||
|
|
cb921b4252 | ||
|
|
65d146772c | ||
|
|
b5a125ff69 | ||
|
|
4836060bd0 | ||
|
|
1b16bcd2b0 | ||
|
|
b10c4c84d1 | ||
|
|
52ef239853 | ||
|
|
829c70b69a | ||
|
|
df0d40dcb0 | ||
|
|
acd2786cac | ||
|
|
e812a3aea3 | ||
|
|
6e57c9f80c | ||
|
|
a366353832 | ||
|
|
05ffcff315 | ||
|
|
bca414e4f1 | ||
|
|
13941a96df | ||
|
|
545cd052bc | ||
|
|
cec6c4b5b4 | ||
|
|
a567434c0d | ||
|
|
6053ff6f06 | ||
|
|
0b92076142 | ||
|
|
c601b679e9 | ||
|
|
2b3a520dad | ||
|
|
0744231c69 | ||
|
|
a5632a4923 | ||
|
|
5f242fa596 | ||
|
|
fbc57eefdb | ||
|
|
06a8e578fd | ||
|
|
c30bc8df54 | ||
|
|
8b94e4ad13 | ||
|
|
704b8e1dc2 | ||
|
|
36d9ebc96c |
42
.gitignore
vendored
42
.gitignore
vendored
@@ -80,3 +80,45 @@ matplotlib-1.0.0-without-gpc.tar.gz
|
|||||||
/matplotlib-3.5.3.tar.gz
|
/matplotlib-3.5.3.tar.gz
|
||||||
/matplotlib-3.5.3-with-freetype-2.11.0.tar.gz
|
/matplotlib-3.5.3-with-freetype-2.11.0.tar.gz
|
||||||
/matplotlib-3.5.3-with-freetype-2.12.1.tar.gz
|
/matplotlib-3.5.3-with-freetype-2.12.1.tar.gz
|
||||||
|
/matplotlib-3.6.0rc1.tar.gz
|
||||||
|
/matplotlib-3.6.0rc1-with-freetype-2.12.1.tar.gz
|
||||||
|
/matplotlib-3.6.0rc2.tar.gz
|
||||||
|
/matplotlib-3.6.0rc2-with-freetype-2.12.1.tar.gz
|
||||||
|
/matplotlib-3.6.0.tar.gz
|
||||||
|
/matplotlib-3.6.0-with-freetype-2.12.1.tar.gz
|
||||||
|
/matplotlib-3.6.1.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
|
||||||
|
/matplotlib-3.7.0rc1.tar.gz
|
||||||
|
/matplotlib-3.7.0rc1-with-freetype-2.12.1.tar.gz
|
||||||
|
/matplotlib-3.7.0.tar.gz
|
||||||
|
/matplotlib-3.7.0-with-freetype-2.12.1.tar.gz
|
||||||
|
/matplotlib-3.7.1.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.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
|
||||||
|
/matplotlib-3.9.3.tar.gz
|
||||||
|
/matplotlib-3.9.3-with-freetype-2.13.1.tar.gz
|
||||||
|
/matplotlib-3.9.4.tar.gz
|
||||||
|
/matplotlib-3.10.0.tar.gz
|
||||||
|
/matplotlib-3.10.0-with-freetype-2.13.1.tar.gz
|
||||||
|
/matplotlib-3.10.3.tar.gz
|
||||||
|
/matplotlib-3.10.3-with-freetype-2.13.1.tar.gz
|
||||||
|
/matplotlib-3.10.5.tar.gz
|
||||||
|
/matplotlib-3.10.6.tar.gz
|
||||||
|
/matplotlib-3.10.8.tar.gz
|
||||||
|
|||||||
@@ -1,18 +1,19 @@
|
|||||||
From a2d7ef7b895d3b0bc9654d31c6cb40935eec0ce9 Mon Sep 17 00:00:00 2001
|
From 3c225cf3905d734a27df25e3a53a904a55f2904e Mon Sep 17 00:00:00 2001
|
||||||
From: Elliott Sales de Andrade <quantum.analyst@gmail.com>
|
From: Sandro Tosi <morph@debian.org>
|
||||||
Date: Wed, 27 Sep 2017 19:35:59 -0400
|
Date: Wed, 27 Sep 2017 19:35:59 -0400
|
||||||
Subject: [PATCH 1/3] matplotlibrc path search fix
|
Subject: [PATCH 1/5] 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>
|
||||||
---
|
---
|
||||||
lib/matplotlib/__init__.py | 5 ++++-
|
lib/matplotlib/__init__.py | 5 ++++-
|
||||||
1 file changed, 4 insertions(+), 1 deletion(-)
|
lib/matplotlib/backend_tools.py | 16 ++++++++--------
|
||||||
|
2 files changed, 12 insertions(+), 9 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 b8fd4f9860..23841c8377 100644
|
index 2786f9b7b9..64ba02afd6 100644
|
||||||
--- a/lib/matplotlib/__init__.py
|
--- a/lib/matplotlib/__init__.py
|
||||||
+++ b/lib/matplotlib/__init__.py
|
+++ b/lib/matplotlib/__init__.py
|
||||||
@@ -526,7 +526,8 @@ def get_cachedir():
|
@@ -593,7 +593,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 +23,7 @@ index b8fd4f9860..23841c8377 100644
|
|||||||
|
|
||||||
|
|
||||||
def matplotlib_fname():
|
def matplotlib_fname():
|
||||||
@@ -546,6 +547,7 @@ def matplotlib_fname():
|
@@ -613,6 +614,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 +31,7 @@ index b8fd4f9860..23841c8377 100644
|
|||||||
- Lastly, it looks in ``$MATPLOTLIBDATA/matplotlibrc``, which should always
|
- Lastly, it looks in ``$MATPLOTLIBDATA/matplotlibrc``, which should always
|
||||||
exist.
|
exist.
|
||||||
"""
|
"""
|
||||||
@@ -564,6 +566,7 @@ def matplotlib_fname():
|
@@ -631,6 +633,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')
|
||||||
@@ -38,6 +39,81 @@ index b8fd4f9860..23841c8377 100644
|
|||||||
yield os.path.join(get_data_path(), 'matplotlibrc')
|
yield os.path.join(get_data_path(), 'matplotlibrc')
|
||||||
|
|
||||||
for fname in gen_candidates():
|
for fname in gen_candidates():
|
||||||
|
diff --git a/lib/matplotlib/backend_tools.py b/lib/matplotlib/backend_tools.py
|
||||||
|
index 87ed794022..9d80539114 100644
|
||||||
|
--- a/lib/matplotlib/backend_tools.py
|
||||||
|
+++ b/lib/matplotlib/backend_tools.py
|
||||||
|
@@ -596,7 +596,7 @@ class ToolHome(ViewsPositionsBase):
|
||||||
|
"""Restore the original view limits."""
|
||||||
|
|
||||||
|
description = 'Reset original view'
|
||||||
|
- image = 'mpl-data/images/home'
|
||||||
|
+ image = '/usr/share/matplotlib/mpl-data/images/home'
|
||||||
|
default_keymap = property(lambda self: mpl.rcParams['keymap.home'])
|
||||||
|
_on_trigger = 'home'
|
||||||
|
|
||||||
|
@@ -605,7 +605,7 @@ class ToolBack(ViewsPositionsBase):
|
||||||
|
"""Move back up the view limits stack."""
|
||||||
|
|
||||||
|
description = 'Back to previous view'
|
||||||
|
- image = 'mpl-data/images/back'
|
||||||
|
+ image = '/usr/share/matplotlib/mpl-data/images/back'
|
||||||
|
default_keymap = property(lambda self: mpl.rcParams['keymap.back'])
|
||||||
|
_on_trigger = 'back'
|
||||||
|
|
||||||
|
@@ -614,7 +614,7 @@ class ToolForward(ViewsPositionsBase):
|
||||||
|
"""Move forward in the view lim stack."""
|
||||||
|
|
||||||
|
description = 'Forward to next view'
|
||||||
|
- image = 'mpl-data/images/forward'
|
||||||
|
+ image = '/usr/share/matplotlib/mpl-data/images/forward'
|
||||||
|
default_keymap = property(lambda self: mpl.rcParams['keymap.forward'])
|
||||||
|
_on_trigger = 'forward'
|
||||||
|
|
||||||
|
@@ -623,14 +623,14 @@ class ConfigureSubplotsBase(ToolBase):
|
||||||
|
"""Base tool for the configuration of subplots."""
|
||||||
|
|
||||||
|
description = 'Configure subplots'
|
||||||
|
- image = 'mpl-data/images/subplots'
|
||||||
|
+ image = '/usr/share/matplotlib/mpl-data/images/subplots'
|
||||||
|
|
||||||
|
|
||||||
|
class SaveFigureBase(ToolBase):
|
||||||
|
"""Base tool for figure saving."""
|
||||||
|
|
||||||
|
description = 'Save the figure'
|
||||||
|
- image = 'mpl-data/images/filesave'
|
||||||
|
+ image = '/usr/share/matplotlib/mpl-data/images/filesave'
|
||||||
|
default_keymap = property(lambda self: mpl.rcParams['keymap.save'])
|
||||||
|
|
||||||
|
|
||||||
|
@@ -705,7 +705,7 @@ class ToolZoom(ZoomPanBase):
|
||||||
|
"""A Tool for zooming using a rectangle selector."""
|
||||||
|
|
||||||
|
description = 'Zoom to rectangle'
|
||||||
|
- image = 'mpl-data/images/zoom_to_rect'
|
||||||
|
+ image = '/usr/share/matplotlib/mpl-data/images/zoom_to_rect'
|
||||||
|
default_keymap = property(lambda self: mpl.rcParams['keymap.zoom'])
|
||||||
|
cursor = cursors.SELECT_REGION
|
||||||
|
radio_group = 'default'
|
||||||
|
@@ -827,7 +827,7 @@ class ToolPan(ZoomPanBase):
|
||||||
|
|
||||||
|
default_keymap = property(lambda self: mpl.rcParams['keymap.pan'])
|
||||||
|
description = 'Pan axes with left mouse, zoom with right'
|
||||||
|
- image = 'mpl-data/images/move'
|
||||||
|
+ image = '/usr/share/matplotlib/mpl-data/images/move'
|
||||||
|
cursor = cursors.MOVE
|
||||||
|
radio_group = 'default'
|
||||||
|
|
||||||
|
@@ -891,7 +891,7 @@ class ToolPan(ZoomPanBase):
|
||||||
|
class ToolHelpBase(ToolBase):
|
||||||
|
description = 'Print tool list, shortcuts and description'
|
||||||
|
default_keymap = property(lambda self: mpl.rcParams['keymap.help'])
|
||||||
|
- image = 'mpl-data/images/help'
|
||||||
|
+ image = '/usr/share/matplotlib/mpl-data/images/help'
|
||||||
|
|
||||||
|
@staticmethod
|
||||||
|
def format_shortcut(key_sequence):
|
||||||
--
|
--
|
||||||
2.36.1
|
2.52.0
|
||||||
|
|
||||||
|
|||||||
@@ -1,172 +0,0 @@
|
|||||||
From 70e97e4ede29ccc16bad1d329d08b27d753a8f00 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 2/3] Set FreeType version to 2.12.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 ++--
|
|
||||||
lib/matplotlib/tests/test_constrainedlayout.py | 2 +-
|
|
||||||
lib/matplotlib/tests/test_mathtext.py | 7 +++++--
|
|
||||||
lib/matplotlib/tests/test_polar.py | 2 +-
|
|
||||||
lib/matplotlib/tests/test_tightlayout.py | 10 +++++-----
|
|
||||||
setupext.py | 15 +++++++++++++--
|
|
||||||
7 files changed, 28 insertions(+), 14 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/lib/matplotlib/__init__.py b/lib/matplotlib/__init__.py
|
|
||||||
index 23841c8377..f7f76cbae6 100644
|
|
||||||
--- a/lib/matplotlib/__init__.py
|
|
||||||
+++ b/lib/matplotlib/__init__.py
|
|
||||||
@@ -1203,7 +1203,7 @@ default_test_modules = [
|
|
||||||
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'
|
|
||||||
|
|
||||||
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 3bd3fecac3..f0b247a7bb 100644
|
|
||||||
--- a/lib/matplotlib/tests/test_axes.py
|
|
||||||
+++ b/lib/matplotlib/tests/test_axes.py
|
|
||||||
@@ -6732,7 +6732,7 @@ def test_normal_axes():
|
|
||||||
]
|
|
||||||
for nn, b in enumerate(bbaxis):
|
|
||||||
targetbb = mtransforms.Bbox.from_bounds(*target[nn])
|
|
||||||
- assert_array_almost_equal(b.bounds, targetbb.bounds, decimal=2)
|
|
||||||
+ assert_array_almost_equal(b.bounds, targetbb.bounds, decimal=0)
|
|
||||||
|
|
||||||
target = [
|
|
||||||
[150.0, 119.999, 930.0, 11.111],
|
|
||||||
@@ -6750,7 +6750,7 @@ def test_normal_axes():
|
|
||||||
|
|
||||||
target = [85.5138, 75.88888, 1021.11, 1017.11]
|
|
||||||
targetbb = mtransforms.Bbox.from_bounds(*target)
|
|
||||||
- assert_array_almost_equal(bbtb.bounds, targetbb.bounds, decimal=2)
|
|
||||||
+ assert_array_almost_equal(bbtb.bounds, targetbb.bounds, decimal=0)
|
|
||||||
|
|
||||||
# test that get_position roundtrips to get_window_extent
|
|
||||||
axbb = ax.get_position().transformed(fig.transFigure).bounds
|
|
||||||
diff --git a/lib/matplotlib/tests/test_constrainedlayout.py b/lib/matplotlib/tests/test_constrainedlayout.py
|
|
||||||
index 8fd3cc5a35..b1e0fa57cd 100644
|
|
||||||
--- a/lib/matplotlib/tests/test_constrainedlayout.py
|
|
||||||
+++ b/lib/matplotlib/tests/test_constrainedlayout.py
|
|
||||||
@@ -431,7 +431,7 @@ def test_hidden_axes():
|
|
||||||
extents1 = np.copy(axs[0, 0].get_position().extents)
|
|
||||||
|
|
||||||
np.testing.assert_allclose(
|
|
||||||
- extents1, [0.045552, 0.543288, 0.47819, 0.982638], rtol=1e-5)
|
|
||||||
+ extents1, [0.045552, 0.543288, 0.47819, 0.982638], rtol=1e-2)
|
|
||||||
|
|
||||||
|
|
||||||
def test_colorbar_align():
|
|
||||||
diff --git a/lib/matplotlib/tests/test_mathtext.py b/lib/matplotlib/tests/test_mathtext.py
|
|
||||||
index 6921a17980..ba0e2a3a6c 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
|
|
||||||
@@ -192,7 +193,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))
|
|
||||||
@@ -216,7 +218,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))
|
|
||||||
diff --git a/lib/matplotlib/tests/test_polar.py b/lib/matplotlib/tests/test_polar.py
|
|
||||||
index 85aece5fce..9fea856af4 100644
|
|
||||||
--- a/lib/matplotlib/tests/test_polar.py
|
|
||||||
+++ b/lib/matplotlib/tests/test_polar.py
|
|
||||||
@@ -314,7 +314,7 @@ def test_get_tightbbox_polar():
|
|
||||||
fig.canvas.draw()
|
|
||||||
bb = ax.get_tightbbox(fig.canvas.get_renderer())
|
|
||||||
assert_allclose(
|
|
||||||
- bb.extents, [107.7778, 29.2778, 539.7847, 450.7222], rtol=1e-03)
|
|
||||||
+ bb.extents, [107.7778, 29.2778, 539.7847, 450.7222], rtol=1)
|
|
||||||
|
|
||||||
|
|
||||||
@check_figures_equal(extensions=["png"])
|
|
||||||
diff --git a/lib/matplotlib/tests/test_tightlayout.py b/lib/matplotlib/tests/test_tightlayout.py
|
|
||||||
index e9b01b160d..beab853489 100644
|
|
||||||
--- a/lib/matplotlib/tests/test_tightlayout.py
|
|
||||||
+++ b/lib/matplotlib/tests/test_tightlayout.py
|
|
||||||
@@ -172,12 +172,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.
|
|
||||||
- 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),
|
|
||||||
ans[nn])
|
|
||||||
|
|
||||||
|
|
||||||
diff --git a/setupext.py b/setupext.py
|
|
||||||
index ae8c21599f..abd01d8813 100644
|
|
||||||
--- a/setupext.py
|
|
||||||
+++ b/setupext.py
|
|
||||||
@@ -167,14 +167,24 @@ _freetype_hashes = {
|
|
||||||
'955e17244e9b38adb0c98df66abb50467312e6bb70eac07e49ce6bd1a20e809a',
|
|
||||||
'2.10.1':
|
|
||||||
'3a60d391fd579440561bf0e7f31af2222bc610ad6ce4d9d7bd2165bca8669110',
|
|
||||||
+ '2.10.2':
|
|
||||||
+ 'e09aa914e4f7a5d723ac381420949c55c0b90b15744adce5d1406046022186ab',
|
|
||||||
+ '2.10.4':
|
|
||||||
+ '5eab795ebb23ac77001cfb68b7d4d50b5d6c7469247b0b01b2c953269f658dac',
|
|
||||||
+ '2.11.0':
|
|
||||||
+ '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 version. It
|
|
||||||
# must match the value in lib/matplotlib.__init__.py and also needs to be
|
|
||||||
# changed below in the embedded windows build script (grep for "REMINDER" in
|
|
||||||
# this file). Also update the cache path in `.circleci/config.yml`.
|
|
||||||
-TESTING_VERSION_OF_FREETYPE = '2.6.1'
|
|
||||||
+TESTING_VERSION_OF_FREETYPE = '2.12.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
|
|
||||||
@@ -593,6 +603,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.36.1
|
|
||||||
|
|
||||||
127
0002-Set-FreeType-version-to-2.13.1-and-update-tolerances.patch
Normal file
127
0002-Set-FreeType-version-to-2.13.1-and-update-tolerances.patch
Normal file
@@ -0,0 +1,127 @@
|
|||||||
|
From 7b4e2945933049429d00d6f3900d2cdf992c80df 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 2/5] Set FreeType version to 2.13.1 and update tolerances
|
||||||
|
|
||||||
|
Signed-off-by: Elliott Sales de Andrade <quantum.analyst@gmail.com>
|
||||||
|
---
|
||||||
|
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_ft2font.py | 6 +++---
|
||||||
|
lib/matplotlib/tests/test_legend.py | 4 ++--
|
||||||
|
lib/matplotlib/tests/test_polar.py | 2 +-
|
||||||
|
7 files changed, 11 insertions(+), 11 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/extern/meson.build b/extern/meson.build
|
||||||
|
index 5463183a90..c7233815af 100644
|
||||||
|
--- a/extern/meson.build
|
||||||
|
+++ b/extern/meson.build
|
||||||
|
@@ -13,7 +13,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 64ba02afd6..9fe5fb7abf 100644
|
||||||
|
--- a/lib/matplotlib/__init__.py
|
||||||
|
+++ b/lib/matplotlib/__init__.py
|
||||||
|
@@ -1364,7 +1364,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`.
|
||||||
|
- 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 159fc70282..b304186fc9 100644
|
||||||
|
--- a/lib/matplotlib/tests/test_axes.py
|
||||||
|
+++ b/lib/matplotlib/tests/test_axes.py
|
||||||
|
@@ -8084,7 +8084,7 @@ def test_normal_axes():
|
||||||
|
]
|
||||||
|
for nn, b in enumerate(bbaxis):
|
||||||
|
targetbb = mtransforms.Bbox.from_bounds(*target[nn])
|
||||||
|
- assert_array_almost_equal(b.bounds, targetbb.bounds, decimal=2)
|
||||||
|
+ assert_array_almost_equal(b.bounds, targetbb.bounds, decimal=0)
|
||||||
|
|
||||||
|
target = [
|
||||||
|
[150.0, 119.999, 930.0, 11.111],
|
||||||
|
@@ -8102,7 +8102,7 @@ def test_normal_axes():
|
||||||
|
|
||||||
|
target = [85.5138, 75.88888, 1021.11, 1017.11]
|
||||||
|
targetbb = mtransforms.Bbox.from_bounds(*target)
|
||||||
|
- assert_array_almost_equal(bbtb.bounds, targetbb.bounds, decimal=2)
|
||||||
|
+ assert_array_almost_equal(bbtb.bounds, targetbb.bounds, decimal=0)
|
||||||
|
|
||||||
|
# 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 e218a81cdc..839ad724e1 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_ft2font.py b/lib/matplotlib/tests/test_ft2font.py
|
||||||
|
index 6ba23bab34..0aee3222f1 100644
|
||||||
|
--- a/lib/matplotlib/tests/test_ft2font.py
|
||||||
|
+++ b/lib/matplotlib/tests/test_ft2font.py
|
||||||
|
@@ -706,10 +706,10 @@ def test_ft2font_get_sfnt_table(font_name, header):
|
||||||
|
|
||||||
|
@pytest.mark.parametrize('left, right, unscaled, unfitted, default', [
|
||||||
|
# These are all the same class.
|
||||||
|
- ('A', 'A', 57, 248, 256), ('A', 'À', 57, 248, 256), ('A', 'Á', 57, 248, 256),
|
||||||
|
- ('A', 'Â', 57, 248, 256), ('A', 'Ã', 57, 248, 256), ('A', 'Ä', 57, 248, 256),
|
||||||
|
+ ('A', 'A', 57, 247, 256), ('A', 'À', 57, 247, 256), ('A', 'Á', 57, 247, 256),
|
||||||
|
+ ('A', 'Â', 57, 247, 256), ('A', 'Ã', 57, 247, 256), ('A', 'Ä', 57, 247, 256),
|
||||||
|
# And a few other random ones.
|
||||||
|
- ('D', 'A', -36, -156, -128), ('T', '.', -243, -1056, -1024),
|
||||||
|
+ ('D', 'A', -36, -156, -128), ('T', '.', -243, -1055, -1024),
|
||||||
|
('X', 'C', -149, -647, -640), ('-', 'J', 114, 495, 512),
|
||||||
|
])
|
||||||
|
def test_ft2font_get_kerning(left, right, unscaled, unfitted, default):
|
||||||
|
diff --git a/lib/matplotlib/tests/test_legend.py b/lib/matplotlib/tests/test_legend.py
|
||||||
|
index eb3bfca7c2..c01be3aec0 100644
|
||||||
|
--- a/lib/matplotlib/tests/test_legend.py
|
||||||
|
+++ b/lib/matplotlib/tests/test_legend.py
|
||||||
|
@@ -520,9 +520,9 @@ def test_figure_legend_outside():
|
||||||
|
fig.draw_without_rendering()
|
||||||
|
|
||||||
|
assert_allclose(axs.get_window_extent().extents,
|
||||||
|
- axbb[nn])
|
||||||
|
+ axbb[nn], rtol=1)
|
||||||
|
assert_allclose(leg.get_window_extent().extents,
|
||||||
|
- legbb[nn])
|
||||||
|
+ legbb[nn], rtol=1)
|
||||||
|
|
||||||
|
|
||||||
|
@image_comparison(['legend_stackplot.png'],
|
||||||
|
diff --git a/lib/matplotlib/tests/test_polar.py b/lib/matplotlib/tests/test_polar.py
|
||||||
|
index 844ab8cf3a..826a8a0c3a 100644
|
||||||
|
--- a/lib/matplotlib/tests/test_polar.py
|
||||||
|
+++ b/lib/matplotlib/tests/test_polar.py
|
||||||
|
@@ -328,7 +328,7 @@ def test_get_tightbbox_polar():
|
||||||
|
fig.canvas.draw()
|
||||||
|
bb = ax.get_tightbbox(fig.canvas.get_renderer())
|
||||||
|
assert_allclose(
|
||||||
|
- bb.extents, [107.7778, 29.2778, 539.7847, 450.7222], rtol=1e-03)
|
||||||
|
+ bb.extents, [107.7778, 29.2778, 539.7847, 450.7222], rtol=1)
|
||||||
|
|
||||||
|
|
||||||
|
@check_figures_equal(extensions=["png"])
|
||||||
|
--
|
||||||
|
2.52.0
|
||||||
|
|
||||||
@@ -1,127 +0,0 @@
|
|||||||
From 5fcd96777ede1f29bc3f749d12152879a4d67fdf 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/3] 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_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_streamplot.py | 3 ++-
|
|
||||||
6 files changed, 17 insertions(+), 8 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/lib/matplotlib/tests/test_axes.py b/lib/matplotlib/tests/test_axes.py
|
|
||||||
index f0b247a7bb..0a025bb6c7 100644
|
|
||||||
--- a/lib/matplotlib/tests/test_axes.py
|
|
||||||
+++ b/lib/matplotlib/tests/test_axes.py
|
|
||||||
@@ -918,7 +918,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
|
|
||||||
@@ -2127,7 +2128,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_colorbar.py b/lib/matplotlib/tests/test_colorbar.py
|
|
||||||
index f103fde7ee..920f392fc5 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
|
|
||||||
|
|
||||||
@@ -230,7 +232,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 f4854db502..c4f0a2a31d 100644
|
|
||||||
--- a/lib/matplotlib/tests/test_contour.py
|
|
||||||
+++ b/lib/matplotlib/tests/test_contour.py
|
|
||||||
@@ -345,7 +345,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 ae02a50727..15f843fd42 100644
|
|
||||||
--- a/lib/matplotlib/tests/test_image.py
|
|
||||||
+++ b/lib/matplotlib/tests/test_image.py
|
|
||||||
@@ -1329,8 +1329,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 f6917a134b..a7b5772e8c 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
|
|
||||||
|
|
||||||
@@ -162,7 +163,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_streamplot.py b/lib/matplotlib/tests/test_streamplot.py
|
|
||||||
index c8824feb06..879d43f28b 100644
|
|
||||||
--- a/lib/matplotlib/tests/test_streamplot.py
|
|
||||||
+++ b/lib/matplotlib/tests/test_streamplot.py
|
|
||||||
@@ -34,7 +34,8 @@ def test_startpoints():
|
|
||||||
plt.plot(start_x, start_y, 'ok')
|
|
||||||
|
|
||||||
|
|
||||||
-@image_comparison(['streamplot_colormap'], remove_text=True, style='mpl20')
|
|
||||||
+@image_comparison(['streamplot_colormap'], remove_text=True, style='mpl20',
|
|
||||||
+ tol=0.01)
|
|
||||||
def test_colormap():
|
|
||||||
X, Y, U, V = velocity_field()
|
|
||||||
plt.streamplot(X, Y, U, V, color=U, density=0.6, linewidth=2,
|
|
||||||
--
|
|
||||||
2.36.1
|
|
||||||
|
|
||||||
38
0003-Unpin-meson-python-build-requirement.patch
Normal file
38
0003-Unpin-meson-python-build-requirement.patch
Normal file
@@ -0,0 +1,38 @@
|
|||||||
|
From a05766154a8aa81691f3318b706d286bb87fb1c6 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Elliott Sales de Andrade <quantum.analyst@gmail.com>
|
||||||
|
Date: Fri, 13 Dec 2024 02:03:33 -0500
|
||||||
|
Subject: [PATCH 3/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 <quantum.analyst@gmail.com>
|
||||||
|
---
|
||||||
|
pyproject.toml | 4 ++--
|
||||||
|
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/pyproject.toml b/pyproject.toml
|
||||||
|
index 23c441b52c..f762c85d98 100644
|
||||||
|
--- a/pyproject.toml
|
||||||
|
+++ b/pyproject.toml
|
||||||
|
@@ -48,7 +48,7 @@ requires-python = ">=3.10"
|
||||||
|
[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",
|
||||||
|
"pybind11>=2.13.2,!=2.13.3",
|
||||||
|
"setuptools_scm>=7",
|
||||||
|
# Not required by us but setuptools_scm without a version, cso _if_
|
||||||
|
@@ -72,7 +72,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.13.2,!=2.13.3",
|
||||||
|
"setuptools_scm>=7",
|
||||||
|
]
|
||||||
|
--
|
||||||
|
2.52.0
|
||||||
|
|
||||||
@@ -0,0 +1,84 @@
|
|||||||
|
From 9522bbb8e713e167581e705dc4f8c4364b05da2d 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/5] Use old stride_windows implementation on 32-bit x86
|
||||||
|
|
||||||
|
Signed-off-by: Elliott Sales de Andrade <quantum.analyst@gmail.com>
|
||||||
|
---
|
||||||
|
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 8326ac186e..bdaa34b734 100644
|
||||||
|
--- a/lib/matplotlib/mlab.py
|
||||||
|
+++ b/lib/matplotlib/mlab.py
|
||||||
|
@@ -49,6 +49,7 @@ Spectral functions
|
||||||
|
|
||||||
|
import functools
|
||||||
|
from numbers import Number
|
||||||
|
+import sys
|
||||||
|
|
||||||
|
import numpy as np
|
||||||
|
|
||||||
|
@@ -210,6 +211,30 @@ def detrend_linear(y):
|
||||||
|
return y - (b*x + a)
|
||||||
|
|
||||||
|
|
||||||
|
+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.52.0
|
||||||
|
|
||||||
@@ -0,0 +1,32 @@
|
|||||||
|
From 5944097c27a6b65168a0287daeb9f7f9b8f9f7f3 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Elliott Sales de Andrade <quantum.analyst@gmail.com>
|
||||||
|
Date: Tue, 12 Nov 2024 01:05:25 -0500
|
||||||
|
Subject: [PATCH 5/5] Partially revert "TST: Fix minor issues in interactive
|
||||||
|
backend test (#28838)"
|
||||||
|
|
||||||
|
This reverts commit 7c7f94c5f71e99f148255e3bb570fec25c8fe754.
|
||||||
|
|
||||||
|
Signed-off-by: Elliott Sales de Andrade <quantum.analyst@gmail.com>
|
||||||
|
---
|
||||||
|
lib/matplotlib/tests/test_backends_interactive.py | 5 ++++-
|
||||||
|
1 file changed, 4 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/lib/matplotlib/tests/test_backends_interactive.py b/lib/matplotlib/tests/test_backends_interactive.py
|
||||||
|
index 4e3c1bbc2b..cb8c458d0d 100644
|
||||||
|
--- a/lib/matplotlib/tests/test_backends_interactive.py
|
||||||
|
+++ b/lib/matplotlib/tests/test_backends_interactive.py
|
||||||
|
@@ -232,7 +232,10 @@ def _test_interactive_impl():
|
||||||
|
result_after = io.BytesIO()
|
||||||
|
fig.savefig(result_after, format='png')
|
||||||
|
|
||||||
|
- assert result.getvalue() == result_after.getvalue()
|
||||||
|
+ if 'qt' not in backend and 'wx' not in backend and 'gtk4' not in backend:
|
||||||
|
+ # FIXME: This should be enabled everywhere once Qt5 is fixed on macOS
|
||||||
|
+ # to not resize incorrectly.
|
||||||
|
+ assert result.getvalue() == result_after.getvalue()
|
||||||
|
|
||||||
|
|
||||||
|
@pytest.mark.parametrize("env", _get_testable_interactive_backends())
|
||||||
|
--
|
||||||
|
2.52.0
|
||||||
|
|
||||||
38
22979.patch
38
22979.patch
@@ -1,38 +0,0 @@
|
|||||||
From dc5b6e87b6f4e1817720ea5aea1110231aab5667 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Elliott Sales de Andrade <quantum.analyst@gmail.com>
|
|
||||||
Date: Wed, 4 May 2022 20:41:01 -0400
|
|
||||||
Subject: [PATCH] Skip additional backend tests on import error
|
|
||||||
|
|
||||||
All the Qt tests in this file already do this, and the remaining one
|
|
||||||
fails if running headless.
|
|
||||||
---
|
|
||||||
lib/matplotlib/tests/test_backend_gtk3.py | 2 +-
|
|
||||||
lib/matplotlib/tests/test_backend_qt.py | 2 +-
|
|
||||||
2 files changed, 2 insertions(+), 2 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/lib/matplotlib/tests/test_backend_gtk3.py b/lib/matplotlib/tests/test_backend_gtk3.py
|
|
||||||
index 5442930d117f..937ddef5a13f 100644
|
|
||||||
--- a/lib/matplotlib/tests/test_backend_gtk3.py
|
|
||||||
+++ b/lib/matplotlib/tests/test_backend_gtk3.py
|
|
||||||
@@ -6,7 +6,7 @@
|
|
||||||
pytest.importorskip("matplotlib.backends.backend_gtk3agg")
|
|
||||||
|
|
||||||
|
|
||||||
-@pytest.mark.backend("gtk3agg")
|
|
||||||
+@pytest.mark.backend("gtk3agg", skip_on_importerror=True)
|
|
||||||
def test_correct_key():
|
|
||||||
pytest.xfail("test_widget_send_event is not triggering key_press_event")
|
|
||||||
|
|
||||||
diff --git a/lib/matplotlib/tests/test_backend_qt.py b/lib/matplotlib/tests/test_backend_qt.py
|
|
||||||
index eee4e56536ec..61abf58ac84e 100644
|
|
||||||
--- a/lib/matplotlib/tests/test_backend_qt.py
|
|
||||||
+++ b/lib/matplotlib/tests/test_backend_qt.py
|
|
||||||
@@ -193,7 +193,7 @@ def test_other_signal_before_sigint(target, kwargs):
|
|
||||||
plt.figure()
|
|
||||||
|
|
||||||
|
|
||||||
-@pytest.mark.backend('Qt5Agg')
|
|
||||||
+@pytest.mark.backend('Qt5Agg', skip_on_importerror=True)
|
|
||||||
def test_fig_sigint_override(qt_core):
|
|
||||||
from matplotlib.backends.backend_qt5 import _BackendQT5
|
|
||||||
# Create a figure
|
|
||||||
@@ -1,3 +1,6 @@
|
|||||||
|
* 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
|
* Mon Aug 09 2021 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 3.4.2-5
|
||||||
- Update test images for FreeType 2.11.0
|
- Update test images for FreeType 2.11.0
|
||||||
- Backport patch for NumPy 1.21
|
- Backport patch for NumPy 1.21
|
||||||
|
|||||||
@@ -1,8 +0,0 @@
|
|||||||
[libs]
|
|
||||||
system_freetype = True
|
|
||||||
system_qhull = True
|
|
||||||
|
|
||||||
[packages]
|
|
||||||
tests = True
|
|
||||||
toolkits = True
|
|
||||||
toolkits_tests = True
|
|
||||||
@@ -10,8 +10,8 @@
|
|||||||
%bcond_without wx
|
%bcond_without wx
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
# the default backend; one of GTK3Agg GTK3Cairo MacOSX Qt4Agg Qt5Agg TkAgg
|
# The default backend; one of GTK3Agg GTK3Cairo GTK4Agg GTK4Cairo MacOSX QtAgg
|
||||||
# WXAgg Agg Cairo PS PDF SVG
|
# TkAgg WXAgg Agg Cairo PS PDF SVG
|
||||||
%global backend TkAgg
|
%global backend TkAgg
|
||||||
|
|
||||||
%if "%{backend}" == "TkAgg"
|
%if "%{backend}" == "TkAgg"
|
||||||
@@ -26,26 +26,27 @@
|
|||||||
% endif
|
% endif
|
||||||
%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
|
# Use the same directory of the main package for subpackage licence and docs
|
||||||
%global _docdir_fmt %{name}
|
%global _docdir_fmt %{name}
|
||||||
|
|
||||||
# Updated test images for new FreeType.
|
# Updated test images for new FreeType.
|
||||||
%global mpl_images_version 3.5.3
|
%global mpl_images_version 3.10.3
|
||||||
|
|
||||||
# The version of FreeType in this Fedora branch.
|
# The version of FreeType in this Fedora branch.
|
||||||
%global ftver 2.12.1
|
%global ftver 2.13.1
|
||||||
|
|
||||||
Name: python-matplotlib
|
Name: python-matplotlib
|
||||||
Version: 3.5.3
|
Version: 3.10.8
|
||||||
%global Version 3.5.3
|
%global Version %{version_no_tilde %{quote:%nil}}
|
||||||
Release: %autorelease
|
Release: %autorelease
|
||||||
Summary: Python 2D plotting library
|
Summary: Python 2D plotting library
|
||||||
# qt_editor backend is MIT
|
# qt_editor backend is MIT
|
||||||
# ResizeObserver at end of lib/matplotlib/backends/web_backend/js/mpl.js is Public Domain
|
# ResizeObserver at end of lib/matplotlib/backends/web_backend/js/mpl.js is CC0
|
||||||
License: Python and MIT and Public Domain
|
License: PSF-2.0 AND MIT AND CC0-1.0
|
||||||
URL: http://matplotlib.org
|
URL: https://matplotlib.org
|
||||||
Source0: https://github.com/matplotlib/matplotlib/archive/v%{Version}/matplotlib-%{Version}.tar.gz
|
Source0: %pypi_source matplotlib %{Version}
|
||||||
Source1: mplsetup.cfg
|
|
||||||
|
|
||||||
# Fedora-specific patches; see:
|
# Fedora-specific patches; see:
|
||||||
# https://github.com/fedora-python/matplotlib/tree/fedora-patches
|
# https://github.com/fedora-python/matplotlib/tree/fedora-patches
|
||||||
@@ -55,7 +56,14 @@ Source1000: https://github.com/QuLogic/mpl-images/archive/v%{mpl_images_vers
|
|||||||
Patch1001: 0001-matplotlibrc-path-search-fix.patch
|
Patch1001: 0001-matplotlibrc-path-search-fix.patch
|
||||||
# Increase tolerances for new FreeType everywhere:
|
# Increase tolerances for new FreeType everywhere:
|
||||||
Patch1002: 0002-Set-FreeType-version-to-%{ftver}-and-update-tolerances.patch
|
Patch1002: 0002-Set-FreeType-version-to-%{ftver}-and-update-tolerances.patch
|
||||||
Patch1003: 0003-Increase-a-few-test-tolerances-on-some-arches.patch
|
# We don't need to use older meson-python.
|
||||||
|
Patch1003: 0003-Unpin-meson-python-build-requirement.patch
|
||||||
|
|
||||||
|
# https://github.com/matplotlib/matplotlib/pull/21190#issuecomment-1223271888
|
||||||
|
Patch0001: 0004-Use-old-stride_windows-implementation-on-32-bit-x86.patch
|
||||||
|
|
||||||
|
# Temporary fix for some tests.
|
||||||
|
Patch0002: 0005-Partially-revert-TST-Fix-minor-issues-in-interactive.patch
|
||||||
|
|
||||||
BuildRequires: gcc
|
BuildRequires: gcc
|
||||||
BuildRequires: gcc-c++
|
BuildRequires: gcc-c++
|
||||||
@@ -63,18 +71,25 @@ BuildRequires: glibc-langpack-en
|
|||||||
BuildRequires: freetype-devel
|
BuildRequires: freetype-devel
|
||||||
BuildRequires: libpng-devel
|
BuildRequires: libpng-devel
|
||||||
BuildRequires: qhull-devel
|
BuildRequires: qhull-devel
|
||||||
BuildRequires: xorg-x11-server-Xvfb
|
%ifnarch %{ix86}
|
||||||
|
BuildRequires: xwayland-run
|
||||||
|
%endif
|
||||||
BuildRequires: zlib-devel
|
BuildRequires: zlib-devel
|
||||||
|
|
||||||
|
%ifnarch %{ix86}
|
||||||
BuildRequires: ghostscript
|
BuildRequires: ghostscript
|
||||||
# No ImageMagick for EL8/ELN/EL9
|
# No ImageMagick for EL8/ELN/EL9
|
||||||
%if 0%{?fedora} || (0%{?rhel} && 0%{?rhel} < 8)
|
%if 0%{?fedora} || (0%{?rhel} && 0%{?rhel} < 8)
|
||||||
BuildRequires: ImageMagick
|
BuildRequires: ImageMagick
|
||||||
%endif
|
%endif
|
||||||
%ifnarch s390x
|
|
||||||
BuildRequires: inkscape
|
BuildRequires: inkscape
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
BuildRequires: font(dejavusans)
|
||||||
|
BuildRequires: font(notosanscjkjp)
|
||||||
|
BuildRequires: font(wenquanyizenhei)
|
||||||
|
|
||||||
|
%ifnarch %{ix86}
|
||||||
BuildRequires: texlive-collection-basic
|
BuildRequires: texlive-collection-basic
|
||||||
BuildRequires: texlive-collection-fontsrecommended
|
BuildRequires: texlive-collection-fontsrecommended
|
||||||
BuildRequires: texlive-collection-latex
|
BuildRequires: texlive-collection-latex
|
||||||
@@ -86,39 +101,35 @@ BuildRequires: texlive-tex-bin
|
|||||||
BuildRequires: texlive-xetex-bin
|
BuildRequires: texlive-xetex-bin
|
||||||
# Search for documentclass and add the classes here.
|
# Search for documentclass and add the classes here.
|
||||||
BuildRequires: tex(article.cls)
|
BuildRequires: tex(article.cls)
|
||||||
BuildRequires: tex(minimal.cls)
|
|
||||||
# Search for inputenc and add any encodings used with it.
|
# Search for inputenc and add any encodings used with it.
|
||||||
BuildRequires: tex(utf8.def)
|
BuildRequires: tex(utf8.def)
|
||||||
BuildRequires: tex(utf8x.def)
|
BuildRequires: tex(utf8x.def)
|
||||||
# Found with: rg -Io 'usepackage(\[.+\])?\{.+\}' lib | rg -o '\{.+\}' | sort -u
|
# Found with: rg -Io 'usepackage(\[.+\])?\{.+\}' lib | rg -o '\{.+\}' | sort -u
|
||||||
# and then removing duplicates in one line, etc.
|
# and then removing duplicates in one line, etc.
|
||||||
BuildRequires: tex(avant.sty)
|
BuildRequires: tex(avant.sty)
|
||||||
BuildRequires: tex(bm.sty)
|
|
||||||
BuildRequires: tex(chancery.sty)
|
BuildRequires: tex(chancery.sty)
|
||||||
BuildRequires: tex(charter.sty)
|
BuildRequires: tex(charter.sty)
|
||||||
BuildRequires: tex(chemformula.sty)
|
BuildRequires: tex(chemformula.sty)
|
||||||
BuildRequires: tex(color.sty)
|
BuildRequires: tex(color.sty)
|
||||||
BuildRequires: tex(courier.sty)
|
BuildRequires: tex(courier.sty)
|
||||||
BuildRequires: tex(euler.sty)
|
|
||||||
BuildRequires: tex(fancyhdr.sty)
|
|
||||||
BuildRequires: tex(fontenc.sty)
|
BuildRequires: tex(fontenc.sty)
|
||||||
BuildRequires: tex(fontspec.sty)
|
BuildRequires: tex(fontspec.sty)
|
||||||
BuildRequires: tex(geometry.sty)
|
BuildRequires: tex(geometry.sty)
|
||||||
BuildRequires: tex(graphicx.sty)
|
BuildRequires: tex(graphicx.sty)
|
||||||
BuildRequires: tex(helvet.sty)
|
BuildRequires: tex(helvet.sty)
|
||||||
|
BuildRequires: tex(hyperref.sty)
|
||||||
BuildRequires: tex(import.sty)
|
BuildRequires: tex(import.sty)
|
||||||
BuildRequires: tex(inputenc.sty)
|
BuildRequires: tex(inputenc.sty)
|
||||||
|
BuildRequires: tex(lmodern.sty)
|
||||||
BuildRequires: tex(mathpazo.sty)
|
BuildRequires: tex(mathpazo.sty)
|
||||||
BuildRequires: tex(mathptmx.sty)
|
BuildRequires: tex(mathptmx.sty)
|
||||||
BuildRequires: tex(pgf.sty)
|
BuildRequires: tex(pgf.sty)
|
||||||
BuildRequires: tex(preview.sty)
|
|
||||||
BuildRequires: tex(psfrag.sty)
|
|
||||||
BuildRequires: tex(sfmath.sty)
|
BuildRequires: tex(sfmath.sty)
|
||||||
BuildRequires: tex(textcomp.sty)
|
BuildRequires: tex(textcomp.sty)
|
||||||
BuildRequires: tex(txfonts.sty)
|
BuildRequires: tex(txfonts.sty)
|
||||||
BuildRequires: tex(type1cm.sty)
|
BuildRequires: tex(type1cm.sty)
|
||||||
BuildRequires: tex(type1ec.sty)
|
BuildRequires: tex(type1ec.sty)
|
||||||
BuildRequires: tex(unicode-math.sty)
|
BuildRequires: tex(underscore.sty)
|
||||||
# See BakomaFonts._fontmap in lib/matplotlib/mathtext.py
|
# See BakomaFonts._fontmap in lib/matplotlib/mathtext.py
|
||||||
BuildRequires: tex(cmb10.tfm)
|
BuildRequires: tex(cmb10.tfm)
|
||||||
BuildRequires: tex(cmex10.tfm)
|
BuildRequires: tex(cmex10.tfm)
|
||||||
@@ -127,6 +138,7 @@ BuildRequires: tex(cmr10.tfm)
|
|||||||
BuildRequires: tex(cmss10.tfm)
|
BuildRequires: tex(cmss10.tfm)
|
||||||
BuildRequires: tex(cmsy10.tfm)
|
BuildRequires: tex(cmsy10.tfm)
|
||||||
BuildRequires: tex(cmtt10.tfm)
|
BuildRequires: tex(cmtt10.tfm)
|
||||||
|
%endif
|
||||||
|
|
||||||
%description
|
%description
|
||||||
Matplotlib is a Python 2D plotting library which produces publication
|
Matplotlib is a Python 2D plotting library which produces publication
|
||||||
@@ -153,9 +165,9 @@ Obsoletes: python-matplotlib-data < 3
|
|||||||
%if %{with bundled_fonts}
|
%if %{with bundled_fonts}
|
||||||
%package -n python3-matplotlib-data-fonts
|
%package -n python3-matplotlib-data-fonts
|
||||||
Summary: Fonts used by python-matplotlib
|
Summary: Fonts used by python-matplotlib
|
||||||
# STIX and Computer Modern is OFL
|
# Carlogo, STIX and Computer Modern is OFL
|
||||||
# DejaVu is Bitstream Vera and Public Domain
|
# DejaVu is Bitstream Vera and Public Domain
|
||||||
License: OFL and Bitstream Vera and Public Domain
|
License: OFL-1.1 AND Bitstream-Vera AND LicenseRef-Fedora-Public-Domain
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
Requires: python3-matplotlib-data = %{version}-%{release}
|
Requires: python3-matplotlib-data = %{version}-%{release}
|
||||||
Obsoletes: python-matplotlib-data-fonts < 3
|
Obsoletes: python-matplotlib-data-fonts < 3
|
||||||
@@ -167,22 +179,25 @@ Obsoletes: python-matplotlib-data-fonts < 3
|
|||||||
%package -n python3-matplotlib
|
%package -n python3-matplotlib
|
||||||
Summary: Python 2D plotting library
|
Summary: Python 2D plotting library
|
||||||
BuildRequires: python3-devel
|
BuildRequires: python3-devel
|
||||||
BuildRequires: python3-cairo
|
%ifnarch %{ix86}
|
||||||
BuildRequires: python3-gobject
|
BuildRequires: python3dist(pycairo)
|
||||||
BuildRequires: python3-pytz
|
%endif
|
||||||
BuildRequires: python3-sphinx
|
BuildRequires: python3dist(pytz)
|
||||||
|
BuildRequires: python3dist(sphinx)
|
||||||
Requires: dejavu-sans-fonts
|
Requires: dejavu-sans-fonts
|
||||||
Recommends: texlive-dvipng
|
Recommends: texlive-dvipng
|
||||||
Requires: (texlive-dvipng if texlive-base)
|
Requires: (texlive-dvipng if texlive-base)
|
||||||
Requires: python3-matplotlib-data = %{version}-%{release}
|
Requires: python3-matplotlib-data = %{version}-%{release}
|
||||||
Requires: python3-cairo
|
Requires: python3dist(pycairo)
|
||||||
Requires: python3-matplotlib-%{?backend_subpackage}%{!?backend_subpackage:tk}%{?_isa} = %{version}-%{release}
|
Recommends: python3-matplotlib-%{?backend_subpackage}%{!?backend_subpackage:tk}%{?_isa} = %{version}-%{release}
|
||||||
%if %{with check}
|
%if %{with check}
|
||||||
BuildRequires: python3-pytest
|
BuildRequires: python3dist(pytest)
|
||||||
BuildRequires: python3-pytest-rerunfailures
|
BuildRequires: python3dist(pytest-rerunfailures)
|
||||||
BuildRequires: python3-pytest-timeout
|
BuildRequires: python3dist(pytest-timeout)
|
||||||
BuildRequires: python3-pytest-xdist
|
BuildRequires: python3dist(pytest-xdist)
|
||||||
BuildRequires: python3-pikepdf
|
%ifnarch %{ix86}
|
||||||
|
BuildRequires: python3dist(pikepdf)
|
||||||
|
%endif
|
||||||
%endif
|
%endif
|
||||||
%if %{without bundled_fonts}
|
%if %{without bundled_fonts}
|
||||||
Requires: stix-math-fonts
|
Requires: stix-math-fonts
|
||||||
@@ -203,19 +218,41 @@ errorcharts, scatterplots, etc, with just a few lines of code.
|
|||||||
|
|
||||||
%package -n python3-matplotlib-qt5
|
%package -n python3-matplotlib-qt5
|
||||||
Summary: Qt5 backend for python3-matplotlib
|
Summary: Qt5 backend for python3-matplotlib
|
||||||
BuildRequires: python3-qt5
|
BuildRequires: python3dist(cairocffi)
|
||||||
|
%ifnarch %{ix86}
|
||||||
|
BuildRequires: python3dist(pyqt5)
|
||||||
|
BuildRequires: qt5-qtwayland
|
||||||
|
%endif
|
||||||
Requires: python3-matplotlib%{?_isa} = %{version}-%{release}
|
Requires: python3-matplotlib%{?_isa} = %{version}-%{release}
|
||||||
Requires: python3-qt5
|
Requires: python3dist(cairocffi)
|
||||||
|
Requires: python3dist(pyqt5)
|
||||||
Obsoletes: python3-matplotlib-qt4 < 3.5.0-0
|
Obsoletes: python3-matplotlib-qt4 < 3.5.0-0
|
||||||
|
|
||||||
%description -n python3-matplotlib-qt5
|
%description -n python3-matplotlib-qt5
|
||||||
%{summary}
|
%{summary}
|
||||||
|
|
||||||
|
%package -n python3-matplotlib-qt6
|
||||||
|
Summary: Qt6 backend for python3-matplotlib
|
||||||
|
BuildRequires: python3dist(cairocffi)
|
||||||
|
%ifnarch %{ix86}
|
||||||
|
BuildRequires: python3dist(pyqt6)
|
||||||
|
BuildRequires: python3-pyqt6
|
||||||
|
BuildRequires: qt6-qtwayland
|
||||||
|
%endif
|
||||||
|
Requires: python3-matplotlib%{?_isa} = %{version}-%{release}
|
||||||
|
Requires: python3dist(cairocffi)
|
||||||
|
Requires: python3dist(pyqt6)
|
||||||
|
|
||||||
|
%description -n python3-matplotlib-qt6
|
||||||
|
%{summary}
|
||||||
|
|
||||||
%package -n python3-matplotlib-gtk3
|
%package -n python3-matplotlib-gtk3
|
||||||
Summary: GTK3 backend for python3-matplotlib
|
Summary: GTK3 backend for python3-matplotlib
|
||||||
|
%ifnarch %{ix86}
|
||||||
# This should be converted to typelib(Gtk) when supported
|
# This should be converted to typelib(Gtk) when supported
|
||||||
BuildRequires: gtk3
|
BuildRequires: gtk3
|
||||||
BuildRequires: python3-gobject
|
BuildRequires: python3-gobject
|
||||||
|
%endif
|
||||||
Requires: gtk3%{?_isa}
|
Requires: gtk3%{?_isa}
|
||||||
Requires: python3-gobject%{?_isa}
|
Requires: python3-gobject%{?_isa}
|
||||||
Requires: python3-matplotlib%{?_isa} = %{version}-%{release}
|
Requires: python3-matplotlib%{?_isa} = %{version}-%{release}
|
||||||
@@ -225,9 +262,11 @@ Requires: python3-matplotlib%{?_isa} = %{version}-%{release}
|
|||||||
|
|
||||||
%package -n python3-matplotlib-gtk4
|
%package -n python3-matplotlib-gtk4
|
||||||
Summary: GTK4 backend for python3-matplotlib
|
Summary: GTK4 backend for python3-matplotlib
|
||||||
|
%ifnarch %{ix86}
|
||||||
# This should be converted to typelib(Gtk) when supported
|
# This should be converted to typelib(Gtk) when supported
|
||||||
BuildRequires: gtk4
|
BuildRequires: gtk4
|
||||||
BuildRequires: python3-gobject
|
BuildRequires: python3-gobject
|
||||||
|
%endif
|
||||||
Requires: gtk4%{?_isa}
|
Requires: gtk4%{?_isa}
|
||||||
Requires: python3-gobject%{?_isa}
|
Requires: python3-gobject%{?_isa}
|
||||||
Requires: python3-matplotlib%{?_isa} = %{version}-%{release}
|
Requires: python3-matplotlib%{?_isa} = %{version}-%{release}
|
||||||
@@ -237,8 +276,10 @@ Requires: python3-matplotlib%{?_isa} = %{version}-%{release}
|
|||||||
|
|
||||||
%package -n python3-matplotlib-tk
|
%package -n python3-matplotlib-tk
|
||||||
Summary: Tk backend for python3-matplotlib
|
Summary: Tk backend for python3-matplotlib
|
||||||
|
%ifnarch %{ix86}
|
||||||
BuildRequires: python3-pillow-tk
|
BuildRequires: python3-pillow-tk
|
||||||
BuildRequires: python3-tkinter
|
BuildRequires: python3-tkinter
|
||||||
|
%endif
|
||||||
Requires: python3-matplotlib%{?_isa} = %{version}-%{release}
|
Requires: python3-matplotlib%{?_isa} = %{version}-%{release}
|
||||||
Requires: python3-pillow-tk
|
Requires: python3-pillow-tk
|
||||||
Requires: python3-tkinter
|
Requires: python3-tkinter
|
||||||
@@ -249,9 +290,11 @@ Requires: python3-tkinter
|
|||||||
%if %{with wx}
|
%if %{with wx}
|
||||||
%package -n python3-matplotlib-wx
|
%package -n python3-matplotlib-wx
|
||||||
Summary: WX backend for python3-matplotlib
|
Summary: WX backend for python3-matplotlib
|
||||||
BuildRequires: python3-wxpython4
|
%ifnarch %{ix86}
|
||||||
|
BuildRequires: python3dist(wxpython)
|
||||||
|
%endif
|
||||||
Requires: python3-matplotlib%{?_isa} = %{version}-%{release}
|
Requires: python3-matplotlib%{?_isa} = %{version}-%{release}
|
||||||
Requires: python3-wxpython4
|
Requires: python3dist(wxpython)
|
||||||
|
|
||||||
%description -n python3-matplotlib-wx
|
%description -n python3-matplotlib-wx
|
||||||
%{summary}
|
%{summary}
|
||||||
@@ -262,9 +305,10 @@ Summary: Documentation files for python-matplotlib
|
|||||||
%if %{with html}
|
%if %{with html}
|
||||||
BuildRequires: graphviz
|
BuildRequires: graphviz
|
||||||
BuildRequires: make
|
BuildRequires: make
|
||||||
BuildRequires: python3-sphinx
|
BuildRequires: python3dist(sphinx)
|
||||||
BuildRequires: tex(latex)
|
BuildRequires: tex(latex)
|
||||||
BuildRequires: tex-preview
|
BuildRequires: tex-preview
|
||||||
|
BuildRequires: ipython
|
||||||
%endif
|
%endif
|
||||||
Requires: python3-matplotlib%{?_isa} = %{version}-%{release}
|
Requires: python3-matplotlib%{?_isa} = %{version}-%{release}
|
||||||
|
|
||||||
@@ -283,35 +327,32 @@ Requires: python3-matplotlib%{?_isa} = %{version}-%{release}
|
|||||||
%autosetup -n matplotlib-%{Version} -N
|
%autosetup -n matplotlib-%{Version} -N
|
||||||
|
|
||||||
# Fedora-specific patches follow:
|
# Fedora-specific patches follow:
|
||||||
%patch1001 -p1
|
%autopatch -p1 -m 1000
|
||||||
# Updated test images for new FreeType.
|
# Updated test images for new FreeType.
|
||||||
%patch1002 -p1
|
gzip -dc %SOURCE1000 | tar xf - --transform='s~^mpl-images-%{mpl_images_version}-with-freetype-%{ftver}/~~'
|
||||||
gzip -dc %SOURCE1000 | tar xf - --transform='s~^mpl-images-%{mpl_images_version}-with-freetype-%{ftver}/\([^/]\+\)/~lib/\1/tests/baseline_images/~'
|
|
||||||
|
|
||||||
# Copy mplsetup.cfg to the builddir
|
# Backports or reported upstream
|
||||||
cp -p %{SOURCE1} mplsetup.cfg
|
%autopatch -p1 -M 999
|
||||||
|
|
||||||
%patch1003 -p1
|
|
||||||
|
|
||||||
|
|
||||||
%generate_buildrequires
|
%generate_buildrequires
|
||||||
%pyproject_buildrequires -r
|
%pyproject_buildrequires -p
|
||||||
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%set_build_flags
|
%set_build_flags
|
||||||
export http_proxy=http://127.0.0.1/
|
export http_proxy=http://127.0.0.1/
|
||||||
|
|
||||||
MPLCONFIGDIR=$PWD %pyproject_wheel
|
MPLCONFIGDIR=$PWD %pyproject_wheel %build_backend_args
|
||||||
%if %{with html}
|
%if %{with html}
|
||||||
# Need to make built matplotlib libs available for the sphinx extensions:
|
# Need to make built matplotlib libs available for the sphinx extensions:
|
||||||
MPLCONFIGDIR=$PWD \
|
MPLCONFIGDIR=$PWD \
|
||||||
PYTHONPATH=$(ls -d %{_pyproject_builddir}/pip-req-build-*/build/lib.%{python3_platform}-%{python3_version}) \
|
PYTHONPATH="%{pyproject_site_lib}" \
|
||||||
make -C doc html
|
make -C doc html
|
||||||
%endif
|
%endif
|
||||||
# Ensure all example files are non-executable so that the -doc
|
# Ensure all example files are non-executable so that the -doc
|
||||||
# package doesn't drag in dependencies
|
# package doesn't drag in dependencies
|
||||||
find examples -name '*.py' -exec chmod a-x '{}' \;
|
find galleries -name '*.py' -exec chmod a-x '{}' \;
|
||||||
|
|
||||||
|
|
||||||
%install
|
%install
|
||||||
@@ -320,7 +361,6 @@ export http_proxy=http://127.0.0.1/
|
|||||||
MPLCONFIGDIR=$PWD %pyproject_install
|
MPLCONFIGDIR=$PWD %pyproject_install
|
||||||
|
|
||||||
# Delete unnecessary files.
|
# 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/.gitignore
|
||||||
rm %{buildroot}%{python3_sitearch}/matplotlib/tests/tinypages/_static/.gitignore
|
rm %{buildroot}%{python3_sitearch}/matplotlib/tests/tinypages/_static/.gitignore
|
||||||
|
|
||||||
@@ -338,26 +378,43 @@ rm -rf %{buildroot}%{_datadir}/matplotlib/mpl-data/fonts
|
|||||||
# These files confuse pytest, and we want to test the installed copy.
|
# These files confuse pytest, and we want to test the installed copy.
|
||||||
rm -rf build*/
|
rm -rf build*/
|
||||||
|
|
||||||
|
%ifnarch %{ix86}
|
||||||
# We need to prime this LaTeX cache stuff, or it might fail while running tests
|
# We need to prime this LaTeX cache stuff, or it might fail while running tests
|
||||||
# in parallel.
|
# in parallel.
|
||||||
mktexfmt latex.fmt
|
mktexfmt latex.fmt
|
||||||
mktexfmt lualatex.fmt
|
mktexfmt lualatex.fmt
|
||||||
mktexfmt pdflatex.fmt
|
mktexfmt pdflatex.fmt
|
||||||
mktexfmt xelatex.fmt
|
mktexfmt xelatex.fmt
|
||||||
|
%endif
|
||||||
|
# Also prime the font cache.
|
||||||
|
%{py3_test_envvars} %{python3} -c 'import matplotlib.font_manager'
|
||||||
|
|
||||||
export http_proxy=http://127.0.0.1/
|
export http_proxy=http://127.0.0.1/
|
||||||
# Skips:
|
|
||||||
# * test_invisible_Line_rendering: Checks for "slowness" that often fails on a
|
# This test checks for "slowness" that often fails on a heavily-loaded builder.
|
||||||
# heavily-loaded builder.
|
k="${k-}${k+ and }not test_invisible_Line_rendering"
|
||||||
# * test_form_widget_get_with_datetime_and_date_fields is flaky.
|
# This test is flaky.
|
||||||
MPLCONFIGDIR=$PWD \
|
k="${k-}${k+ and }not test_form_widget_get_with_datetime_and_date_fields"
|
||||||
|
|
||||||
|
env MPLCONFIGDIR=$PWD \
|
||||||
|
%{pytest} -ra -n auto \
|
||||||
|
-m 'not network' -k "${k-}" \
|
||||||
|
--pyargs matplotlib mpl_toolkits.axes_grid1 mpl_toolkits.axisartist mpl_toolkits.mplot3d
|
||||||
%ifnarch %{ix86}
|
%ifnarch %{ix86}
|
||||||
xvfb-run -a -s "-screen 0 640x480x24" \
|
# Skip GTK3Cairo tests that are broken in virtual display.
|
||||||
|
k="${k-}${k+ and }not (test_interactive_thread_safety and gtk3cairo)"
|
||||||
|
k="${k-}${k+ and }not (test_interactive_timers and gtk3cairo)"
|
||||||
|
# Run backend tests with Wayland.
|
||||||
|
wlheadless-run -- env MPLCONFIGDIR=$PWD GDK_BACKEND=wayland QT_QPA_PLATFORM=wayland \
|
||||||
|
%{pytest} -vra -n auto \
|
||||||
|
-m 'not network' -k "${k-}" \
|
||||||
|
--pyargs matplotlib.tests.test_backend_gtk3 matplotlib.tests.test_backend_qt matplotlib.tests.test_backend_tk matplotlib.tests.test_backends_interactive
|
||||||
|
# Run backend tests with XWayland.
|
||||||
|
xwfb-run -- env MPLCONFIGDIR=$PWD \
|
||||||
|
%{pytest} -ra -n auto \
|
||||||
|
-m 'not network' -k "${k-}" \
|
||||||
|
--pyargs matplotlib.tests.test_backend_gtk3 matplotlib.tests.test_backend_qt matplotlib.tests.test_backend_tk matplotlib.tests.test_backends_interactive
|
||||||
%endif
|
%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.tests
|
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
|
||||||
@@ -373,20 +430,19 @@ MPLCONFIGDIR=$PWD \
|
|||||||
%endif
|
%endif
|
||||||
|
|
||||||
%files -n python3-matplotlib-doc
|
%files -n python3-matplotlib-doc
|
||||||
%doc examples
|
%doc galleries/examples
|
||||||
%if %{with html}
|
%if %{with html}
|
||||||
%doc doc/build/html/*
|
%doc doc/build/html/*
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%files -n python3-matplotlib
|
%files -n python3-matplotlib
|
||||||
%license LICENSE/
|
%license LICENSE/
|
||||||
%doc README.rst
|
%doc README.md
|
||||||
%{python3_sitearch}/matplotlib-*.dist-info/
|
%{python3_sitearch}/matplotlib-*.dist-info/
|
||||||
%{python3_sitearch}/matplotlib-*-nspkg.pth
|
|
||||||
%{python3_sitearch}/matplotlib/
|
%{python3_sitearch}/matplotlib/
|
||||||
%exclude %{python3_sitearch}/matplotlib/tests/baseline_images/*
|
%exclude %{python3_sitearch}/matplotlib/tests/baseline_images/*
|
||||||
%{python3_sitearch}/mpl_toolkits/
|
%{python3_sitearch}/mpl_toolkits/
|
||||||
%exclude %{python3_sitearch}/mpl_toolkits/tests/baseline_images/*
|
%exclude %{python3_sitearch}/mpl_toolkits/*/tests/baseline_images/*
|
||||||
%pycached %{python3_sitearch}/pylab.py
|
%pycached %{python3_sitearch}/pylab.py
|
||||||
%pycached %exclude %{python3_sitearch}/matplotlib/backends/backend_qt5*.py
|
%pycached %exclude %{python3_sitearch}/matplotlib/backends/backend_qt5*.py
|
||||||
%pycached %exclude %{python3_sitearch}/matplotlib/backends/backend_gtk*.py
|
%pycached %exclude %{python3_sitearch}/matplotlib/backends/backend_gtk*.py
|
||||||
@@ -400,11 +456,15 @@ MPLCONFIGDIR=$PWD \
|
|||||||
|
|
||||||
%files -n python3-matplotlib-test-data
|
%files -n python3-matplotlib-test-data
|
||||||
%{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-qt5
|
%files -n python3-matplotlib-qt5
|
||||||
%pycached %{python3_sitearch}/matplotlib/backends/backend_qt5*.py
|
%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
|
||||||
|
|
||||||
%files -n python3-matplotlib-gtk3
|
%files -n python3-matplotlib-gtk3
|
||||||
%pycached %{python3_sitearch}/matplotlib/backends/backend_gtk3*.py
|
%pycached %{python3_sitearch}/matplotlib/backends/backend_gtk3*.py
|
||||||
|
|
||||||
|
|||||||
4
sources
4
sources
@@ -1,2 +1,2 @@
|
|||||||
SHA512 (matplotlib-3.5.3.tar.gz) = 8d8bc28ef62a2373a0740ba5322f04ddbcc6485caf06883b54904f1ff7c979b9c4425516274d2b9e0cb63607d11bc3149044bee7ccac37de6ccd80480791cd4d
|
SHA512 (matplotlib-3.10.8.tar.gz) = 66d07fb0b13821e88f6e6fe9f9882542340c074198dce7d5f8bf5d65d1c64326ae7517ad38d6357491c54aedd8cd1b03f555ad6d9337754db5dbd43c6305ab3f
|
||||||
SHA512 (matplotlib-3.5.3-with-freetype-2.12.1.tar.gz) = 52793236ed8bafb8f9bd18608a69e1893e95cde2a2af416d7688ce6919df2af199752f7bf05ac41525e231a316fd3fd0192f2c5d0e399708161dec0939e1101e
|
SHA512 (matplotlib-3.10.3-with-freetype-2.13.1.tar.gz) = bb32e57bbd341c652d03361e3785145a9e89f59709eb588882f81cba4061c8aa7250c0d46ed07a588d75a055d72bbc6126c59e8777634385a458287f6ef8812f
|
||||||
|
|||||||
Reference in New Issue
Block a user