From c59ae2ba3df9f197c38a3192c87d118fceeaa1ab Mon Sep 17 00:00:00 2001 From: Federico Pellegrin Date: Sat, 16 Aug 2025 12:44:20 +0200 Subject: [PATCH] Add new matplotlib extra, use tomcli to remove cov instead of sed. --- python-pint.spec | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/python-pint.spec b/python-pint.spec index 76b168f..e430611 100644 --- a/python-pint.spec +++ b/python-pint.spec @@ -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