From e035807fa72853000d053d21efce4d587f840bcb30b7a9441d37196d363e6d22 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mark=C3=A9ta=20Machov=C3=A1?= Date: Thu, 14 Apr 2022 09:01:07 +0000 Subject: [PATCH] Accepting request 970088 from home:pgajdos:python - do not require python-mock for build OBS-URL: https://build.opensuse.org/request/show/970088 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-rq?expand=0&rev=17 --- python-rq.changes | 5 +++++ python-rq.spec | 6 +++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/python-rq.changes b/python-rq.changes index 2a7d4cf..0a2de6e 100644 --- a/python-rq.changes +++ b/python-rq.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Thu Apr 14 08:52:04 UTC 2022 - pgajdos@suse.com + +- do not require python-mock for build + ------------------------------------------------------------------- Mon Jan 17 18:35:11 UTC 2022 - Marcus Rueckert diff --git a/python-rq.spec b/python-rq.spec index ae87b5b..c480587 100644 --- a/python-rq.spec +++ b/python-rq.spec @@ -29,7 +29,6 @@ Group: Development/Languages/Python URL: https://github.com/rq/rq Source: https://github.com/rq/rq/archive/v%{version}/%{mod_name}-%{version}.tar.gz BuildRequires: %{python_module click >= 5.0.0} -BuildRequires: %{python_module mock} BuildRequires: %{python_module psutil} BuildRequires: %{python_module pytest} BuildRequires: %{python_module redis >= 3.5.0} @@ -63,6 +62,11 @@ integrated into web stacks. %python_expand %fdupes %{buildroot}%{$python_sitelib} %check +# https://github.com/rq/rq/issues/1646 +sed -i -e 's:import mock:from unittest import mock:' \ + -e 's:from mock.mock:from unittest.mock:' \ + -e 's:from mock import:from unittest.mock import:' \ + tests/test_*.py # test_failure_capture - circular dependency on sentry-sdk # test_worker - update-alternatives: only rqworker-%{python_version} is # available, skip test for simplicity