diff --git a/python-fido2-no-mock.patch b/python-fido2-no-mock.patch new file mode 100644 index 0000000..42d7348 --- /dev/null +++ b/python-fido2-no-mock.patch @@ -0,0 +1,52 @@ +Index: fido2-0.9.3/test/test_client.py +=================================================================== +--- fido2-0.9.3.orig/test/test_client.py 2021-11-09 11:45:37.000000000 +0100 ++++ fido2-0.9.3/test/test_client.py 2022-03-21 11:33:24.574736097 +0100 +@@ -29,7 +29,7 @@ + + from __future__ import absolute_import, unicode_literals + +-import mock ++import unittest.mock as mock + import unittest + from threading import Event, Timer + from binascii import a2b_hex +Index: fido2-0.9.3/test/test_ctap1.py +=================================================================== +--- fido2-0.9.3.orig/test/test_ctap1.py 2021-11-09 11:45:37.000000000 +0100 ++++ fido2-0.9.3/test/test_ctap1.py 2022-03-21 11:33:53.026894591 +0100 +@@ -30,7 +30,7 @@ from __future__ import absolute_import, + from fido2.ctap1 import Ctap1, ApduError + from binascii import a2b_hex + import unittest +-import mock ++import unittest.mock as mock + + + class TestCtap1(unittest.TestCase): +Index: fido2-0.9.3/test/test_ctap2.py +=================================================================== +--- fido2-0.9.3.orig/test/test_ctap2.py 2021-11-09 11:45:37.000000000 +0100 ++++ fido2-0.9.3/test/test_ctap2.py 2022-03-21 11:34:20.103045403 +0100 +@@ -45,7 +45,7 @@ from cryptography.hazmat.backends import + from cryptography.hazmat.primitives.asymmetric import ec + + import unittest +-import mock ++import unittest.mock as mock + + _AAGUID = a2b_hex("F8A011F38C0A4D15800617111F9EDC7D") + _INFO = a2b_hex( +Index: fido2-0.9.3/test/test_pcsc.py +=================================================================== +--- fido2-0.9.3.orig/test/test_pcsc.py 2021-11-09 11:45:37.000000000 +0100 ++++ fido2-0.9.3/test/test_pcsc.py 2022-03-21 11:34:37.963144879 +0100 +@@ -28,7 +28,7 @@ + from __future__ import absolute_import, unicode_literals + + import unittest +-import mock ++import unittest.mock as mock + import sys + from fido2.hid import CTAPHID + diff --git a/python-fido2.changes b/python-fido2.changes index 05d7886..c5a1f51 100644 --- a/python-fido2.changes +++ b/python-fido2.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Mon Mar 21 10:44:41 UTC 2022 - pgajdos@suse.com + +- do not require mock for build +- added patches + fix https://github.com/Yubico/python-fido2/issues/135 + + python-fido2-no-mock.patch + ------------------------------------------------------------------- Sat Jan 15 17:34:13 UTC 2022 - Dirk Müller diff --git a/python-fido2.spec b/python-fido2.spec index 5cc8c0d..2e57113 100644 --- a/python-fido2.spec +++ b/python-fido2.spec @@ -27,8 +27,9 @@ Group: Development/Languages/Python URL: https://github.com/Yubico/python-fido2 Source0: https://github.com/Yubico/python-fido2/releases/download/%{version}/fido2-%{version}.tar.gz Source1: https://github.com/Yubico/python-fido2/releases/download/%{version}/fido2-%{version}.tar.gz.sig +# https://github.com/Yubico/python-fido2/issues/135 +Patch0: python-fido2-no-mock.patch BuildRequires: %{python_module cryptography >= 1.5} -BuildRequires: %{python_module mock >= 1.0.1} BuildRequires: %{python_module pyfakefs >= 3.4} BuildRequires: %{python_module setuptools} BuildRequires: %{python_module six}