Add new matplotlib extra, use tomcli to remove cov instead of sed.

This commit is contained in:
Federico Pellegrin
2025-08-16 12:44:20 +02:00
parent 7452bc1c85
commit c59ae2ba3d
+8 -2
View File
@@ -27,6 +27,9 @@ Source: %{pypi_source pint}
BuildArch: noarch
# To manipulate pyproject.toml
BuildRequires: tomcli
%global _description %{expand:
Pint is a Python package to define, operate and manipulate physical quantities:
the product of a numerical value and a unit of measurement. It allows
@@ -61,12 +64,14 @@ Summary: %{summary}
%if %{with mip}
%pyproject_extras_subpkg -n python3-pint mip
%endif
%pyproject_extras_subpkg -n python3-pint matplotlib
%prep
%autosetup -n pint-%{version} -p1
# https://docs.fedoraproject.org/en-US/packaging-guidelines/Python/#_linters
sed -r -i 's/ "pytest-cov",//g' pyproject.toml
tomcli set pyproject.toml lists delitem project.optional-dependencies.test \
pytest-cov
# This module is executable in the source, and it might make sense for upstream
# to run it directly as a script during development, but this package will
@@ -96,7 +101,8 @@ sed -r -i '1{/^#!/d}' pint/pint_convert.py
%if %{with mip}
-x mip \
%endif
-x test}
-x matplotlib \
-x test-all }
%build
%pyproject_wheel