public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/python-pint] rpmlint-etc: Improve dependency generation, add extras metapackages, and finish fully porting to pyproject-rpm-macros
@ 2026-09-12 10:21 Benjamin A. Beasley
0 siblings, 0 replies; only message in thread
From: Benjamin A. Beasley @ 2026-09-12 10:21 UTC (permalink / raw)
To: git-commits
A new commit has been pushed.
Repo : rpms/python-pint
Branch : rpmlint-etc
Commit : 4c7ab1ff54974b3fe3ede5a24cdae74806f9373d
Author : Benjamin A. Beasley <code@musicinmybrain.net>
Date : 2023-10-29T22:23:20-04:00
Stats : +20/-29 in 1 file(s)
URL : https://src.fedoraproject.org/rpms/python-pint/c/4c7ab1ff54974b3fe3ede5a24cdae74806f9373d?branch=rpmlint-etc
Log:
Improve dependency generation, add extras metapackages, and finish fully porting to pyproject-rpm-macros
---
diff --git a/python-pint.spec b/python-pint.spec
index 1b1c5ba..9d0df5e 100644
--- a/python-pint.spec
+++ b/python-pint.spec
@@ -1,5 +1,3 @@
-%global pypi_name Pint
-
Name: python-pint
Version: 0.17
Release: %autorelease
@@ -7,38 +5,31 @@ Summary: Physical quantities module
License: BSD
URL: https://github.com/hgrecco/pint
-Source0: %pypi_source
+Source0: %{pypi_source Pint}
BuildArch: noarch
-BuildRequires: pyproject-rpm-macros
-%description
-Pint is Python module/package to define, operate and manipulate physical
-quantities: the product of a numerical value and a unit of measurement.
-It allows arithmetic operations between them and conversions from and
-to different units.
+%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
+arithmetic operations between them and conversions from and to different units.
-It is distributed with a comprehensive list of physical units, prefixes
-and constants.
+It is distributed with a comprehensive list of physical units, prefixes and
+constants.}
-%package -n python3-pint
-Summary: Physical quantities module
-%{?python_provide:%python_provide python3-pint}
+%description %{_description}
-BuildRequires: python3-numpy
-BuildRequires: python3-pytest
+%package -n python3-pint
+Summary: %{summary}
-%description -n python3-pint
-Pint is Python module/package to define, operate and manipulate physical
-quantities: the product of a numerical value and a unit of measurement.
-It allows arithmetic operations between them and conversions from and
-to different units.
+%description -n python3-pint %{_description}
-It is distributed with a comprehensive list of physical units, prefixes
-and constants.
+# We omit the “uncertainties” extra because python-uncertainties is not yet
+# packaged.
+%pyproject_extras_subpkg -n python3-pint numpy
%prep
-%setup -q -n %{pypi_name}-%{version}
+%autosetup -n Pint-%{version}
# numpy 1.24.x removes np.float np.alen and so on
# These are already fixed upstream
@@ -60,22 +51,22 @@ sed -i pint/testsuite/test_contexts.py -e 's|self.assertEquals|self.assertEqual|
sed -i '/@helpers.requires_numpy_at_least("1.16")/d' pint/testsuite/test_quantity.py
%generate_buildrequires
-%pyproject_buildrequires -x test
+# We omit the “uncertainties” extra because python-uncertainties is not yet
+# packaged.
+%pyproject_buildrequires -x numpy,test
%build
%pyproject_wheel
%install
%pyproject_install
+%pyproject_save_files pint
%check
%pytest
-%files -n python3-pint
-%license LICENSE
+%files -n python3-pint -f %{pyproject_files}
%{_bindir}/pint-convert
-%{python3_sitelib}/pint
-%{python3_sitelib}/Pint-%{version}.*
%changelog
%autochangelog
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-09-12 10:21 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-12 10:21 [rpms/python-pint] rpmlint-etc: Improve dependency generation, add extras metapackages, and finish fully porting to pyproject-rpm-macros Benjamin A. Beasley
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox