From 4c0317dc61caba496ebca4e4a4489ecdb8c25d3af439883d9655165d456f6ed8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Thu, 18 Oct 2018 09:20:20 +0000 Subject: [PATCH] - Fix build on python 3.7: * python37.patch OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-Paste?expand=0&rev=22 --- python-Paste.changes | 6 ++++++ python-Paste.spec | 30 +++++++++--------------------- python37.patch | 23 +++++++++++++++++++++++ 3 files changed, 38 insertions(+), 21 deletions(-) create mode 100644 python37.patch diff --git a/python-Paste.changes b/python-Paste.changes index d771ace..f106972 100644 --- a/python-Paste.changes +++ b/python-Paste.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Thu Oct 18 09:19:55 UTC 2018 - Tomáš Chvátal + +- Fix build on python 3.7: + * python37.patch + ------------------------------------------------------------------- Tue Mar 6 17:00:13 UTC 2018 - aplanas@suse.com diff --git a/python-Paste.spec b/python-Paste.spec index 03c270a..36692ce 100644 --- a/python-Paste.spec +++ b/python-Paste.spec @@ -12,49 +12,40 @@ # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. -# Please submit bugfixes or comments via http://bugs.opensuse.org/ +# Please submit bugfixes or comments via https://bugs.opensuse.org/ # -%bcond_without tests - %{?!python_module:%define python_module() python-%{**} python3-%{**}} %define oldpython python Name: python-Paste Version: 2.0.3 Release: 0 -Url: http://pythonpaste.org Summary: Tools for using a Web Server Gateway Interface stack License: MIT Group: Development/Languages/Python +URL: http://pythonpaste.org Source: https://files.pythonhosted.org/packages/source/P/Paste/Paste-%{version}.tar.gz -BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: %{python_module devel} +# Test build requirements: +BuildRequires: %{python_module nose} BuildRequires: %{python_module setuptools} BuildRequires: %{python_module six > 1.4.0} BuildRequires: fdupes BuildRequires: python-rpm-macros # Documentation build requirements: BuildRequires: python3-Sphinx -# Test build requirements: -BuildRequires: %{python_module nose} -%if 0%{?suse_version} >= 1000 || 0%{?fedora_version} >= 24 -Suggests: python-flup -%endif Requires: python-six > 1.4.0 +BuildArch: noarch +Suggests: python-flup %ifpython2 -%if 0%{?suse_version} >= 1000 || 0%{?fedora_version} >= 24 -Suggests: python-python-openid -%endif Provides: %{oldpython}-paste = %{version} Obsoletes: %{oldpython}-paste < %{version} +Suggests: python-python-openid %endif %ifpython3 -%if 0%{?suse_version} >= 1000 || 0%{?fedora_version} >= 24 Suggests: python3-python3-openid %endif -%endif -BuildArch: noarch %python_subpackages %description @@ -74,20 +65,17 @@ rm paste/util/template.py.orig %build %python_build -%{__python3} setup.py build_sphinx && rm build/sphinx/html/.buildinfo +python3 setup.py build_sphinx && rm build/sphinx/html/.buildinfo %install %python_install %python_expand %fdupes %{buildroot}%{$python_sitelib} -%if %{with tests} %check %python_exec setup.py -q test -%endif %files %{python_files} -%defattr(-,root,root,-) -%doc docs/license.txt +%license docs/license.txt %doc build/sphinx/html/ %{python_sitelib}/* diff --git a/python37.patch b/python37.patch new file mode 100644 index 0000000..1c378cd --- /dev/null +++ b/python37.patch @@ -0,0 +1,23 @@ +# HG changeset patch +# User Miro Hrončok +# Date 1528476582 -7200 +# Fri Jun 08 18:49:42 2018 +0200 +# Branch py37 +# Node ID c5a2c7e3191cdcebf3fa5f0e52f55910ed2120b9 +# Parent 0e5a48796ab969d874c6b772c5c33561ac2d1b0d +Don't raise StopIteration from generator, return instead + +See https://www.python.org/dev/peps/pep-0479/ + +diff -r 0e5a48796ab9 -r c5a2c7e3191c paste/auth/digest.py +--- a/paste/auth/digest.py Tue Mar 08 16:29:31 2016 -0800 ++++ b/paste/auth/digest.py Fri Jun 08 18:49:42 2018 +0200 +@@ -57,7 +57,7 @@ + prev = item + + yield prev.strip() +- raise StopIteration ++ return + + def _auth_to_kv_pairs(auth_string): + """ split a digest auth string into key, value pairs """