public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/python-matplotlib] rawhide: Clean up parts of the spec
@ 2026-07-21  8:02 Elliott Sales de Andrade
  0 siblings, 0 replies; only message in thread
From: Elliott Sales de Andrade @ 2026-07-21  8:02 UTC (permalink / raw)
  To: git-commits

            A new commit has been pushed.

            Repo   : rpms/python-matplotlib
            Branch : rawhide
            Commit : 21d7ec88c79b2057b0b03f3d41777b707a7b5f26
            Author : Elliott Sales de Andrade <quantum.analyst@gmail.com>
            Date   : 2026-07-21T02:43:04-04:00
            Stats  : +17/-43 in 1 file(s)
            URL    : https://src.fedoraproject.org/rpms/python-matplotlib/c/21d7ec88c79b2057b0b03f3d41777b707a7b5f26?branch=rawhide

            Log:
            Clean up parts of the spec

Remove old Obsoletes, simplify conditions, and drop old EPEL things.

---
diff --git a/python-matplotlib.spec b/python-matplotlib.spec
index 54a06bd..9309998 100644
--- a/python-matplotlib.spec
+++ b/python-matplotlib.spec
@@ -1,32 +1,19 @@
-%bcond_with html
-%bcond_without check
+%bcond html 0
+%bcond check 1
 # https://fedorahosted.org/fpc/ticket/381
-%bcond_without bundled_fonts
+%bcond bundled_fonts 1
 
-# No WX for EL8/ELN/EL9
-%if 0%{?rhel} >= 8
-%bcond_with wx
-%else
-%bcond_without wx
-%endif
+# No WX for ELN
+%bcond wx %{undefined rhel}
 
-# The default backend; one of GTK3Agg GTK3Cairo GTK4Agg GTK4Cairo MacOSX QtAgg
-# TkAgg WXAgg Agg Cairo PS PDF SVG
-%global backend                 TkAgg
-
-%if "%{backend}" == "TkAgg"
+# The default recommended backend; one of the subpackages.
 %global backend_subpackage tk
-%else
-%  if "%{backend}" == "Qt5Agg"
-%global backend_subpackage qt5
-%  else
-%    if "%{backend}" == "WXAgg"
-%global backend_subpackage wx
-%    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"
+%global build_backend_args %{shrink:
+  -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}
@@ -73,7 +60,6 @@ BuildRequires:  gcc
 BuildRequires:  gcc-c++
 BuildRequires:  glibc-langpack-en
 BuildRequires:  freetype-devel
-BuildRequires:  libpng-devel
 BuildRequires:  qhull-devel
 %ifnarch %{ix86}
 BuildRequires:  xwayland-run
@@ -82,10 +68,7 @@ BuildRequires:  zlib-devel
 
 %ifnarch %{ix86}
 BuildRequires:  ghostscript
-# No ImageMagick for EL8/ELN/EL9
-%if 0%{?fedora} || (0%{?rhel} && 0%{?rhel} < 8)
 BuildRequires:  ImageMagick
-%endif
 BuildRequires:  inkscape
 %endif
 
@@ -162,11 +145,10 @@ Summary:        Fonts used by python-matplotlib
 # 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
+Requires:       (stix-math-fonts >= 1 with stix-math-fonts < 2)
 %else
-Provides:       bundled(stix-math-fonts)
+Provides:       bundled(stix-math-fonts) = 1
 %endif
-Obsoletes:      python-matplotlib-data-fonts < 3
 
 %description -n python3-matplotlib-data-fonts
 %{summary}
@@ -195,10 +177,6 @@ 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
 
 %description -n python3-matplotlib
 Matplotlib is a Python 2D plotting library which produces publication
@@ -221,7 +199,6 @@ BuildRequires:  qt5-qtwayland
 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}
@@ -330,12 +307,12 @@ Requires:       python3-matplotlib%{?_isa} = %{version}-%{release}
 %autosetup -n matplotlib-%{Version} -N
 
 # Fedora-specific patches follow:
-%autopatch -p1 -m 1000
+%autopatch -q -p1 -m 1000
 # Updated test images for new FreeType.
 gzip -dc %SOURCE1000 | tar xf - --transform='s~^mpl-images-%{mpl_images_version}-with-freetype-%{ftver}/~~'
 
 # Backports or reported upstream
-%autopatch -p1 -M 999
+%autopatch -q -p1 -M 999
 
 
 %generate_buildrequires
@@ -343,10 +320,7 @@ gzip -dc %SOURCE1000 | tar xf - --transform='s~^mpl-images-%{mpl_images_version}
 
 
 %build
-%set_build_flags
-export http_proxy=http://127.0.0.1/
-
-MPLCONFIGDIR=$PWD %pyproject_wheel %build_backend_args
+%pyproject_wheel %build_backend_args
 %if %{with html}
 # Need to make built matplotlib libs available for the sphinx extensions:
 MPLCONFIGDIR=$PWD \
@@ -361,7 +335,7 @@ find galleries -name '*.py' -exec chmod a-x '{}' \;
 %install
 export http_proxy=http://127.0.0.1/
 
-MPLCONFIGDIR=$PWD %pyproject_install
+%pyproject_install
 
 # Delete unnecessary files.
 rm %{buildroot}%{python3_sitearch}/matplotlib/tests/tinypages/.gitignore

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-07-21  8:02 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-07-21  8:02 [rpms/python-matplotlib] rawhide: Clean up parts of the spec Elliott Sales de Andrade

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox