From 62d251e0dad41da1e100e4e2dd34adaeb9ec7d951914b39d233c8da93279ea0c Mon Sep 17 00:00:00 2001 From: John Vandenberg Date: Thu, 12 May 2022 08:34:16 +0000 Subject: [PATCH] Accepting request 976571 from home:pgajdos:python - to not require python-mock for build - added patches fix https://github.com/dkarchmer/django-rest-framework-client/issues/7 + python-django-rest-framework-client-no-mock.patch OBS-URL: https://build.opensuse.org/request/show/976571 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:django/python-django-rest-framework-client?expand=0&rev=6 --- ...django-rest-framework-client-no-mock.patch | 22 +++++++++++++++++++ python-django-rest-framework-client.changes | 8 +++++++ python-django-rest-framework-client.spec | 6 ++++- 3 files changed, 35 insertions(+), 1 deletion(-) create mode 100644 python-django-rest-framework-client-no-mock.patch diff --git a/python-django-rest-framework-client-no-mock.patch b/python-django-rest-framework-client-no-mock.patch new file mode 100644 index 0000000..c4ade13 --- /dev/null +++ b/python-django-rest-framework-client-no-mock.patch @@ -0,0 +1,22 @@ +diff -upr django-rest-framework-client-0.1.1.orig/tests/api.py django-rest-framework-client-0.1.1/tests/api.py +--- django-rest-framework-client-0.1.1.orig/tests/api.py 2022-05-12 09:32:27.295052321 +0200 ++++ django-rest-framework-client-0.1.1/tests/api.py 2022-05-12 09:32:27.299052347 +0200 +@@ -1,6 +1,6 @@ + import sys + import json +-import mock ++from unittest import mock + import requests + import requests_mock + import unittest +diff -upr django-rest-framework-client-0.1.1.orig/tests/resources.py django-rest-framework-client-0.1.1/tests/resources.py +--- django-rest-framework-client-0.1.1.orig/tests/resources.py 2022-05-12 09:32:27.295052321 +0200 ++++ django-rest-framework-client-0.1.1/tests/resources.py 2022-05-12 09:32:27.299052347 +0200 +@@ -1,6 +1,6 @@ + import sys + import json +-import mock ++from unittest import mock + import requests + import requests_mock + import unittest diff --git a/python-django-rest-framework-client.changes b/python-django-rest-framework-client.changes index 4811af8..fd0bd05 100644 --- a/python-django-rest-framework-client.changes +++ b/python-django-rest-framework-client.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Thu May 12 08:20:41 UTC 2022 - pgajdos@suse.com + +- to not require python-mock for build +- added patches + fix https://github.com/dkarchmer/django-rest-framework-client/issues/7 + + python-django-rest-framework-client-no-mock.patch + ------------------------------------------------------------------- Fri Jan 7 03:47:57 UTC 2022 - John Vandenberg diff --git a/python-django-rest-framework-client.spec b/python-django-rest-framework-client.spec index 4b95cfe..b50d1fd 100644 --- a/python-django-rest-framework-client.spec +++ b/python-django-rest-framework-client.spec @@ -26,14 +26,17 @@ Summary: Python client for a Django REST Framework based web site License: MIT Group: Development/Languages/Python URL: https://github.com/dkarchmer/django-rest-framework-client +# newer versions exist on pypi, but without test packaged, see +# https://github.com/dkarchmer/django-rest-framework-client/issues/7 Source: https://github.com/dkarchmer/django-rest-framework-client/archive/v%{version}.tar.gz#/django-rest-framework-client-%{version}.tar.gz # fake dependency, https://github.com/dkarchmer/django-rest-framework-client/pull/2 Patch0: python-django-rest-framework-client-no-unittest2.patch +# https://github.com/dkarchmer/django-rest-framework-client/issues/7 +Patch1: python-django-rest-framework-client-no-mock.patch BuildRequires: %{python_module setuptools} BuildRequires: python-rpm-macros # SECTION test requirements BuildRequires: %{python_module Django} -BuildRequires: %{python_module mock} BuildRequires: %{python_module pytest} BuildRequires: %{python_module requests-mock} BuildRequires: %{python_module requests} @@ -54,6 +57,7 @@ Python client for a Django REST Framework based web site. %prep %setup -q -n django-rest-framework-client-%{version} %patch0 -p1 +%patch1 -p1 %build %python_build