Accepting request 974868 from devel:languages:python
OBS-URL: https://build.opensuse.org/request/show/974868 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-sure?expand=0&rev=9
This commit is contained in:
commit
95e12437a3
23
python-sure-no-mock.patch
Normal file
23
python-sure-no-mock.patch
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
--- a/sure/core.py
|
||||||
|
+++ b/sure/core.py
|
||||||
|
@@ -21,7 +21,10 @@
|
||||||
|
try:
|
||||||
|
from mock import _CallList
|
||||||
|
except ImportError:
|
||||||
|
- from mock.mock import _CallList
|
||||||
|
+ try:
|
||||||
|
+ from mock.mock import _CallList
|
||||||
|
+ except ImportError:
|
||||||
|
+ from unittest.mock import _CallList
|
||||||
|
|
||||||
|
import inspect
|
||||||
|
from six import (
|
||||||
|
@@ -40,6 +43,7 @@ class Anything(object):
|
||||||
|
def __eq__(self, _):
|
||||||
|
return True
|
||||||
|
|
||||||
|
+
|
||||||
|
anything = Anything()
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -1,3 +1,11 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed May 4 08:38:45 UTC 2022 - pgajdos@suse.com
|
||||||
|
|
||||||
|
- do not require mock for build nor runtime
|
||||||
|
- added patches
|
||||||
|
fix https://github.com/gabrielfalcao/sure/pull/161
|
||||||
|
+ python-sure-no-mock.patch
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Sun Dec 12 16:15:50 UTC 2021 - Ben Greiner <code@bnavigator.de>
|
Sun Dec 12 16:15:50 UTC 2021 - Ben Greiner <code@bnavigator.de>
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# spec file for package python-sure
|
# spec file for package python-sure
|
||||||
#
|
#
|
||||||
# Copyright (c) 2021 SUSE LLC
|
# Copyright (c) 2022 SUSE LLC
|
||||||
#
|
#
|
||||||
# All modifications and additions to the file contributed by third parties
|
# All modifications and additions to the file contributed by third parties
|
||||||
# remain the property of their copyright owners, unless otherwise agreed
|
# remain the property of their copyright owners, unless otherwise agreed
|
||||||
@ -25,14 +25,14 @@ License: GPL-3.0-or-later
|
|||||||
Group: Development/Languages/Python
|
Group: Development/Languages/Python
|
||||||
URL: https://github.com/gabrielfalcao/sure
|
URL: https://github.com/gabrielfalcao/sure
|
||||||
Source: https://files.pythonhosted.org/packages/source/s/sure/sure-%{version}.tar.gz
|
Source: https://files.pythonhosted.org/packages/source/s/sure/sure-%{version}.tar.gz
|
||||||
|
# https://github.com/gabrielfalcao/sure/pull/161
|
||||||
|
Patch0: python-sure-no-mock.patch
|
||||||
BuildRequires: %{python_module mock >= 2.0.0}
|
BuildRequires: %{python_module mock >= 2.0.0}
|
||||||
BuildRequires: %{python_module pytest}
|
BuildRequires: %{python_module pytest}
|
||||||
BuildRequires: %{python_module setuptools}
|
BuildRequires: %{python_module setuptools}
|
||||||
BuildRequires: %{python_module six >= 1.10.0}
|
BuildRequires: %{python_module six >= 1.10.0}
|
||||||
BuildRequires: fdupes
|
BuildRequires: fdupes
|
||||||
BuildRequires: python-rpm-macros
|
BuildRequires: python-rpm-macros
|
||||||
# regarding mock: https://github.com/gabrielfalcao/sure/pull/161
|
|
||||||
Requires: python-mock >= 2.0.0
|
|
||||||
Requires: python-six >= 1.10.0
|
Requires: python-six >= 1.10.0
|
||||||
Requires(post): update-alternatives
|
Requires(post): update-alternatives
|
||||||
Requires(postun):update-alternatives
|
Requires(postun):update-alternatives
|
||||||
@ -45,6 +45,7 @@ heavily inspired by should.js
|
|||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n sure-%{version}
|
%setup -q -n sure-%{version}
|
||||||
|
%patch0 -p1
|
||||||
sed -i '/^#!/d' sure/*.py
|
sed -i '/^#!/d' sure/*.py
|
||||||
sed -i 's/--cov=sure//' setup.cfg
|
sed -i 's/--cov=sure//' setup.cfg
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user