diff --git a/python-vncdotool-no-mock.patch b/python-vncdotool-no-mock.patch new file mode 100644 index 0000000..8972523 --- /dev/null +++ b/python-vncdotool-no-mock.patch @@ -0,0 +1,23 @@ +diff -upr vncdotool-1.0.0.orig/tests/unit/test_client.py vncdotool-1.0.0/tests/unit/test_client.py +--- vncdotool-1.0.0.orig/tests/unit/test_client.py 2022-05-04 10:04:29.137528294 +0200 ++++ vncdotool-1.0.0/tests/unit/test_client.py 2022-05-04 10:04:29.141528319 +0200 +@@ -1,6 +1,6 @@ + from unittest import SkipTest, TestCase + +-import mock ++from unittest import mock + + from vncdotool import client + from vncdotool import rfb +diff -upr vncdotool-1.0.0.orig/tests/unit/test_command.py vncdotool-1.0.0/tests/unit/test_command.py +--- vncdotool-1.0.0.orig/tests/unit/test_command.py 2022-05-04 10:04:29.137528294 +0200 ++++ vncdotool-1.0.0/tests/unit/test_command.py 2022-05-04 10:04:29.141528319 +0200 +@@ -3,7 +3,7 @@ from vncdotool import command + import os.path + import socket + import unittest +-import mock ++from unittest import mock + from .helpers import isolate + + diff --git a/python-vncdotool.changes b/python-vncdotool.changes index 6d6378b..a5b9bb9 100644 --- a/python-vncdotool.changes +++ b/python-vncdotool.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Wed May 4 08:11:19 UTC 2022 - pgajdos@suse.com + +- added patches + fix https://github.com/sibson/vncdotool/issues/218 + + python-vncdotool-no-mock.patch + ------------------------------------------------------------------- Mon Nov 1 04:47:41 UTC 2021 - Steve Kowalik diff --git a/python-vncdotool.spec b/python-vncdotool.spec index b853b12..363e511 100644 --- a/python-vncdotool.spec +++ b/python-vncdotool.spec @@ -1,7 +1,7 @@ # # spec file for package python-vncdotool # -# Copyright (c) 2021 SUSE LLC +# Copyright (c) 2022 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -27,6 +27,8 @@ URL: https://github.com/sibson/vncdotool Source: https://files.pythonhosted.org/packages/source/v/vncdotool/vncdotool-%{version}.tar.gz Patch0: remove-nose.patch Patch1: fix-mocking.patch +# https://github.com/sibson/vncdotool/issues/218 +Patch2: python-vncdotool-no-mock.patch BuildRequires: %{python_module setuptools} BuildRequires: fdupes BuildRequires: python-rpm-macros @@ -38,7 +40,6 @@ BuildArch: noarch # SECTION test requirements BuildRequires: %{python_module Pillow} BuildRequires: %{python_module Twisted} -BuildRequires: %{python_module mock} BuildRequires: %{python_module pexpect} BuildRequires: %{python_module pytest} # /SECTION @@ -50,7 +51,6 @@ Command line VNC client. %prep %setup -q -n vncdotool-%{version} %autopatch -p1 -sed -i 's/from unittest.mock import /from mock.mock import /' tests/unit/helpers.py %build %python_build