import python-mock-2.0.0-11.el8

c8 imports/c8/python-mock-2.0.0-11.el8
CentOS Sources 6 years ago committed by MSVSphere Packaging Team
commit 38ed6e4c59

1
.gitignore vendored

@ -0,0 +1 @@
SOURCES/mock-2.0.0.tar.gz

@ -0,0 +1 @@
397ed52eb2d8d4b326bc3fa6b38adda5f0b090d3 SOURCES/mock-2.0.0.tar.gz

@ -0,0 +1,72 @@
From 894204aba025609a91ad219767b88caa65d81259 Mon Sep 17 00:00:00 2001
From: Lumir Balhar <lbalhar@redhat.com>
Date: Wed, 20 Jun 2018 12:47:42 +0200
Subject: [PATCH] Remove pbr dependency
---
mock/mock.py | 6 ++----
requirements.txt | 4 ----
setup.cfg | 3 +++
setup.py | 3 +--
4 files changed, 6 insertions(+), 10 deletions(-)
diff --git a/mock/mock.py b/mock/mock.py
index c674a85..afa1105 100644
--- a/mock/mock.py
+++ b/mock/mock.py
@@ -66,11 +66,9 @@ from types import ModuleType
import six
from six import wraps
-from pbr.version import VersionInfo
-_v = VersionInfo('mock').semantic_version()
-__version__ = _v.release_string()
-version_info = _v.version_tuple()
+__version__ = 'VERSIONPLACEHOLDER'
+version_info = tuple(map(int, __version__.split('.'))) + ('final', 0)
import mock
diff --git a/requirements.txt b/requirements.txt
index 31bbe5d..bca9f9b 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -1,6 +1,2 @@
funcsigs>=1;python_version<"3.3"
-# For runtime needs this is correct. For setup_requires needs, 1.2.0 is needed
-# but setuptools can't cope with conflicts in setup_requires, so thats
-# unversioned.
-pbr>=0.11
six>=1.9
diff --git a/setup.cfg b/setup.cfg
index f5e0a02..3f7f263 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -1,5 +1,6 @@
[metadata]
name = mock
+version = VERSIONPLACEHOLDER
summary = Rolling backport of unittest.mock for all Pythons
home-page = https://github.com/testing-cabal/mock
description-file = README.rst
@@ -49,3 +50,5 @@ tag_build =
tag_date = 0
tag_svn_revision = 0
+[options]
+packages = mock
diff --git a/setup.py b/setup.py
index 5f727ae..b80f541 100755
--- a/setup.py
+++ b/setup.py
@@ -2,5 +2,4 @@
import setuptools
setuptools.setup(
- setup_requires=['pbr>=1.3', 'setuptools>=17.1'],
- pbr=True)
+ setup_requires=['setuptools>=17.1'])
--
2.17.1

@ -0,0 +1,171 @@
%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
Name: python-mock
Version: 2.0.0
Release: 11%{?dist}
Summary: A Python Mocking and Patching Library for Testing
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
BuildArch: noarch
BuildRequires: python%{python3_pkgversion}-devel
BuildRequires: python%{python3_pkgversion}-setuptools
# For tests
BuildRequires: python%{python3_pkgversion}-unittest2
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.
%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
%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.
%prep
%setup -q -n %{mod_name}-%{version}
%patch0 -p1
sed -i "s|VERSIONPLACEHOLDER|%{version}|" setup.cfg mock/mock.py
%build
%{py3_build}
%check
%{__python3} -m unittest
%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
%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
* 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)
- Fix python2 requires names
* Mon Jun 25 2018 Lumír Balhar <lbalhar@redhat.com> - 2.0.0-9
- Allow build with Python 2
* Wed Jun 20 2018 Lumír Balhar <lbalhar@redhat.com> - 2.0.0-8
- Add patch to remove dependency on pbr
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.0-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
* Tue Oct 10 2017 Troy Dawson <tdawson@redhat.com> - 2.0.0-6
- Cleanup spec file conditionals
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.0-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.0-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
* Fri Dec 09 2016 Charalampos Stratakis <cstratak@redhat.com> - 2.0.0-3
- Rebuild for Python 3.6
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.0.0-2
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
* Tue Jun 14 2016 Praveen Kumar <kumarpraveen.nitdgp@gmail.com> - 2.0.0-1
- Upstream 2.0.0 (RHBZ#1244145)
* Fri Feb 26 2016 Haïkel Guémar <hguemar@fedoraproject.org> - 1.3.0-1
- Upstream 1.3.0 (RHBZ#1244145)
- Use epel macros rather than rhel
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.1-10
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
* Wed Jan 6 2016 Orion Poplawski <orion@cora.nwra.com> - 1.0.1-9
- Modernize spec
- Run python2 tests, python3 failing
* Thu Nov 12 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.1-8
- Rebuilt for https://fedoraproject.org/wiki/Changes/python3.5
* Mon Nov 02 2015 Praveen Kumar <kumarpraveen.nitdgp@gmail.com> 1.0.1-7
- Fix #1276771
* Wed Sep 23 2015 Robert Kuska <rkuska@redhat.com> - 1.0.1-6
- Rebuilt for Python3.5 rebuild
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.1-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.1-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
* Fri May 09 2014 Dennis Gilmore <dennis@ausil.us> - 1.0.1-3
- rebuild for python 3.4
- disable test suite deps missing
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
* Thu Apr 11 2013 Luke Macken <lmacken@redhat.com> - 1.0.1-1
- Update to 1.0.1
- Run the test suite
- Add python-unittest2 as a build requirement
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.8.0-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
* Sat Aug 04 2012 David Malcolm <dmalcolm@redhat.com> - 0.8.0-4
- rebuild for https://fedoraproject.org/wiki/Features/Python_3.3
* Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.8.0-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
* Mon Jul 09 2012 Ralph Bean <rbean@redhat.com> - 0.8.0-2
- Python3 support
* Thu Mar 22 2012 Praveen Kumar <kumarpraveen.nitdgp@gmail.com> - 0.8.0-1
- Updated to new version
* Fri Jul 22 2011 Praveen Kumar <kumarpraveen.nitdgp@gmail.com> - 0.7.2-1
- Initial RPM release
Loading…
Cancel
Save