|
|
|
@ -1,97 +1,210 @@
|
|
|
|
|
%if 0%{?fedora} || 0%{?rhel} > 6
|
|
|
|
|
# keeping python3 subpackage as stdlib mock lives in a different namespace
|
|
|
|
|
# Some people may have not fixed their imports
|
|
|
|
|
%global with_python3 1
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
# Not yet in Fedora buildroot
|
|
|
|
|
%{!?python3_pkgversion:%global python3_pkgversion 3}
|
|
|
|
|
|
|
|
|
|
%global mod_name mock
|
|
|
|
|
## START: Set by rpmautospec
|
|
|
|
|
## (rpmautospec version 0.6.5)
|
|
|
|
|
## RPMAUTOSPEC: autorelease, autochangelog
|
|
|
|
|
%define autorelease(e:s:pb:n) %{?-p:0.}%{lua:
|
|
|
|
|
release_number = 17;
|
|
|
|
|
base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}"));
|
|
|
|
|
print(release_number + base_release_number - 1);
|
|
|
|
|
}%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{!?-n:%{?dist}}
|
|
|
|
|
## END: Set by rpmautospec
|
|
|
|
|
|
|
|
|
|
%bcond_without tests
|
|
|
|
|
|
|
|
|
|
Name: python-mock
|
|
|
|
|
Version: 2.0.0
|
|
|
|
|
Release: 11%{?dist}
|
|
|
|
|
Summary: A Python Mocking and Patching Library for Testing
|
|
|
|
|
Version: 4.0.3
|
|
|
|
|
Release: %autorelease
|
|
|
|
|
Summary: Deprecated, use unittest.mock from the standard library instead
|
|
|
|
|
|
|
|
|
|
License: BSD-2-Clause
|
|
|
|
|
URL: https://github.com/testing-cabal/mock
|
|
|
|
|
Source0: %{url}/archive/%{version}/mock-%{version}.tar.gz
|
|
|
|
|
|
|
|
|
|
License: BSD
|
|
|
|
|
URL: http://www.voidspace.org.uk/python/%{mod_name}/
|
|
|
|
|
Source0: http://pypi.python.org/packages/source/m/%{mod_name}/%{mod_name}-%{version}.tar.gz
|
|
|
|
|
Patch0: 0001-Remove-pbr-dependency.patch
|
|
|
|
|
# Fix tests that should test mock but were testing unittest.mock
|
|
|
|
|
# Merged upstream
|
|
|
|
|
Patch1: %{url}/commit/f3e3d82aab.patch
|
|
|
|
|
|
|
|
|
|
BuildArch: noarch
|
|
|
|
|
|
|
|
|
|
BuildRequires: python%{python3_pkgversion}-devel
|
|
|
|
|
BuildRequires: python%{python3_pkgversion}-setuptools
|
|
|
|
|
# For tests
|
|
|
|
|
BuildRequires: python%{python3_pkgversion}-unittest2
|
|
|
|
|
%if %{with tests}
|
|
|
|
|
BuildRequires: python%{python3_pkgversion}-pytest
|
|
|
|
|
BuildRequires: python%{python3_pkgversion}-six
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%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}
|
|
|
|
|
%patch0 -p1
|
|
|
|
|
sed -i "s|VERSIONPLACEHOLDER|%{version}|" setup.cfg mock/mock.py
|
|
|
|
|
%autosetup -p1 -n mock-%{version}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%build
|
|
|
|
|
%{py3_build}
|
|
|
|
|
%py3_build
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%if %{with tests}
|
|
|
|
|
%check
|
|
|
|
|
%{__python3} -m unittest
|
|
|
|
|
%pytest
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%install
|
|
|
|
|
%{py3_install}
|
|
|
|
|
%py3_install
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%if 0%{?with_python3}
|
|
|
|
|
%files -n python%{python3_pkgversion}-mock
|
|
|
|
|
%license LICENSE.txt
|
|
|
|
|
%doc docs/*
|
|
|
|
|
%{python3_sitelib}/*.egg-info
|
|
|
|
|
%{python3_sitelib}/%{mod_name}
|
|
|
|
|
%endif
|
|
|
|
|
%doc README.rst
|
|
|
|
|
%{python3_sitelib}/*.egg-info/
|
|
|
|
|
%{python3_sitelib}/mock/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%changelog
|
|
|
|
|
* Wed Jul 11 2018 Petr Viktorin <pviktori@redhat.com> - 2.0.0-11
|
|
|
|
|
- Remove the Python 2 subpackage
|
|
|
|
|
https://bugzilla.redhat.com/show_bug.cgi?id=1590793
|
|
|
|
|
- Re-enable tests
|
|
|
|
|
* Sun Jan 05 2025 Arkady L. Shane <tigro@msvsphere-os.ru> - 4.0.3-17
|
|
|
|
|
- Rebuilt for MSVSphere 10
|
|
|
|
|
|
|
|
|
|
## START: Generated by rpmautospec
|
|
|
|
|
* Fri Jul 19 2024 Fedora Release Engineering <releng@fedoraproject.org> - 4.0.3-17
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
* Fri Jun 07 2024 Python Maint <python-maint@redhat.com> - 4.0.3-16
|
|
|
|
|
- Rebuilt for Python 3.13
|
|
|
|
|
|
|
|
|
|
* Fri Jun 07 2024 Python Maint <python-maint@redhat.com> - 4.0.3-15
|
|
|
|
|
- Bootstrap for Python 3.13
|
|
|
|
|
|
|
|
|
|
* Fri Jan 26 2024 Fedora Release Engineering <releng@fedoraproject.org> - 4.0.3-12
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
* Mon Jan 22 2024 Fedora Release Engineering <releng@fedoraproject.org> - 4.0.3-11
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
* Fri Jul 21 2023 Fedora Release Engineering <releng@fedoraproject.org> - 4.0.3-10
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
* Fri Jun 16 2023 Python Maint <python-maint@redhat.com> - 4.0.3-9
|
|
|
|
|
- Rebuilt for Python 3.12
|
|
|
|
|
|
|
|
|
|
* Tue Jun 13 2023 Python Maint <python-maint@redhat.com> - 4.0.3-8
|
|
|
|
|
- Bootstrap for Python 3.12
|
|
|
|
|
|
|
|
|
|
* Sun Mar 12 2023 Tim Orling <ticotimo@gmail.com> - 4.0.3-7
|
|
|
|
|
- migrated to SPDX license
|
|
|
|
|
|
|
|
|
|
* Fri Jan 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 4.0.3-6
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
* Fri Jul 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 4.0.3-5
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
* Mon Jul 09 2018 Petr Viktorin <pviktori@redhat.com> - 2.0.0-10
|
|
|
|
|
- Drop dependency on python3-funcsigs
|
|
|
|
|
(funcsigs functionality is in the Python 3 standard library -- inspect)
|
|
|
|
|
- Drop dependency on python2-unittest2
|
|
|
|
|
(Not available in the distro)
|
|
|
|
|
* Mon Jun 13 2022 Python Maint <python-maint@redhat.com> - 4.0.3-4
|
|
|
|
|
- Rebuilt for Python 3.11
|
|
|
|
|
|
|
|
|
|
- Fix python2 requires names
|
|
|
|
|
* Mon Jun 13 2022 Python Maint <python-maint@redhat.com> - 4.0.3-3
|
|
|
|
|
- Bootstrap for Python 3.11
|
|
|
|
|
|
|
|
|
|
* Mon Jun 25 2018 Lumír Balhar <lbalhar@redhat.com> - 2.0.0-9
|
|
|
|
|
- Allow build with Python 2
|
|
|
|
|
* Fri Jan 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 4.0.3-2
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
* Wed Jun 20 2018 Lumír Balhar <lbalhar@redhat.com> - 2.0.0-8
|
|
|
|
|
- Add patch to remove dependency on pbr
|
|
|
|
|
* Thu Jan 06 2022 Miro Hrončok <mhroncok@redhat.com> - 4.0.3-1
|
|
|
|
|
- Update to 4.0.3 for Python 3.11 support
|
|
|
|
|
- Fixes: rhbz#2019006
|
|
|
|
|
|
|
|
|
|
* Fri Jul 23 2021 Fedora Release Engineering <releng@fedoraproject.org> - 3.0.5-17
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
* Wed Jun 02 2021 Python Maint <python-maint@redhat.com> - 3.0.5-16
|
|
|
|
|
- Rebuilt for Python 3.10
|
|
|
|
|
|
|
|
|
|
* Wed Jun 02 2021 Python Maint <python-maint@redhat.com> - 3.0.5-15
|
|
|
|
|
- Bootstrap for Python 3.10
|
|
|
|
|
|
|
|
|
|
* Tue Feb 02 2021 Miro Hrončok <mhroncok@redhat.com> - 3.0.5-14
|
|
|
|
|
- Deprecate python3-mock
|
|
|
|
|
- https://fedoraproject.org/wiki/Changes/DeprecatePythonMock
|
|
|
|
|
|
|
|
|
|
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 3.0.5-13
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
* Mon Dec 07 2020 Miro Hrončok <mhroncok@redhat.com> - 3.0.5-12
|
|
|
|
|
- BuildRequire six to fix a build failure
|
|
|
|
|
|
|
|
|
|
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 3.0.5-11
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
* Fri May 22 2020 Miro Hrončok <mhroncok@redhat.com> - 3.0.5-10
|
|
|
|
|
- Rebuilt for Python 3.9
|
|
|
|
|
|
|
|
|
|
* Fri May 22 2020 Miro Hrončok <mhroncok@redhat.com> - 3.0.5-9
|
|
|
|
|
- Bootstrap for Python 3.9
|
|
|
|
|
|
|
|
|
|
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 3.0.5-8
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
* Thu Nov 28 2019 Miro Hrončok <mhroncok@redhat.com> - 3.0.5-7
|
|
|
|
|
- Subpackage python2-mock has been removed
|
|
|
|
|
See https://fedoraproject.org/wiki/Changes/Mass_Python_2_Package_Removal
|
|
|
|
|
|
|
|
|
|
* Fri Nov 01 2019 Petr Viktorin <pviktori@redhat.com> - 3.0.5-6
|
|
|
|
|
- Remove unused dependencies on pbr
|
|
|
|
|
The current version of Mock does not use pbr.
|
|
|
|
|
|
|
|
|
|
* Thu Oct 03 2019 Miro Hrončok <mhroncok@redhat.com> - 3.0.5-5
|
|
|
|
|
- Rebuilt for Python 3.8.0rc1 (#1748018)
|
|
|
|
|
|
|
|
|
|
* Thu Aug 15 2019 Miro Hrončok <mhroncok@redhat.com> - 3.0.5-4
|
|
|
|
|
- Rebuilt for Python 3.8
|
|
|
|
|
|
|
|
|
|
* Wed Aug 14 2019 Miro Hrončok <mhroncok@redhat.com> - 3.0.5-3
|
|
|
|
|
- Bootstrap for Python 3.8
|
|
|
|
|
|
|
|
|
|
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 3.0.5-2
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
* Mon Jul 08 2019 Yatin Karel <ykarel@redhat.com> - 3.0.5-1
|
|
|
|
|
- Update to 3.0.5 (RHBZ#1721075)
|
|
|
|
|
|
|
|
|
|
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.0-13
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
* Fri Oct 26 2018 Petr Viktorin <pviktori@redhat.com> - 2.0.0-12
|
|
|
|
|
- Run tests for Python 3
|
|
|
|
|
|
|
|
|
|
* Fri Aug 17 2018 Miro Hrončok <mhroncok@redhat.com> - 2.0.0-11
|
|
|
|
|
- Don't require funcsigs on python3, it's part of the standard library
|
|
|
|
|
|
|
|
|
|
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.0-10
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
* Wed Jun 13 2018 Miro Hrončok <mhroncok@redhat.com> - 2.0.0-9
|
|
|
|
|
- Rebuilt for Python 3.7
|
|
|
|
|
|
|
|
|
|
* Fri Mar 09 2018 Iryna Shcherbina <ishcherb@redhat.com> - 2.0.0-8
|
|
|
|
|
- Update Python 2 dependency declarations to new packaging standards
|
|
|
|
|
(See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3)
|
|
|
|
|
|
|
|
|
|
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.0-7
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
|
|
|
|
@ -169,3 +282,5 @@ sed -i "s|VERSIONPLACEHOLDER|%{version}|" setup.cfg mock/mock.py
|
|
|
|
|
|
|
|
|
|
* Fri Jul 22 2011 Praveen Kumar <kumarpraveen.nitdgp@gmail.com> - 0.7.2-1
|
|
|
|
|
- Initial RPM release
|
|
|
|
|
|
|
|
|
|
## END: Generated by rpmautospec
|
|
|
|
|