Compare commits

..

7 Commits
rawhide ... f42

Author SHA1 Message Date
Elliott Sales de Andrade
9ec656f711 Update to latest version (#2402615) 2026-01-06 20:18:56 -05:00
Elliott Sales de Andrade
4657ee6ac4 Reduce testing dependencies on i686 2026-01-06 19:28:17 -05:00
Elliott Sales de Andrade
36bb5d7fa0 Ignore test failures in GTK
It seems to incorrectly set the initial size, but that is fixed in F43,
so this is only done for F42 here.

[skip changelog]
2025-09-12 04:54:26 -04:00
Elliott Sales de Andrade
f2d972fa1d Update to latest version (#2385842) 2025-08-30 03:42:05 -04:00
Elliott Sales de Andrade
d0eaec2e00 Update to latest version (#2385842) 2025-07-31 21:53:04 -04:00
Elliott Sales de Andrade
492a599cee Backport fix for OffsetBox custom picker
- fixes rhbz#2367456
2025-05-30 22:45:07 -04:00
Elliott Sales de Andrade
3560f7bf0d Fix button images in toolmanager
This was reported upstream in https://github.com/matplotlib/matplotlib/issues/30116.
2025-05-28 01:47:06 -04:00
8 changed files with 138 additions and 46 deletions

1
.gitignore vendored
View File

@@ -122,4 +122,3 @@ matplotlib-1.0.0-without-gpc.tar.gz
/matplotlib-3.10.5.tar.gz
/matplotlib-3.10.6.tar.gz
/matplotlib-3.10.8.tar.gz
/matplotlib-3.10.8-with-freetype-2.14.1.tar.gz

View File

@@ -1,18 +1,29 @@
From 50c46d80a99b6bdbb61733b0eef69649f22701ab Mon Sep 17 00:00:00 2001
From 3c225cf3905d734a27df25e3a53a904a55f2904e Mon Sep 17 00:00:00 2001
From: Sandro Tosi <morph@debian.org>
Date: Wed, 27 Sep 2017 19:35:59 -0400
Subject: [PATCH 1/5] matplotlibrc path search fix
Signed-off-by: Elliott Sales de Andrade <quantum.analyst@gmail.com>
---
lib/matplotlib/__init__.py | 2 ++
1 file changed, 2 insertions(+)
lib/matplotlib/__init__.py | 5 ++++-
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
index 2786f9b7b9..79cccf0892 100644
index 2786f9b7b9..64ba02afd6 100644
--- a/lib/matplotlib/__init__.py
+++ b/lib/matplotlib/__init__.py
@@ -613,6 +613,7 @@ def matplotlib_fname():
@@ -593,7 +593,8 @@ def get_cachedir():
@_logged_cached('matplotlib data path: %s')
def get_data_path():
"""Return the path to Matplotlib data."""
- return str(Path(__file__).with_name("mpl-data"))
+ return str(Path(__file__).parent.parent.parent.parent.parent /
+ 'share/matplotlib/mpl-data')
def matplotlib_fname():
@@ -613,6 +614,7 @@ def matplotlib_fname():
is not defined)
- On other platforms,
- ``$HOME/.matplotlib/matplotlibrc`` if ``$HOME`` is defined
@@ -20,7 +31,7 @@ index 2786f9b7b9..79cccf0892 100644
- Lastly, it looks in ``$MATPLOTLIBDATA/matplotlibrc``, which should always
exist.
"""
@@ -631,6 +632,7 @@ def matplotlib_fname():
@@ -631,6 +633,7 @@ def matplotlib_fname():
yield matplotlibrc
yield os.path.join(matplotlibrc, 'matplotlibrc')
yield os.path.join(get_configdir(), 'matplotlibrc')
@@ -28,6 +39,81 @@ index 2786f9b7b9..79cccf0892 100644
yield os.path.join(get_data_path(), 'matplotlibrc')
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.52.0

View File

@@ -1,7 +1,7 @@
From 4550b06f9de6c23d7b87a34d2bca1c9aaa594a3e Mon Sep 17 00:00:00 2001
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.14.1 and update tolerances
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>
---
@@ -15,7 +15,7 @@ Signed-off-by: Elliott Sales de Andrade <quantum.analyst@gmail.com>
7 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/extern/meson.build b/extern/meson.build
index 5463183a90..928eb6bd56 100644
index 5463183a90..c7233815af 100644
--- a/extern/meson.build
+++ b/extern/meson.build
@@ -13,7 +13,7 @@ else
@@ -23,20 +23,20 @@ index 5463183a90..928eb6bd56 100644
# 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.14.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 79cccf0892..04d716b54c 100644
index 64ba02afd6..9fe5fb7abf 100644
--- a/lib/matplotlib/__init__.py
+++ b/lib/matplotlib/__init__.py
@@ -1363,7 +1363,7 @@ def _val_or_rc(val, rc_name):
@@ -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.14.1'
+ LOCAL_FREETYPE_VERSION = '2.13.1'
from matplotlib import ft2font
if (ft2font.__freetype_version__ != LOCAL_FREETYPE_VERSION or

View File

@@ -1,4 +1,4 @@
From ff0a79b707eb6603c0cb0bd3778c3c88fbacfac8 Mon Sep 17 00:00:00 2001
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

View File

@@ -1,4 +1,4 @@
From abf5f01b8fa262c71f7ccdf189c608f189028a44 Mon Sep 17 00:00:00 2001
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

View File

@@ -1,4 +1,4 @@
From 7a5bbfe3bd5905a7daefac690ebdfd7403c8ef7a Mon Sep 17 00:00:00 2001
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
@@ -12,7 +12,7 @@ Signed-off-by: Elliott Sales de Andrade <quantum.analyst@gmail.com>
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..903ae87cbb 100644
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():
@@ -20,7 +20,7 @@ index 4e3c1bbc2b..903ae87cbb 100644
fig.savefig(result_after, format='png')
- assert result.getvalue() == result_after.getvalue()
+ if 'qt' not in backend and 'wx' not in backend:
+ 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()

View File

@@ -32,10 +32,10 @@
%global _docdir_fmt %{name}
# Updated test images for new FreeType.
%global mpl_images_version 3.10.8
%global mpl_images_version 3.10.3
# The version of FreeType in this Fedora branch.
%global ftver 2.14.1
%global ftver 2.13.1
Name: python-matplotlib
Version: 3.10.8
@@ -151,17 +151,25 @@ 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-data
Summary: Data used by python-matplotlib
BuildArch: noarch
%if %{with bundled_fonts}
Requires: python3-matplotlib-data-fonts = %{version}-%{release}
%endif
Obsoletes: python-matplotlib-data < 3
%description -n python3-matplotlib-data
%{summary}
%if %{with bundled_fonts}
%package -n python3-matplotlib-data-fonts
Summary: Fonts used by python-matplotlib
# Carlogo, STIX and Computer Modern is OFL
# DejaVu is Bitstream Vera and Public Domain
License: OFL-1.1 AND Bitstream-Vera AND LicenseRef-Fedora-Public-Domain
%if %{without bundled_fonts}
Requires: stix-math-fonts
%else
Provides: bundled(stix-math-fonts)
%endif
BuildArch: noarch
Requires: python3-matplotlib-data = %{version}-%{release}
Obsoletes: python-matplotlib-data-fonts < 3
%description -n python3-matplotlib-data-fonts
@@ -179,7 +187,7 @@ BuildRequires: python3dist(sphinx)
Requires: dejavu-sans-fonts
Recommends: texlive-dvipng
Requires: (texlive-dvipng if texlive-base)
Requires: python3-matplotlib-data-fonts = %{version}-%{release}
Requires: python3-matplotlib-data = %{version}-%{release}
Requires: python3dist(pycairo)
Recommends: python3-matplotlib-%{?backend_subpackage}%{!?backend_subpackage:tk}%{?_isa} = %{version}-%{release}
%if %{with check}
@@ -191,10 +199,11 @@ BuildRequires: python3dist(pytest-xdist)
BuildRequires: python3dist(pikepdf)
%endif
%endif
# Remove in F45.
Provides: python3-matplotlib-data = %{version}-%{release}
Obsoletes: python3-matplotlib-data < 3.11~~~
Obsoletes: python-matplotlib-data < 3
%if %{without bundled_fonts}
Requires: stix-math-fonts
%else
Provides: bundled(stix-math-fonts)
%endif
%description -n python3-matplotlib
Matplotlib is a Python 2D plotting library which produces publication
@@ -240,14 +249,10 @@ Requires: python3dist(pyqt6)
%package -n python3-matplotlib-gtk3
Summary: GTK3 backend for python3-matplotlib
%ifnarch %{ix86}
# For Cairo and xlib typelib files.
BuildRequires: gobject-introspection
# This should be converted to typelib(Gtk) when supported
BuildRequires: gtk3
BuildRequires: python3-gobject
%endif
# For Cairo and xlib typelib files.
Requires: gobject-introspection
Requires: gtk3%{?_isa}
Requires: python3-gobject%{?_isa}
Requires: python3-matplotlib%{?_isa} = %{version}-%{release}
@@ -258,14 +263,10 @@ Requires: python3-matplotlib%{?_isa} = %{version}-%{release}
%package -n python3-matplotlib-gtk4
Summary: GTK4 backend for python3-matplotlib
%ifnarch %{ix86}
# For Cairo and xlib typelib files.
BuildRequires: gobject-introspection
# This should be converted to typelib(Gtk) when supported
BuildRequires: gtk4
BuildRequires: python3-gobject
%endif
# For Cairo and xlib typelib files.
Requires: gobject-introspection
Requires: gtk4%{?_isa}
Requires: python3-gobject%{?_isa}
Requires: python3-matplotlib%{?_isa} = %{version}-%{release}
@@ -364,8 +365,11 @@ rm %{buildroot}%{python3_sitearch}/matplotlib/tests/tinypages/.gitignore
rm %{buildroot}%{python3_sitearch}/matplotlib/tests/tinypages/_static/.gitignore
# Move files to Fedora-specific locations.
mkdir -p %{buildroot}%{_sysconfdir} %{buildroot}%{_datadir}/matplotlib
mv %{buildroot}%{python3_sitearch}/matplotlib/mpl-data \
%{buildroot}%{_datadir}/matplotlib
%if %{without bundled_fonts}
rm -rf %{buildroot}%{python3_sitearch}/matplotlib/mpl-data/fonts
rm -rf %{buildroot}%{_datadir}/matplotlib/mpl-data/fonts
%endif
@@ -400,9 +404,6 @@ env MPLCONFIGDIR=$PWD \
# 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)"
# These two segfault, resp. timeout in Python 3.14 Copr test environment
k="${k-}${k+ and }not test_interactive_thread_safety"
k="${k-}${k+ and }not test_figuremanager_cleans_own_mainloop"
# Run backend tests with Wayland.
wlheadless-run -- env MPLCONFIGDIR=$PWD GDK_BACKEND=wayland QT_QPA_PLATFORM=wayland \
%{pytest} -vra -n auto \
@@ -417,9 +418,15 @@ xwfb-run -- env MPLCONFIGDIR=$PWD \
%endif
%files -n python3-matplotlib-data-fonts
%files -n python3-matplotlib-data
%{_datadir}/matplotlib/mpl-data/
%if %{with bundled_fonts}
%{python3_sitearch}/matplotlib/mpl-data/fonts/
%exclude %{_datadir}/matplotlib/mpl-data/fonts/
%endif
%if %{with bundled_fonts}
%files -n python3-matplotlib-data-fonts
%{_datadir}/matplotlib/mpl-data/fonts/
%endif
%files -n python3-matplotlib-doc

View File

@@ -1,2 +1,2 @@
SHA512 (matplotlib-3.10.8.tar.gz) = 66d07fb0b13821e88f6e6fe9f9882542340c074198dce7d5f8bf5d65d1c64326ae7517ad38d6357491c54aedd8cd1b03f555ad6d9337754db5dbd43c6305ab3f
SHA512 (matplotlib-3.10.8-with-freetype-2.14.1.tar.gz) = 03f5b406caced1e2a59f914a64808b146954ce2285551cb2314664f883a05cbc93a92a28f5c259817a77e048012542d09a0180a230591e40ccef297f477a1e5b
SHA512 (matplotlib-3.10.3-with-freetype-2.13.1.tar.gz) = bb32e57bbd341c652d03361e3785145a9e89f59709eb588882f81cba4061c8aa7250c0d46ed07a588d75a055d72bbc6126c59e8777634385a458287f6ef8812f