public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/python-pint] rpmlint-etc: Unbundle python-flexcache
@ 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 : 08d98bcdf82a88e052ba07106d0d2e5f23034981
Author : Benjamin A. Beasley <code@musicinmybrain.net>
Date   : 2023-10-30T07:17:19-04:00
Stats  : +12/-9 in 1 file(s)
URL    : https://src.fedoraproject.org/rpms/python-pint/c/08d98bcdf82a88e052ba07106d0d2e5f23034981?branch=rpmlint-etc

Log:
Unbundle python-flexcache

---
diff --git a/python-pint.spec b/python-pint.spec
index c40f80d..8bc980a 100644
--- a/python-pint.spec
+++ b/python-pint.spec
@@ -5,7 +5,8 @@ Summary:        Physical quantities module
 
 # The entire source is BSD-3-Clause, except:
 #   - pint/_vendor/appdirs.py is MIT, but is unbundled in %%prep
-#   - pint/_vendor/flexcache.py is also BSD-3-Clause
+#   - pint/_vendor/flexcache.py is also BSD-3-Clause, but is unbundled in
+#     %%prep
 License:        BSD-3-Clause
 URL:            https://github.com/hgrecco/pint
 Source0:        %{pypi_source Pint}
@@ -25,11 +26,6 @@ constants.}
 %package -n python3-pint
 Summary:        %{summary}
 
-# TODO: Package this separately so it can be devendored/unbundled.
-# pint/_vendor/flexcache.py
-# https://github.com/hgrecco/flexcache
-Provides:       bundled(python3dist(flexcache)) = 0.2
-
 %description -n python3-pint %{_description}
 
 # We omit the “uncertainties” extra because python-uncertainties is not yet
@@ -51,13 +47,20 @@ sed -r -i '/pytest-cov/d' setup.cfg
 # http://github.com/ActiveState/appdirs
 # Provides:       bundled(python3dist(appdirs)) = 1.4.4
 rm -vf pint/_vendor/appdirs.py
+# Unbundle python-flexcache
+# https://github.com/hgrecco/flexcache
+# Provides:       bundled(python3dist(flexcache)) = 0.2
+rm -vf pint/_vendor/flexcache.py
 # Add devendored dependencies back in as regular dependencies
-sed -r -i 's/^setup_requires/install_requires = appdirs\n&/' setup.cfg
+sed -r -i 's/^setup_requires/install_requires = appdirs; flexcache\n&/' \
+    setup.cfg
 # The find-then-modify pattern keeps us from discarding mtimes on sources that
 # do not need modification.
 find pint -type f -exec \
-    gawk '/^from \.+_vendor import (appdirs)/ { print FILENAME; nextfile }' '{}' '+' |
-  xargs -r -t sed -r -i 's/^from \.+_vendor (import (appdirs))/\1/'
+    gawk '/^from \.+_vendor import (appdirs|flexcache)/ {
+        print FILENAME; nextfile }' '{}' '+' |
+  xargs -r -t sed -r -i \
+      's/^from \.+_vendor (import (appdirs|flexcache))/\1/'
 
 %generate_buildrequires
 # We omit the “uncertainties” extra because python-uncertainties is not yet

^ 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: Unbundle python-flexcache 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