|
|
|
@@ -1,5 +1,4 @@
|
|
|
|
|
# python-xarray is not available on EPEL10
|
|
|
|
|
%bcond xarray 0
|
|
|
|
|
%bcond xarray 1
|
|
|
|
|
# Not yet packaged: python-uncertainties
|
|
|
|
|
%bcond uncertainties 0
|
|
|
|
|
# Requires babel <= 2.8; F42 has 2.16.0
|
|
|
|
@@ -8,11 +7,12 @@
|
|
|
|
|
%bcond pandas 0
|
|
|
|
|
# Not yet packaged: python-mip
|
|
|
|
|
%bcond mip 0
|
|
|
|
|
# python-dask is not available on EPEL10
|
|
|
|
|
# Requires dask < 2025.3.0 but F43 and Rawhide are at 2025.9.1
|
|
|
|
|
# See: https://github.com/dask/dask-ml/issues/1016
|
|
|
|
|
%bcond dask 0
|
|
|
|
|
|
|
|
|
|
Name: python-pint
|
|
|
|
|
Version: 0.24.4
|
|
|
|
|
Version: 0.25.2
|
|
|
|
|
Release: %autorelease
|
|
|
|
|
Summary: Physical quantities module
|
|
|
|
|
|
|
|
|
@@ -22,6 +22,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
|
|
|
|
@@ -37,34 +40,12 @@ Summary: %{summary}
|
|
|
|
|
|
|
|
|
|
%description -n python3-pint %{_description}
|
|
|
|
|
|
|
|
|
|
%pyproject_extras_subpkg -n python3-pint numpy
|
|
|
|
|
%if %{with xarray}
|
|
|
|
|
%pyproject_extras_subpkg -n python3-pint xarray
|
|
|
|
|
%endif
|
|
|
|
|
%if %{with dask}
|
|
|
|
|
%pyproject_extras_subpkg -n python3-pint dask
|
|
|
|
|
%endif
|
|
|
|
|
%if %{with uncertainties}
|
|
|
|
|
%pyproject_extras_subpkg -n python3-pint uncertainties
|
|
|
|
|
%endif
|
|
|
|
|
%if %{with babel}
|
|
|
|
|
%pyproject_extras_subpkg -n python3-pint babel
|
|
|
|
|
%endif
|
|
|
|
|
%if %{with pandas}
|
|
|
|
|
%pyproject_extras_subpkg -n python3-pint pandas
|
|
|
|
|
%endif
|
|
|
|
|
%if %{with mip}
|
|
|
|
|
%pyproject_extras_subpkg -n python3-pint mip
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%prep
|
|
|
|
|
%autosetup -n pint-%{version} -p1
|
|
|
|
|
|
|
|
|
|
# https://docs.fedoraproject.org/en-US/packaging-guidelines/Python/#_linters
|
|
|
|
|
sed -r -i '/pytest-cov/d' pyproject.toml
|
|
|
|
|
|
|
|
|
|
# pytest-mpl is not available on EPEL10
|
|
|
|
|
sed -r -i '/pytest-mpl/d' 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
|
|
|
|
@@ -74,27 +55,7 @@ sed -r -i '/pytest-mpl/d' pyproject.toml
|
|
|
|
|
sed -r -i '1{/^#!/d}' pint/pint_convert.py
|
|
|
|
|
|
|
|
|
|
%generate_buildrequires
|
|
|
|
|
%{pyproject_buildrequires \
|
|
|
|
|
-x numpy \
|
|
|
|
|
%if %{with uncertainties}
|
|
|
|
|
-x uncertainties \
|
|
|
|
|
%endif
|
|
|
|
|
%if %{with babel}
|
|
|
|
|
-x babel \
|
|
|
|
|
%endif
|
|
|
|
|
%if %{with pandas}
|
|
|
|
|
-x pandas \
|
|
|
|
|
%endif
|
|
|
|
|
%if %{with xarray}
|
|
|
|
|
-x xarray \
|
|
|
|
|
%endif
|
|
|
|
|
%if %{with dask}
|
|
|
|
|
-x dask \
|
|
|
|
|
%endif
|
|
|
|
|
%if %{with mip}
|
|
|
|
|
-x mip \
|
|
|
|
|
%endif
|
|
|
|
|
-x test}
|
|
|
|
|
%{pyproject_buildrequires}
|
|
|
|
|
|
|
|
|
|
%build
|
|
|
|
|
%pyproject_wheel
|
|
|
|
|