Compare commits

...

No commits in common. 'i8c-beta-stream-2.7' and 'c8' have entirely different histories.

@ -1,5 +1,8 @@
%bcond_without python3
%bcond_with tests
%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}
@ -8,27 +11,21 @@
Name: python-mock
Version: 2.0.0
Release: 13%{?dist}
Release: 11%{?dist}
Summary: A Python Mocking and Patching Library for Testing
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
Source0: http://pypi.python.org/packages/source/m/%{mod_name}/%{mod_name}-%{version}.tar.gz
Patch0: 0001-Remove-pbr-dependency.patch
BuildArch: noarch
BuildRequires: python2-devel
BuildRequires: python2-setuptools
BuildRequires: python2-funcsigs
%if %{with python3}
BuildRequires: python%{python3_pkgversion}-devel
BuildRequires: python%{python3_pkgversion}-setuptools
%if %{with tests}
# For tests
BuildRequires: python%{python3_pkgversion}-unittest2
%endif
%endif
BuildRequires: python%{python3_pkgversion}-six
%description
@ -38,19 +35,6 @@ 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.
%package -n python2-mock
Summary: A Python Mocking and Patching Library for Testing
%{?python_provide:%python_provide python2-%{mod_name}}
Requires: python2-funcsigs
Requires: python2-six >= 1.9.0
%description -n python2-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
%if %{with python3}
%package -n python%{python3_pkgversion}-mock
Summary: A Python Mocking and Patching Library for Testing
%{?python_provide:%python_provide python%{python3_pkgversion}-%{mod_name}}
@ -62,7 +46,6 @@ 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.
%endif
%prep
@ -71,34 +54,17 @@ needed attributes in the normal way.
sed -i "s|VERSIONPLACEHOLDER|%{version}|" setup.cfg mock/mock.py
%build
%{py2_build}
%if %{with python3}
%{py3_build}
%endif
%check
%if %{with tests}
%if %{with python3}
# Few failing tests but keep output
%{__python3} setup.py test ||:
%endif
%endif
%{__python3} -m unittest
%install
%if %{with python3}
%{py3_install}
%endif
%{py2_install}
%files -n python2-mock
%license LICENSE.txt
%doc docs/*
%{python2_sitelib}/*.egg-info
%{python2_sitelib}/%{mod_name}
%if %{with python3}
%if 0%{?with_python3}
%files -n python%{python3_pkgversion}-mock
%license LICENSE.txt
%doc docs/*
@ -108,23 +74,12 @@ sed -i "s|VERSIONPLACEHOLDER|%{version}|" setup.cfg mock/mock.py
%changelog
* Wed Apr 03 2024 MSVSphere Packaging Team <packager@msvsphere-os.ru> - 2.0.0-13
- Rebuilt for MSVSphere 8.10 beta
* Thu Apr 25 2019 Tomas Orsava <torsava@redhat.com> - 2.0.0-13
- Bumping due to problems with modular RPM upgrade path
- Resolves: rhbz#1695587
* Tue Jul 31 2018 Lumír Balhar <lbalhar@redhat.com> - 2.0.0-12
- Switch python3 coditions to bcond
* Sun Jul 15 2018 Lumír Balhar <lbalhar@redhat.com> - 2.0.0-11
- Enable Python 3 subpackage and disabled tests
* Fri Jul 13 2018 Lumír Balhar <lbalhar@redhat.com> - 2.0.0-10
- First version for python27 module
* 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
* Mon Jul 09 2018 Petr Viktorin <pviktori@redhat.com> - 2.0.0-9
* 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

Loading…
Cancel
Save