From 6022fcd26cf38bc2e968ca3da1276c833ce4308556d287b827fbb2f935163b12 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Sun, 3 Mar 2019 12:33:04 +0000 Subject: [PATCH] Accepting request 681078 from home:jayvdb:noflake8 - 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. OBS-URL: https://build.opensuse.org/request/show/681078 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-tblib?expand=0&rev=6 --- 0001-Patch-tests-against-Python-3.7.patch | 34 +++++++++++++++++++++++ python-tblib.changes | 9 ++++++ python-tblib.spec | 30 ++++++-------------- 3 files changed, 51 insertions(+), 22 deletions(-) create mode 100644 0001-Patch-tests-against-Python-3.7.patch diff --git a/0001-Patch-tests-against-Python-3.7.patch b/0001-Patch-tests-against-Python-3.7.patch new file mode 100644 index 0000000..65e36b0 --- /dev/null +++ b/0001-Patch-tests-against-Python-3.7.patch @@ -0,0 +1,34 @@ +From 9a3141d0a1b67e2c4c8ac18deead830adfdae0de Mon Sep 17 00:00:00 2001 +From: Elliott Sales de Andrade +Date: Sat, 30 Jun 2018 20:51:57 -0400 +Subject: [PATCH] Patch tests against Python 3.7. + +Signed-off-by: Elliott Sales de Andrade +--- + 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',), ) ++ (<...Exception'>, Exception('fail'...), ) + + >>> pickle.loads(s2) +- (<...Exception'>, Exception('fail',), ) ++ (<...Exception'>, Exception('fail'...), ) + + >>> pickle.loads(s3) +- (<...Exception'>, Exception('fail',), ) ++ (<...Exception'>, Exception('fail'...), ) + + Raising + ~~~~~~~ +-- +2.17.1 + diff --git a/python-tblib.changes b/python-tblib.changes index 4afb9a0..5ca650b 100644 --- a/python-tblib.changes +++ b/python-tblib.changes @@ -1,3 +1,12 @@ +------------------------------------------------------------------- +Sun Mar 3 10:29:39 UTC 2019 - John Vandenberg + +- 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 diff --git a/python-tblib.spec b/python-tblib.spec index 5e7a701..8f860b2 100644 --- a/python-tblib.spec +++ b/python-tblib.spec @@ -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}/*