From b82eb53df802aeaeaaa0566816f1311294298fdc241a52aadd53b97a043eef42 Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Wed, 6 Apr 2022 14:52:51 +0000 Subject: [PATCH] Accepting request 967322 from home:pgajdos:python - do not require python-mock for build - added patches fix https://github.com/matthewwithanm/pilkit/issues/54 + python-pilkit-no-mock.patch OBS-URL: https://build.opensuse.org/request/show/967322 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pilkit?expand=0&rev=11 --- python-pilkit-no-mock.patch | 26 ++++++++++++++++++++++++++ python-pilkit.changes | 8 ++++++++ python-pilkit.spec | 5 +++-- 3 files changed, 37 insertions(+), 2 deletions(-) create mode 100644 python-pilkit-no-mock.patch diff --git a/python-pilkit-no-mock.patch b/python-pilkit-no-mock.patch new file mode 100644 index 0000000..0c2cdb8 --- /dev/null +++ b/python-pilkit-no-mock.patch @@ -0,0 +1,26 @@ +Index: pilkit-2.0/tests/test_processors.py +=================================================================== +--- pilkit-2.0.orig/tests/test_processors.py ++++ pilkit-2.0/tests/test_processors.py +@@ -4,7 +4,7 @@ from pilkit.processors import (Resize, R + import os + from pilkit.processors.resize import Thumbnail + from .utils import create_image, eq_, assert_true +-import mock ++import unittest.mock as mock + + + def test_smartcrop(): +Index: pilkit-2.0/tests/test_utils.py +=================================================================== +--- pilkit-2.0.orig/tests/test_utils.py ++++ pilkit-2.0/tests/test_utils.py +@@ -5,7 +5,7 @@ from pilkit.lib import Image + from pilkit.utils import (extension_to_format, format_to_extension, FileWrapper, + save_image, prepare_image, quiet) + from pytest import raises +-from mock import Mock, patch ++from unittest.mock import Mock, patch + from tempfile import NamedTemporaryFile + from .utils import create_image, eq_, assert_true + diff --git a/python-pilkit.changes b/python-pilkit.changes index bbb37ba..b9c56fa 100644 --- a/python-pilkit.changes +++ b/python-pilkit.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Wed Apr 6 10:37:26 UTC 2022 - pgajdos@suse.com + +- do not require python-mock for build +- added patches + fix https://github.com/matthewwithanm/pilkit/issues/54 + + python-pilkit-no-mock.patch + ------------------------------------------------------------------- Mon Sep 6 08:44:11 UTC 2021 - Steve Kowalik diff --git a/python-pilkit.spec b/python-pilkit.spec index 4349961..5dc5608 100644 --- a/python-pilkit.spec +++ b/python-pilkit.spec @@ -1,7 +1,7 @@ # # spec file for package python-pilkit # -# 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 @@ -26,13 +26,14 @@ URL: https://github.com/matthewwithanm/pilkit/ Source: https://files.pythonhosted.org/packages/source/p/pilkit/pilkit-%{version}.tar.gz Patch0: pil-fix-test.patch Patch1: switch-to-pytest.patch +# https://github.com/matthewwithanm/pilkit/issues/54 +Patch2: python-pilkit-no-mock.patch BuildRequires: %{python_module setuptools} BuildRequires: fdupes BuildRequires: python-rpm-macros BuildArch: noarch # SECTION test requirements BuildRequires: %{python_module Pillow} -BuildRequires: %{python_module mock >= 1.0.1} BuildRequires: %{python_module pytest} # /SECTION %python_subpackages