diff --git a/python-smpplib-no-mock.patch b/python-smpplib-no-mock.patch new file mode 100644 index 0000000..acbab58 --- /dev/null +++ b/python-smpplib-no-mock.patch @@ -0,0 +1,22 @@ +diff -upr python-smpplib-2.2.1.orig/smpplib/tests/test_client.py python-smpplib-2.2.1/smpplib/tests/test_client.py +--- python-smpplib-2.2.1.orig/smpplib/tests/test_client.py 2022-05-04 09:38:34.127959320 +0200 ++++ python-smpplib-2.2.1/smpplib/tests/test_client.py 2022-05-04 09:38:34.147959444 +0200 +@@ -1,6 +1,6 @@ + import warnings + import pytest +-from mock import Mock, call ++from unittest.mock import Mock, call + + from smpplib.client import Client + from smpplib.smpp import make_pdu +diff -upr python-smpplib-2.2.1.orig/smpplib/tests/test_gsm.py python-smpplib-2.2.1/smpplib/tests/test_gsm.py +--- python-smpplib-2.2.1.orig/smpplib/tests/test_gsm.py 2022-05-04 09:38:34.127959320 +0200 ++++ python-smpplib-2.2.1/smpplib/tests/test_gsm.py 2022-05-04 09:38:34.147959444 +0200 +@@ -1,6 +1,6 @@ + # -*- coding: utf8 -*- + +-import mock ++from unittest import mock + from pytest import mark, raises + + from smpplib import consts diff --git a/python-smpplib.changes b/python-smpplib.changes index 7070482..c9f5813 100644 --- a/python-smpplib.changes +++ b/python-smpplib.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Wed May 4 07:55:32 UTC 2022 - pgajdos@suse.com + +- added patches + fix https://github.com/python-smpplib/python-smpplib/issues/200 + + python-smpplib-no-mock.patch + ------------------------------------------------------------------- Mon Nov 22 11:07:55 UTC 2021 - Martin Hauke diff --git a/python-smpplib.spec b/python-smpplib.spec index 56178fd..d94f277 100644 --- a/python-smpplib.spec +++ b/python-smpplib.spec @@ -1,7 +1,7 @@ # # spec file for package python-smpplib # -# 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 @@ -27,12 +27,13 @@ Group: Development/Languages/Python URL: https://pypi.org/project/smpplib/ #Git-Clone: https://github.com/python-smpplib/python-smpplib.git Source: https://github.com/python-smpplib/python-smpplib/archive/%{version}.tar.gz#/smpplib-%{version}.tar.gz +# https://github.com/python-smpplib/python-smpplib/issues/200 +Patch0: python-smpplib-no-mock.patch BuildRequires: %{python_module setuptools} BuildRequires: %{python_module six} BuildRequires: python-rpm-macros # SECTION test requirements BuildRequires: %{python_module pytest} -BuildRequires: %{python_module mock} # /SECTION BuildRequires: fdupes Requires: python-six @@ -47,6 +48,7 @@ allows you to send and receive SMS to an SMS gateway or SMSC. %prep %setup -q -n python-smpplib-%{version} +%patch0 -p1 %build %python_build