diff --git a/python-oauth2client.spec b/python-oauth2client.spec index e704fb2..e7128b2 100644 --- a/python-oauth2client.spec +++ b/python-oauth2client.spec @@ -5,7 +5,7 @@ Name: python-%{srcname} Version: 4.1.3 -Release: 16%{?dist} +Release: 17%{?dist} Summary: %{sum} License: ASL 2.0 @@ -22,7 +22,6 @@ BuildRequires: python3-devel BuildRequires: python3-setuptools BuildRequires: python3-devel BuildRequires: python3-fasteners -BuildRequires: python3-mock BuildRequires: python3-pyasn1 >= 0.1.7 BuildRequires: python3-pyasn1-modules >= 0.0.5 BuildRequires: python3-pytest @@ -58,6 +57,17 @@ rm -f docs/source/oauth2client.contrib.appengine.rst oauth2client/appengine.py # Remove keyring support rm oauth2client/contrib/keyring_storage.py tests/contrib/test_keyring_storage.py docs/source/oauth2client.contrib.keyring_storage.rst +# Remove deprecated PyPI mock dependency, replacing it with unittest.mock. See +# https://fedoraproject.org/wiki/Changes/DeprecatePythonMock. Since +# oauth2client is deprecated/archived upstream, this patch must be +# downstream-only. The find-then-modify pattern keeps us from discarding mtimes +# on any sources that do not need modification. +find docs tests -type f \( -name '*.py' -o -name '*.py.doc' \) -exec \ + gawk '/^import mock$/ { print FILENAME; nextfile }' '{}' '+' | + xargs -r -t sed -r -i 's/^import mock$/from unittest &/' +sed -r -i 's/\bmock.*//' tox.ini + + %build %py3_build @@ -79,6 +89,9 @@ rm -r $(find %{_buildrootdir} -type d -name 'tests') || /bin/true %{python3_sitelib}/%{srcname}*.egg-info %changelog +* Fri Feb 11 2022 Benjamin A. Beasley - 4.1.3-17 +- Remove dependency on deprecated PyPI mock + * Fri Jan 21 2022 Fedora Release Engineering - 4.1.3-16 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild