14
0

Accepting request 811061 from devel:languages:python

OBS-URL: https://build.opensuse.org/request/show/811061
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-rollbar?expand=0&rev=5
This commit is contained in:
2020-06-03 18:35:06 +00:00
committed by Git OBS Bridge
3 changed files with 34 additions and 2 deletions

View File

@@ -0,0 +1,19 @@
Index: pyrollbar-0.15.0/rollbar/test/__init__.py
===================================================================
--- pyrollbar-0.15.0.orig/rollbar/test/__init__.py 2020-04-04 02:08:37.000000000 +0200
+++ pyrollbar-0.15.0/rollbar/test/__init__.py 2020-06-03 10:51:15.137644743 +0200
@@ -1,9 +1,12 @@
-import unittest2
+try:
+ import unittest2 as unittest
+except ImportError:
+ import unittest
SNOWMAN = b'\xe2\x98\x83'
SNOWMAN_UNICODE = SNOWMAN.decode('utf8')
-class BaseTest(unittest2.TestCase):
+class BaseTest(unittest.TestCase):
pass

View File

@@ -1,3 +1,12 @@
-------------------------------------------------------------------
Wed Jun 3 09:05:04 UTC 2020 - pgajdos@suse.com
- use %pytest macro
- remove dependency on unittest2 for python3
- added patches
https://github.com/rollbar/pyrollbar/pull/340
+ python-rollbar-no-unittest2.patch
------------------------------------------------------------------- -------------------------------------------------------------------
Tue May 19 09:27:47 UTC 2020 - Petr Gajdos <pgajdos@suse.com> Tue May 19 09:27:47 UTC 2020 - Petr Gajdos <pgajdos@suse.com>

View File

@@ -26,12 +26,14 @@ License: MIT
Group: Development/Languages/Python Group: Development/Languages/Python
URL: https://github.com/rollbar/pyrollbar URL: https://github.com/rollbar/pyrollbar
Source: https://github.com/rollbar/pyrollbar/archive/v%{version}.tar.gz Source: https://github.com/rollbar/pyrollbar/archive/v%{version}.tar.gz
# https://github.com/rollbar/pyrollbar/pull/340
Patch0: python-rollbar-no-unittest2.patch
BuildRequires: %{python_module WebOb} BuildRequires: %{python_module WebOb}
BuildRequires: %{python_module blinker} BuildRequires: %{python_module blinker}
BuildRequires: %{python_module pytest}
BuildRequires: %{python_module requests >= 0.12.1} BuildRequires: %{python_module requests >= 0.12.1}
BuildRequires: %{python_module setuptools} BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module six >= 1.9.0} BuildRequires: %{python_module six >= 1.9.0}
BuildRequires: %{python_module unittest2}
BuildRequires: fdupes BuildRequires: fdupes
BuildRequires: python-rpm-macros BuildRequires: python-rpm-macros
Requires: python-requests >= 0.12.1 Requires: python-requests >= 0.12.1
@@ -43,6 +45,7 @@ BuildArch: noarch
%if %{with python2} %if %{with python2}
BuildRequires: python2-enum34 BuildRequires: python2-enum34
BuildRequires: python2-mock BuildRequires: python2-mock
BuildRequires: python2-unittest2
%endif %endif
%python_subpackages %python_subpackages
@@ -51,6 +54,7 @@ Send messages and exceptions with arbitrary context, get back aggregates, and de
%prep %prep
%setup -q -n pyrollbar-%{version} %setup -q -n pyrollbar-%{version}
%patch0 -p1
%build %build
%python_build %python_build
@@ -61,7 +65,7 @@ Send messages and exceptions with arbitrary context, get back aggregates, and de
%python_expand %fdupes %{buildroot}%{$python_sitelib} %python_expand %fdupes %{buildroot}%{$python_sitelib}
%check %check
%python_exec setup.py test %pytest
%post %post
%python_install_alternative rollbar %python_install_alternative rollbar