Remove dependency on deprecated PyPI mock
This commit is contained in:
parent
e7f08fa506
commit
b5d4cf7b3a
@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
Name: python-%{srcname}
|
Name: python-%{srcname}
|
||||||
Version: 4.1.3
|
Version: 4.1.3
|
||||||
Release: 16%{?dist}
|
Release: 17%{?dist}
|
||||||
Summary: %{sum}
|
Summary: %{sum}
|
||||||
|
|
||||||
License: ASL 2.0
|
License: ASL 2.0
|
||||||
@ -22,7 +22,6 @@ BuildRequires: python3-devel
|
|||||||
BuildRequires: python3-setuptools
|
BuildRequires: python3-setuptools
|
||||||
BuildRequires: python3-devel
|
BuildRequires: python3-devel
|
||||||
BuildRequires: python3-fasteners
|
BuildRequires: python3-fasteners
|
||||||
BuildRequires: python3-mock
|
|
||||||
BuildRequires: python3-pyasn1 >= 0.1.7
|
BuildRequires: python3-pyasn1 >= 0.1.7
|
||||||
BuildRequires: python3-pyasn1-modules >= 0.0.5
|
BuildRequires: python3-pyasn1-modules >= 0.0.5
|
||||||
BuildRequires: python3-pytest
|
BuildRequires: python3-pytest
|
||||||
@ -58,6 +57,17 @@ rm -f docs/source/oauth2client.contrib.appengine.rst oauth2client/appengine.py
|
|||||||
# Remove keyring support
|
# Remove keyring support
|
||||||
rm oauth2client/contrib/keyring_storage.py tests/contrib/test_keyring_storage.py docs/source/oauth2client.contrib.keyring_storage.rst
|
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
|
%build
|
||||||
%py3_build
|
%py3_build
|
||||||
|
|
||||||
@ -79,6 +89,9 @@ rm -r $(find %{_buildrootdir} -type d -name 'tests') || /bin/true
|
|||||||
%{python3_sitelib}/%{srcname}*.egg-info
|
%{python3_sitelib}/%{srcname}*.egg-info
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Fri Feb 11 2022 Benjamin A. Beasley <code@musicinmybrain.net> - 4.1.3-17
|
||||||
|
- Remove dependency on deprecated PyPI mock
|
||||||
|
|
||||||
* Fri Jan 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 4.1.3-16
|
* Fri Jan 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 4.1.3-16
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user