public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Benjamin A. Beasley <code@musicinmybrain.net>
To: git-commits@fedoraproject.org
Subject: [rpms/python-pint] rpmlint-etc: Improve dependency generation, add extras metapackages, and finish fully porting to pyproject-rpm-macros
Date: Sat, 12 Sep 2026 10:21:48 GMT	[thread overview]
Message-ID: <178920850830.1.12487480062572593086.rpms-python-pint-4c7ab1ff5497@fedoraproject.org> (raw)

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

                 reply	other threads:[~2026-09-12 10:21 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=178920850830.1.12487480062572593086.rpms-python-pint-4c7ab1ff5497@fedoraproject.org \
    --to=code@musicinmybrain.net \
    --cc=git-commits@fedoraproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox