Accepting request 642830 from devel:languages:python

- Fix build on python 3.7:
  * python37.patch

OBS-URL: https://build.opensuse.org/request/show/642830
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-Paste?expand=0&rev=17
This commit is contained in:
Dominique Leuenberger 2018-10-25 06:13:39 +00:00 committed by Git OBS Bridge
commit 2eba5b9415
3 changed files with 40 additions and 22 deletions

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Thu Oct 18 09:19:55 UTC 2018 - Tomáš Chvátal <tchvatal@suse.com>
- Fix build on python 3.7:
* python37.patch
------------------------------------------------------------------- -------------------------------------------------------------------
Tue Mar 6 17:00:13 UTC 2018 - aplanas@suse.com Tue Mar 6 17:00:13 UTC 2018 - aplanas@suse.com

View File

@ -12,49 +12,40 @@
# license that conforms to the Open Source Definition (Version 1.9) # license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative. # 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-%{**}} %{?!python_module:%define python_module() python-%{**} python3-%{**}}
%define oldpython python %define oldpython python
Name: python-Paste Name: python-Paste
Version: 2.0.3 Version: 2.0.3
Release: 0 Release: 0
Url: http://pythonpaste.org
Summary: Tools for using a Web Server Gateway Interface stack Summary: Tools for using a Web Server Gateway Interface stack
License: MIT License: MIT
Group: Development/Languages/Python Group: Development/Languages/Python
URL: http://pythonpaste.org
Source: https://files.pythonhosted.org/packages/source/P/Paste/Paste-%{version}.tar.gz Source: https://files.pythonhosted.org/packages/source/P/Paste/Paste-%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-build Patch0: python37.patch
BuildRequires: %{python_module devel} # Test build requirements:
BuildRequires: %{python_module nose}
BuildRequires: %{python_module setuptools} BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module six > 1.4.0} BuildRequires: %{python_module six > 1.4.0}
BuildRequires: fdupes BuildRequires: fdupes
BuildRequires: python-rpm-macros BuildRequires: python-rpm-macros
# Documentation build requirements: # Documentation build requirements:
BuildRequires: python3-Sphinx 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 Requires: python-six > 1.4.0
BuildArch: noarch
Suggests: python-flup
%ifpython2 %ifpython2
%if 0%{?suse_version} >= 1000 || 0%{?fedora_version} >= 24
Suggests: python-python-openid
%endif
Provides: %{oldpython}-paste = %{version} Provides: %{oldpython}-paste = %{version}
Obsoletes: %{oldpython}-paste < %{version} Obsoletes: %{oldpython}-paste < %{version}
Suggests: python-python-openid
%endif %endif
%ifpython3 %ifpython3
%if 0%{?suse_version} >= 1000 || 0%{?fedora_version} >= 24
Suggests: python3-python3-openid Suggests: python3-python3-openid
%endif %endif
%endif
BuildArch: noarch
%python_subpackages %python_subpackages
%description %description
@ -71,23 +62,21 @@ rm tests/test_proxy.py
rm paste/urlmap.py.orig rm paste/urlmap.py.orig
rm paste/httpserver.py.orig rm paste/httpserver.py.orig
rm paste/util/template.py.orig rm paste/util/template.py.orig
%patch0 -p1
%build %build
%python_build %python_build
%{__python3} setup.py build_sphinx && rm build/sphinx/html/.buildinfo python3 setup.py build_sphinx && rm build/sphinx/html/.buildinfo
%install %install
%python_install %python_install
%python_expand %fdupes %{buildroot}%{$python_sitelib} %python_expand %fdupes %{buildroot}%{$python_sitelib}
%if %{with tests}
%check %check
%python_exec setup.py -q test %python_exec setup.py -q test
%endif
%files %{python_files} %files %{python_files}
%defattr(-,root,root,-) %license docs/license.txt
%doc docs/license.txt
%doc build/sphinx/html/ %doc build/sphinx/html/
%{python_sitelib}/* %{python_sitelib}/*

23
python37.patch Normal file
View File

@ -0,0 +1,23 @@
# HG changeset patch
# User Miro Hrončok <miro@hroncok.cz>
# 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 """