forked from pool/python-pilkit
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
This commit is contained in:
26
python-pilkit-no-mock.patch
Normal file
26
python-pilkit-no-mock.patch
Normal file
@@ -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
|
||||
|
@@ -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 <steven.kowalik@suse.com>
|
||||
|
||||
|
@@ -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
|
||||
|
Reference in New Issue
Block a user