Compare commits
No commits in common. "c8s" and "stream-python27-2.7-rhel-8.9.0" have entirely different histories.
c8s
...
stream-pyt
5
.gitignore
vendored
5
.gitignore
vendored
@ -1,6 +1 @@
|
|||||||
/mock-0.7.2.tar.gz
|
|
||||||
/mock-0.8.0.tar.gz
|
|
||||||
/mock-1.0.1.tar.gz
|
|
||||||
/mock-1.3.0.tar.gz
|
|
||||||
/mock-2.0.0.tar.gz
|
/mock-2.0.0.tar.gz
|
||||||
/0001-Remove-pbr-dependency.patch
|
|
||||||
|
|||||||
72
0001-Remove-pbr-dependency.patch
Normal file
72
0001-Remove-pbr-dependency.patch
Normal file
@ -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
|
||||||
|
|
||||||
@ -1,8 +1,5 @@
|
|||||||
%if 0%{?fedora} || 0%{?rhel} > 6
|
%bcond_without python3
|
||||||
# keeping python3 subpackage as stdlib mock lives in a different namespace
|
%bcond_with tests
|
||||||
# Some people may have not fixed their imports
|
|
||||||
%global with_python3 1
|
|
||||||
%endif
|
|
||||||
|
|
||||||
# Not yet in Fedora buildroot
|
# Not yet in Fedora buildroot
|
||||||
%{!?python3_pkgversion:%global python3_pkgversion 3}
|
%{!?python3_pkgversion:%global python3_pkgversion 3}
|
||||||
@ -11,21 +8,27 @@
|
|||||||
|
|
||||||
Name: python-mock
|
Name: python-mock
|
||||||
Version: 2.0.0
|
Version: 2.0.0
|
||||||
Release: 11%{?dist}
|
Release: 13%{?dist}
|
||||||
Summary: A Python Mocking and Patching Library for Testing
|
Summary: A Python Mocking and Patching Library for Testing
|
||||||
|
|
||||||
License: BSD
|
License: BSD
|
||||||
URL: http://www.voidspace.org.uk/python/%{mod_name}/
|
URL: http://www.voidspace.org.uk/python/%{mod_name}/
|
||||||
Source0: http://pypi.python.org/packages/source/m/%{mod_name}/%{mod_name}-%{version}.tar.gz
|
Source0: https://pypi.python.org/packages/source/m/%{mod_name}/%{mod_name}-%{version}.tar.gz
|
||||||
Patch0: 0001-Remove-pbr-dependency.patch
|
Patch0: 0001-Remove-pbr-dependency.patch
|
||||||
|
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
|
BuildRequires: python2-devel
|
||||||
|
BuildRequires: python2-setuptools
|
||||||
|
BuildRequires: python2-funcsigs
|
||||||
|
|
||||||
|
%if %{with python3}
|
||||||
BuildRequires: python%{python3_pkgversion}-devel
|
BuildRequires: python%{python3_pkgversion}-devel
|
||||||
BuildRequires: python%{python3_pkgversion}-setuptools
|
BuildRequires: python%{python3_pkgversion}-setuptools
|
||||||
|
%if %{with tests}
|
||||||
# For tests
|
# For tests
|
||||||
BuildRequires: python%{python3_pkgversion}-unittest2
|
BuildRequires: python%{python3_pkgversion}-unittest2
|
||||||
BuildRequires: python%{python3_pkgversion}-six
|
%endif
|
||||||
|
%endif
|
||||||
|
|
||||||
|
|
||||||
%description
|
%description
|
||||||
@ -35,6 +38,19 @@ 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
|
arguments they were called with. You can also specify return values and set
|
||||||
needed attributes in the normal way.
|
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
|
%package -n python%{python3_pkgversion}-mock
|
||||||
Summary: A Python Mocking and Patching Library for Testing
|
Summary: A Python Mocking and Patching Library for Testing
|
||||||
%{?python_provide:%python_provide python%{python3_pkgversion}-%{mod_name}}
|
%{?python_provide:%python_provide python%{python3_pkgversion}-%{mod_name}}
|
||||||
@ -46,6 +62,7 @@ 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
|
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
|
arguments they were called with. You can also specify return values and set
|
||||||
needed attributes in the normal way.
|
needed attributes in the normal way.
|
||||||
|
%endif
|
||||||
|
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
@ -54,17 +71,34 @@ needed attributes in the normal way.
|
|||||||
sed -i "s|VERSIONPLACEHOLDER|%{version}|" setup.cfg mock/mock.py
|
sed -i "s|VERSIONPLACEHOLDER|%{version}|" setup.cfg mock/mock.py
|
||||||
|
|
||||||
%build
|
%build
|
||||||
|
%{py2_build}
|
||||||
|
%if %{with python3}
|
||||||
%{py3_build}
|
%{py3_build}
|
||||||
|
%endif
|
||||||
|
|
||||||
|
|
||||||
%check
|
%check
|
||||||
%{__python3} -m unittest
|
%if %{with tests}
|
||||||
|
%if %{with python3}
|
||||||
|
# Few failing tests but keep output
|
||||||
|
%{__python3} setup.py test ||:
|
||||||
|
%endif
|
||||||
|
%endif
|
||||||
|
|
||||||
%install
|
%install
|
||||||
|
%if %{with python3}
|
||||||
%{py3_install}
|
%{py3_install}
|
||||||
|
%endif
|
||||||
|
%{py2_install}
|
||||||
|
|
||||||
|
|
||||||
%if 0%{?with_python3}
|
%files -n python2-mock
|
||||||
|
%license LICENSE.txt
|
||||||
|
%doc docs/*
|
||||||
|
%{python2_sitelib}/*.egg-info
|
||||||
|
%{python2_sitelib}/%{mod_name}
|
||||||
|
|
||||||
|
%if %{with python3}
|
||||||
%files -n python%{python3_pkgversion}-mock
|
%files -n python%{python3_pkgversion}-mock
|
||||||
%license LICENSE.txt
|
%license LICENSE.txt
|
||||||
%doc docs/*
|
%doc docs/*
|
||||||
@ -74,12 +108,20 @@ sed -i "s|VERSIONPLACEHOLDER|%{version}|" setup.cfg mock/mock.py
|
|||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
* Wed Jul 11 2018 Petr Viktorin <pviktori@redhat.com> - 2.0.0-11
|
* Thu Apr 25 2019 Tomas Orsava <torsava@redhat.com> - 2.0.0-13
|
||||||
- Remove the Python 2 subpackage
|
- Bumping due to problems with modular RPM upgrade path
|
||||||
https://bugzilla.redhat.com/show_bug.cgi?id=1590793
|
- Resolves: rhbz#1695587
|
||||||
- Re-enable tests
|
|
||||||
|
|
||||||
* Mon Jul 09 2018 Petr Viktorin <pviktori@redhat.com> - 2.0.0-10
|
* 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
|
||||||
|
|
||||||
|
* Mon Jul 09 2018 Petr Viktorin <pviktori@redhat.com> - 2.0.0-9
|
||||||
- Drop dependency on python3-funcsigs
|
- Drop dependency on python3-funcsigs
|
||||||
(funcsigs functionality is in the Python 3 standard library -- inspect)
|
(funcsigs functionality is in the Python 3 standard library -- inspect)
|
||||||
- Drop dependency on python2-unittest2
|
- Drop dependency on python2-unittest2
|
||||||
|
|||||||
1
sources
1
sources
@ -1,2 +1 @@
|
|||||||
SHA512 (mock-2.0.0.tar.gz) = a08007651b749d2843b94f5045d74c122958888290aea21930455538a854e6b04c07115e21d82edde996154bf597d7a8784a2f4213cbabc49a98dec22dd92238
|
SHA512 (mock-2.0.0.tar.gz) = a08007651b749d2843b94f5045d74c122958888290aea21930455538a854e6b04c07115e21d82edde996154bf597d7a8784a2f4213cbabc49a98dec22dd92238
|
||||||
SHA512 (0001-Remove-pbr-dependency.patch) = 048a715b76112a1e5ba2a9b398b287cbf123bff970f9315a9bb98730e857441b35186ffc317c0bf3b215772c222b70d4a044c6669c772dd8ba8a31e427d4cb1d
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user