Add new matplotlib extra, use tomcli to remove cov instead of sed.
This commit is contained in:
+8
-2
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user