From fa194d8080b93f0ac8643375df2e01906e5e300f857c5081b9f2cb10acce8504 Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Mon, 21 Mar 2022 14:23:27 +0000 Subject: [PATCH] Accepting request 963677 from home:pgajdos:python - do not require mock for build - added patches fix https://github.com/xolox/python-humanfriendly/issues/62 + python-humanfriendly-no-mock.patch OBS-URL: https://build.opensuse.org/request/show/963677 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-humanfriendly?expand=0&rev=34 --- python-humanfriendly-no-mock.patch | 13 +++++++++++++ python-humanfriendly.changes | 8 ++++++++ python-humanfriendly.spec | 5 ++++- 3 files changed, 25 insertions(+), 1 deletion(-) create mode 100644 python-humanfriendly-no-mock.patch diff --git a/python-humanfriendly-no-mock.patch b/python-humanfriendly-no-mock.patch new file mode 100644 index 0000000..95cdc1d --- /dev/null +++ b/python-humanfriendly-no-mock.patch @@ -0,0 +1,13 @@ +Index: humanfriendly-10.0/humanfriendly/tests.py +=================================================================== +--- humanfriendly-10.0.orig/humanfriendly/tests.py 2021-06-11 12:43:08.000000000 +0200 ++++ humanfriendly-10.0/humanfriendly/tests.py 2022-03-21 13:05:02.302356424 +0100 +@@ -123,7 +123,7 @@ from humanfriendly.usage import ( + ) + + # Test dependencies. +-from mock import MagicMock ++from unittest.mock import MagicMock + + + class HumanFriendlyTestCase(TestCase): diff --git a/python-humanfriendly.changes b/python-humanfriendly.changes index a48cf1f..7fcf14c 100644 --- a/python-humanfriendly.changes +++ b/python-humanfriendly.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Mon Mar 21 12:15:56 UTC 2022 - pgajdos@suse.com + +- do not require mock for build +- added patches + fix https://github.com/xolox/python-humanfriendly/issues/62 + + python-humanfriendly-no-mock.patch + ------------------------------------------------------------------- Thu Nov 18 11:55:15 UTC 2021 - John Paul Adrian Glaubitz diff --git a/python-humanfriendly.spec b/python-humanfriendly.spec index 779ebe9..d6dc54e 100644 --- a/python-humanfriendly.spec +++ b/python-humanfriendly.spec @@ -1,7 +1,7 @@ # # spec file # -# 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 @@ -33,6 +33,8 @@ Summary: Human friendly input/output for text interfaces using Python License: MIT URL: https://github.com/xolox/python-humanfriendly Source: https://files.pythonhosted.org/packages/source/h/humanfriendly/humanfriendly-%{version}.tar.gz +# https://github.com/xolox/python-humanfriendly/issues/62 +Patch0: python-humanfriendly-no-mock.patch BuildRequires: %{python_module setuptools} BuildRequires: fdupes BuildRequires: python-rpm-macros @@ -73,6 +75,7 @@ text interfaces more user friendly. %prep %setup -q -n humanfriendly-%{version} +%patch0 -p1 %build %python_build