Update to 0.19 (fix RHBZ#2137292, fix RHBZ#2220407)

- Unbundle python-appdirs and document bundled python-flexcache

This is the first upstream release that is compatible with numpy in F37
and later.
This commit is contained in:
Benjamin A. Beasley
2023-10-30 07:14:08 -04:00
parent 6cb08795c1
commit a246b59559
3 changed files with 23 additions and 2 deletions
+21 -1
View File
@@ -1,8 +1,11 @@
Name: python-pint
Version: 0.17
Version: 0.19
Release: %autorelease
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
License: BSD-3-Clause
URL: https://github.com/hgrecco/pint
Source0: %{pypi_source Pint}
@@ -22,6 +25,11 @@ 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
@@ -58,6 +66,18 @@ rm -rvf docs/_themes
# https://docs.fedoraproject.org/en-US/packaging-guidelines/Python/#_linters
sed -r -i '/pytest-cov/d' setup.cfg
# Unbundle python-appdirs
# http://github.com/ActiveState/appdirs
# Provides: bundled(python3dist(appdirs)) = 1.4.4
rm -vf pint/_vendor/appdirs.py
# Add devendored dependencies back in as regular dependencies
sed -r -i 's/^setup_requires/install_requires = appdirs\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/'
%generate_buildrequires
# We omit the “uncertainties” extra because python-uncertainties is not yet
# packaged.