1
0

Accepting request 912052 from home:fusionfuture:branches:devel:languages:python:flask

- Require pip and importlib-metadata to fix build.
- Add fix-ParanoidTests-fail.patch to fix test failures in
  ParanoidTests.

OBS-URL: https://build.opensuse.org/request/show/912052
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:flask/python-Flask-Paranoid?expand=0&rev=5
This commit is contained in:
John Vandenberg 2021-08-15 00:55:57 +00:00 committed by Git OBS Bridge
parent 2b7ee1b024
commit ea09feb13c
3 changed files with 30 additions and 4 deletions

View File

@ -0,0 +1,11 @@
--- a/tests/test_paranoid.py
+++ b/tests/test_paranoid.py
@@ -7,7 +7,7 @@ from flask_paranoid import Paranoid
class ParanoidTests(unittest.TestCase):
def _delete_cookie(self, name):
- return (name + '=; Expires=Thu, 01-Jan-1970 00:00:00 GMT; '
+ return (name + '=; Expires=Thu, 01 Jan 1970 00:00:00 GMT; '
'Max-Age=0; Path=/')
def test_401(self):

View File

@ -1,3 +1,10 @@
-------------------------------------------------------------------
Sat Aug 14 02:54:08 UTC 2021 - Fusion Future <qydwhotmail@gmail.com>
- Require pip and importlib-metadata to fix build.
- Add fix-ParanoidTests-fail.patch to fix test failures in
ParanoidTests.
-------------------------------------------------------------------
Wed Oct 24 14:05:47 UTC 2018 - Jan Engelhardt <jengelh@inai.de>

View File

@ -1,7 +1,7 @@
#
# spec file for package python-Flask-Paranoid
#
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
# Copyright (c) 2021 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@ -12,7 +12,8 @@
# 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/
#
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
@ -21,15 +22,19 @@ Version: 0.2.0
Release: 0
License: MIT
Summary: Flask user session protection
Url: http://github.com/miguelgrinberg/flask-paranoid/
URL: http://github.com/miguelgrinberg/flask-paranoid/
Group: Development/Languages/Python
# Pypi sources don't include tests
#Source: https://files.pythonhosted.org/packages/source/F/Flask-Paranoid/Flask-Paranoid-%%{version}.tar.gz
Source: https://github.com/miguelgrinberg/flask-paranoid/archive/v0.2.tar.gz
Source99: https://raw.githubusercontent.com/miguelgrinberg/flask-paranoid/master/LICENSE
BuildRequires: python-rpm-macros
# PATCH-FIX-OPENSUSE fix-ParanoidTests-fail.patch The minus sign is removed from HTTP headers in newer Python releases.
Patch0: fix-ParanoidTests-fail.patch
BuildRequires: %{python_module importlib-metadata}
BuildRequires: %{python_module pip}
BuildRequires: %{python_module setuptools}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
# Test requirements
BuildRequires: %{python_module Flask >= 0.10}
# End of test requirements
@ -48,6 +53,9 @@ agent when a client connects to the flask application.
%prep
%setup -q -n flask-paranoid-0.2
%if 0%{?suse_version} > 1500
%patch0 -p1
%endif
cp %{SOURCE99} .
%build