Accepting request 681084 from devel:languages:python

OBS-URL: https://build.opensuse.org/request/show/681084
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-tblib?expand=0&rev=3
This commit is contained in:
Dominique Leuenberger 2019-03-08 10:58:36 +00:00 committed by Git OBS Bridge
commit 1d53e1da87
3 changed files with 51 additions and 22 deletions

View File

@ -0,0 +1,34 @@
From 9a3141d0a1b67e2c4c8ac18deead830adfdae0de Mon Sep 17 00:00:00 2001
From: Elliott Sales de Andrade <quantum.analyst@gmail.com>
Date: Sat, 30 Jun 2018 20:51:57 -0400
Subject: [PATCH] Patch tests against Python 3.7.
Signed-off-by: Elliott Sales de Andrade <quantum.analyst@gmail.com>
---
README.rst | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/README.rst b/README.rst
index a4838e7..e034cb2 100644
--- a/README.rst
+++ b/README.rst
@@ -162,13 +162,13 @@ Unpickling
::
>>> pickle.loads(s1)
- (<...Exception'>, Exception('fail',), <traceback object at ...>)
+ (<...Exception'>, Exception('fail'...), <traceback object at ...>)
>>> pickle.loads(s2)
- (<...Exception'>, Exception('fail',), <traceback object at ...>)
+ (<...Exception'>, Exception('fail'...), <traceback object at ...>)
>>> pickle.loads(s3)
- (<...Exception'>, Exception('fail',), <traceback object at ...>)
+ (<...Exception'>, Exception('fail'...), <traceback object at ...>)
Raising
~~~~~~~
--
2.17.1

View File

@ -1,3 +1,12 @@
-------------------------------------------------------------------
Sun Mar 3 10:29:39 UTC 2019 - John Vandenberg <jayvdb@gmail.com>
- Remove bcond_with test preventing the tests from running,
and fix the %check
- Remove unnecessary dependency on tox, flake8 and 9 other deps
- Add 0001-Patch-tests-against-Python-3.7.patch to workaround
Python 3.7 test failure.
-------------------------------------------------------------------
Tue Dec 4 12:55:02 UTC 2018 - Matej Cepl <mcepl@suse.com>

View File

@ -1,7 +1,7 @@
#
# spec file for package python-tblib
#
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@ -16,9 +16,6 @@
#
# Tests require network connection
%bcond_with test
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-tblib
Version: 1.3.2
@ -28,24 +25,13 @@ License: BSD-2-Clause
Group: Development/Languages/Python
Url: https://github.com/ionelmc/python-tblib
Source: https://files.pythonhosted.org/packages/source/t/tblib/tblib-%{version}.tar.gz
# https://github.com/ionelmc/python-tblib/issues/36
Patch0: https://src.fedoraproject.org/rpms/python-tblib/raw/master/f/0001-Patch-tests-against-Python-3.7.patch
BuildRequires: %{python_module pytest}
BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module six}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
%if %{with test}
BuildRequires: %{python_module Pygments}
BuildRequires: %{python_module check-manifest}
BuildRequires: %{python_module docutils}
BuildRequires: %{python_module flake8}
BuildRequires: %{python_module isort}
BuildRequires: %{python_module pytest-cov}
BuildRequires: %{python_module pytest-travis-fold}
BuildRequires: %{python_module pytest}
BuildRequires: %{python_module readme_renderer}
BuildRequires: %{python_module requests}
BuildRequires: %{python_module sphinx_py3doc_enhanced_theme}
BuildRequires: python3-tox
%endif
Requires: python-six
BuildArch: noarch
@ -72,6 +58,7 @@ the pickle support.
%prep
%setup -q -n tblib-%{version}
%patch0 -p1
%build
%python_build
@ -80,13 +67,12 @@ the pickle support.
%python_install
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%if %{with test}
%check
%python_expand py.test-%{$python_bin_suffix}
%endif
%{python_expand export PYTHONPATH=tests:%{buildroot}%{$python_sitelib}
$python -m pytest README.rst
}
%files %{python_files}
%defattr(-,root,root,-)
%doc AUTHORS.rst CHANGELOG.rst README.rst
%license LICENSE
%{python_sitelib}/*