Accepting request 974983 from devel:languages:python
OBS-URL: https://build.opensuse.org/request/show/974983 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-invocations?expand=0&rev=9
This commit is contained in:
commit
351d6c9696
57
python-invocations-no-mock.patch
Normal file
57
python-invocations-no-mock.patch
Normal file
@ -0,0 +1,57 @@
|
||||
diff -upr invocations-2.3.0.orig/tests/autodoc/base.py invocations-2.3.0/tests/autodoc/base.py
|
||||
--- invocations-2.3.0.orig/tests/autodoc/base.py 2022-05-04 14:22:40.135321552 +0200
|
||||
+++ invocations-2.3.0/tests/autodoc/base.py 2022-05-04 14:22:40.143321605 +0200
|
||||
@@ -3,7 +3,7 @@ import codecs
|
||||
import re
|
||||
import shutil
|
||||
|
||||
-from mock import Mock, patch
|
||||
+from unittest.mock import Mock, patch
|
||||
|
||||
from invoke import Context
|
||||
from invocations.autodoc import setup, TaskDocumenter
|
||||
diff -upr invocations-2.3.0.orig/tests/console.py invocations-2.3.0/tests/console.py
|
||||
--- invocations-2.3.0.orig/tests/console.py 2022-05-04 14:22:40.135321552 +0200
|
||||
+++ invocations-2.3.0/tests/console.py 2022-05-04 14:22:40.143321605 +0200
|
||||
@@ -2,7 +2,7 @@ from __future__ import unicode_literals
|
||||
|
||||
import sys
|
||||
|
||||
-from mock import patch
|
||||
+from unittest.mock import patch
|
||||
from pytest_relaxed import trap
|
||||
|
||||
from invocations.console import confirm
|
||||
diff -upr invocations-2.3.0.orig/tests/environment.py invocations-2.3.0/tests/environment.py
|
||||
--- invocations-2.3.0.orig/tests/environment.py 2022-05-04 14:22:40.135321552 +0200
|
||||
+++ invocations-2.3.0/tests/environment.py 2022-05-04 14:22:40.143321605 +0200
|
||||
@@ -1,4 +1,4 @@
|
||||
-from mock import patch
|
||||
+from unittest.mock import patch
|
||||
from pytest import mark
|
||||
|
||||
from invocations.environment import in_ci
|
||||
diff -upr invocations-2.3.0.orig/tests/packaging/release.py invocations-2.3.0/tests/packaging/release.py
|
||||
--- invocations-2.3.0.orig/tests/packaging/release.py 2022-05-04 14:22:40.135321552 +0200
|
||||
+++ invocations-2.3.0/tests/packaging/release.py 2022-05-04 14:22:40.143321605 +0200
|
||||
@@ -13,7 +13,7 @@ except ImportError:
|
||||
from lexicon import Lexicon
|
||||
from invoke import MockContext, Result, Config, Exit
|
||||
from docutils.utils import Reporter
|
||||
-from mock import Mock, patch, call
|
||||
+from unittest.mock import Mock, patch, call
|
||||
import pytest
|
||||
from pytest import skip
|
||||
from pytest_relaxed import trap, raises
|
||||
diff -upr invocations-2.3.0.orig/tests/pytest_.py invocations-2.3.0/tests/pytest_.py
|
||||
--- invocations-2.3.0.orig/tests/pytest_.py 2022-05-04 14:22:40.135321552 +0200
|
||||
+++ invocations-2.3.0/tests/pytest_.py 2022-05-04 14:22:40.143321605 +0200
|
||||
@@ -2,7 +2,7 @@ from contextlib import contextmanager
|
||||
|
||||
from invoke import MockContext
|
||||
from invocations.pytest import test, coverage
|
||||
-from mock import Mock, call
|
||||
+from unittest.mock import Mock, call
|
||||
|
||||
|
||||
@contextmanager
|
@ -1,3 +1,11 @@
|
||||
-------------------------------------------------------------------
|
||||
Wed May 4 12:25:51 UTC 2022 - pgajdos@suse.com
|
||||
|
||||
- do not require python-mock for build
|
||||
- added patches
|
||||
fix https://github.com/pyinvoke/invocations/issues/31
|
||||
+ python-invocations-no-mock.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Mar 10 06:25:34 UTC 2022 - Steve Kowalik <steven.kowalik@suse.com>
|
||||
|
||||
|
@ -27,10 +27,11 @@ URL: https://github.com/pyinvoke/invocations
|
||||
Source: https://github.com/pyinvoke/invocations/archive/%{version}.tar.gz#/invocations-%{version}.tar.gz
|
||||
Patch0: invocations-no-bundled.patch
|
||||
Patch1: invocations-py3.patch
|
||||
# https://github.com/pyinvoke/invocations/issues/31
|
||||
Patch2: python-invocations-no-mock.patch
|
||||
BuildRequires: %{python_module blessings >= 1.6}
|
||||
BuildRequires: %{python_module invoke >= 1.6}
|
||||
BuildRequires: %{python_module lexicon}
|
||||
BuildRequires: %{python_module mock}
|
||||
BuildRequires: %{python_module pytest-relaxed}
|
||||
BuildRequires: %{python_module releases >= 1.2}
|
||||
BuildRequires: %{python_module semantic_version >= 2.4}
|
||||
@ -73,9 +74,7 @@ Invocations is currently in pre-alpha status and is unsupported. Please follow
|
||||
the Invoke project's communication channels for updates. Thanks!
|
||||
|
||||
%prep
|
||||
%setup -q -n invocations-%{version}
|
||||
%patch0 -p1
|
||||
%patch1 -p1
|
||||
%autosetup -p1 -n invocations-%{version}
|
||||
|
||||
%build
|
||||
%python_build
|
||||
|
Loading…
Reference in New Issue
Block a user