From 290915175d12be447f62762d35a54cd48a9ad359c25ee4635c06f8e5c9ecbdd4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mark=C3=A9ta=20Machov=C3=A1?= Date: Wed, 20 Apr 2022 11:33:02 +0000 Subject: [PATCH] Accepting request 971048 from home:pgajdos:python - do not require python-mock for build OBS-URL: https://build.opensuse.org/request/show/971048 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-snimpy?expand=0&rev=10 --- python-snimpy.changes | 5 +++++ python-snimpy.spec | 5 +++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/python-snimpy.changes b/python-snimpy.changes index 046563e..23ccb18 100644 --- a/python-snimpy.changes +++ b/python-snimpy.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Wed Apr 20 09:32:37 UTC 2022 - pgajdos@suse.com + +- do not require python-mock for build + ------------------------------------------------------------------- Sun Jun 6 12:52:43 UTC 2021 - Martin Hauke diff --git a/python-snimpy.spec b/python-snimpy.spec index c33d14e..87c8c21 100644 --- a/python-snimpy.spec +++ b/python-snimpy.spec @@ -1,7 +1,7 @@ # # spec file for package python-snimpy # -# Copyright (c) 2021 SUSE LLC +# Copyright (c) 2022 SUSE LLC # Copyright (c) 2016-2021, Martin Hauke # # All modifications and additions to the file contributed by third parties @@ -37,7 +37,6 @@ BuildRequires: libsmi-devel BuildRequires: python-rpm-macros # SECTION test requirements BuildRequires: %{python_module cffi >= 1.0.0} -BuildRequires: %{python_module mock} BuildRequires: %{python_module pycryptodomex} BuildRequires: %{python_module pysnmp >= 4} BuildRequires: %{python_module setuptools} @@ -87,6 +86,8 @@ export CFLAGS="%{optflags}" %python_clone -a %{buildroot}%{_mandir}/man1/snimpy.1 %check +# https://github.com/vincentbernat/snimpy/issues/98 +sed -i 's:import mock:from unittest import mock:' tests/test_{basictypes,main}.py %python_exec -m unittest discover tests -v %post