17
0

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
This commit is contained in:
John Vandenberg
2022-05-12 08:34:16 +00:00
committed by Git OBS Bridge
parent 3bb52a9a2b
commit 62d251e0da
3 changed files with 35 additions and 1 deletions

View File

@@ -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

View File

@@ -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 <jayvdb@gmail.com>

View File

@@ -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