diff --git a/python-mock.spec b/python-mock.spec index a368445..22d94e4 100644 --- a/python-mock.spec +++ b/python-mock.spec @@ -1,19 +1,13 @@ -# keeping python3 subpackage as stdlib mock lives in a different namespace -# Some people may have not fixed their imports - -# When bootstrapping Python 3, mock is built before pytest %bcond_without tests -%global mod_name mock - Name: python-mock Version: 3.0.5 -Release: 13%{?dist} -Summary: A Python Mocking and Patching Library for Testing +Release: 14%{?dist} +Summary: Deprecated, use unittest.mock from the standard library instead License: BSD -URL: http://www.voidspace.org.uk/python/%{mod_name}/ -Source0: https://pypi.python.org/packages/source/m/%{mod_name}/%{mod_name}-%{version}.tar.gz +URL: https://github.com/testing-cabal/mock +Source0: %{url}/archive/%{version}/mock-%{version}.tar.gz BuildArch: noarch @@ -26,50 +20,59 @@ BuildRequires: python%{python3_pkgversion}-six %description -Mock is a Python module that provides a core mock class. It removes the need -to create a host of stubs throughout your test suite. After performing an -action, you can make assertions about which methods / attributes were used and -arguments they were called with. You can also specify return values and set -needed attributes in the normal way. +This is a deprecated package. + +The mock module is now part of the Python standard library, +available as unittest.mock in Python 3.3 onwards. + +https://fedoraproject.org/wiki/Changes/DeprecatePythonMock + %package -n python%{python3_pkgversion}-mock -Summary: A Python Mocking and Patching Library for Testing -%{?python_provide:%python_provide python%{python3_pkgversion}-%{mod_name}} -Requires: python3-six >= 1.9.0 +Summary: %{summary} + +# This package is deprecated, no new packages in Fedora can depend on it +# https://fedoraproject.org/wiki/Changes/DeprecatePythonMock +Provides: deprecated() %description -n python%{python3_pkgversion}-mock -Mock is a Python module that provides a core mock class. It removes the need -to create a host of stubs throughout your test suite. After performing an -action, you can make assertions about which methods / attributes were used and -arguments they were called with. You can also specify return values and set -needed attributes in the normal way. +This is a deprecated package. + +The mock module is now part of the Python standard library, +available as unittest.mock in Python 3.3 onwards. + +https://fedoraproject.org/wiki/Changes/DeprecatePythonMock %prep -%setup -q -n %{mod_name}-%{version} +%autosetup -p1 -n mock-%{version} %build -%{py3_build} +%py3_build %if %{with tests} %check -%{__python3} setup.py test +%pytest %endif %install -%{py3_install} +%py3_install %files -n python%{python3_pkgversion}-mock %license LICENSE.txt %doc README.rst %{python3_sitelib}/*.egg-info/ -%{python3_sitelib}/%{mod_name} +%{python3_sitelib}/mock/ %changelog +* Tue Feb 02 2021 Miro HronĨok - 3.0.5-14 +- Deprecate python3-mock +- https://fedoraproject.org/wiki/Changes/DeprecatePythonMock + * Wed Jan 27 2021 Fedora Release Engineering - 3.0.5-13 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild diff --git a/sources b/sources index 6e76c8b..65a38a4 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (mock-3.0.5.tar.gz) = 536ab1f0f1448373e9d75e43c6fdb0434adacf0d2cf6eecfe7e590b096c7314914d8e5c20211f196abc59ecb88eb0bf902ae01e7b06d6892e7c0be9d4e35a049 +SHA512 (mock-3.0.5.tar.gz) = 9ab4f0c794f5701ba1367d982cf79a5662d4233753d12ed9c88ae20282db1f44be73f84c4d9f6d03ff64926b8c1b6d0c9a79b2a4724a3eb36c247ffd4ab03e2d