forked from pool/python-Flask
Accepting request 487844 from devel:languages:python
Automatic submission by obs-autosubmit OBS-URL: https://build.opensuse.org/request/show/487844 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-Flask?expand=0&rev=16
This commit is contained in:
parent
a478930d1f
commit
4f17141ded
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:b4713f2bfb9ebc2966b8a49903ae0d3984781d5c878591cf2f7b484d28756b0e
|
||||
size 564993
|
3
Flask-0.12.1.tar.gz
Normal file
3
Flask-0.12.1.tar.gz
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:9dce4b6bfbb5b062181d3f7da8f727ff70c1156cbb4024351eafd426deb5fb88
|
||||
size 548511
|
26
flask-python36.patch
Normal file
26
flask-python36.patch
Normal file
@ -0,0 +1,26 @@
|
||||
Index: Flask-0.12.1/tests/test_basic.py
|
||||
===================================================================
|
||||
--- Flask-0.12.1.orig/tests/test_basic.py
|
||||
+++ Flask-0.12.1/tests/test_basic.py
|
||||
@@ -333,7 +333,7 @@ def test_session_expiration():
|
||||
client = app.test_client()
|
||||
rv = client.get('/')
|
||||
assert 'set-cookie' in rv.headers
|
||||
- match = re.search(r'\bexpires=([^;]+)(?i)', rv.headers['set-cookie'])
|
||||
+ match = re.search(r'(?i)\bexpires=([^;]+)', rv.headers['set-cookie'])
|
||||
expires = parse_date(match.group())
|
||||
expected = datetime.utcnow() + app.permanent_session_lifetime
|
||||
assert expires.year == expected.year
|
||||
Index: Flask-0.12.1/tests/test_ext.py
|
||||
===================================================================
|
||||
--- Flask-0.12.1.orig/tests/test_ext.py
|
||||
+++ Flask-0.12.1/tests/test_ext.py
|
||||
@@ -180,7 +180,7 @@ def test_no_error_swallowing(flaskext_br
|
||||
with pytest.raises(ImportError) as excinfo:
|
||||
import flask.ext.broken
|
||||
|
||||
- assert excinfo.type is ImportError
|
||||
+ assert issubclass(excinfo.type, ImportError)
|
||||
if PY2:
|
||||
message = 'No module named missing_module'
|
||||
else:
|
@ -1,3 +1,38 @@
|
||||
-------------------------------------------------------------------
|
||||
Tue Apr 4 14:51:27 UTC 2017 - jmatejek@suse.com
|
||||
|
||||
- update for singlespec
|
||||
- flask-python36.patch: fix test failures in Python 3.6
|
||||
- update to 0.12.1
|
||||
* Prevent `flask run` from showing a NoAppException when an ImportError occurs
|
||||
within the imported application module.
|
||||
* Fix encoding behavior of ``app.config.from_pyfile`` for Python 3. Fix
|
||||
``#2118``.
|
||||
* Call `ctx.auto_pop` with the exception object instead of `None`, in the
|
||||
event that a `BaseException` such as `KeyboardInterrupt` is raised in a
|
||||
request handler.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Mar 16 12:26:19 UTC 2017 - michael@stroeder.com
|
||||
|
||||
- update to version 0.12:
|
||||
* the cli command now responds to `--version`.
|
||||
* Mimetype guessing and ETag generation for file-like objects in
|
||||
"send_file" has been removed, as per issue "#104". See pull
|
||||
request "#1849".
|
||||
* Mimetype guessing in "send_file" now fails loudly and doesn't fall
|
||||
back to "application/octet-stream". See pull request "#1988".
|
||||
* Make "flask.safe_join" able to join multiple paths like
|
||||
"os.path.join" (pull request "#1730").
|
||||
* Revert a behavior change that made the dev server crash instead of
|
||||
returning a Internal Server Error (pull request "#2006").
|
||||
* Correctly invoke response handlers for both regular request
|
||||
dispatching as well as error handlers.
|
||||
* Disable logger propagation by default for the app logger.
|
||||
* Add support for range requests in "send_file".
|
||||
* "app.test_client" includes preset default environment, which can
|
||||
now be directly set, instead of per "client.get".
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Nov 17 13:00:22 UTC 2016 - rjschwei@suse.com
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package python-Flask
|
||||
#
|
||||
# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
|
||||
# Copyright (c) 2017 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,37 +16,37 @@
|
||||
#
|
||||
|
||||
|
||||
%define oldpython python
|
||||
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
||||
Name: python-Flask
|
||||
Version: 0.11.1
|
||||
Version: 0.12.1
|
||||
Release: 0
|
||||
Url: http://github.com/mitsuhiko/flask/
|
||||
Summary: A microframework based on Werkzeug, Jinja2 and good intentions
|
||||
License: BSD-3-Clause
|
||||
Group: Development/Languages/Python
|
||||
Url: http://github.com/mitsuhiko/flask/
|
||||
Source: https://files.pythonhosted.org/packages/source/F/Flask/Flask-%{version}.tar.gz
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: python-Jinja2 >= 2.4
|
||||
BuildRequires: python-devel
|
||||
Patch0: flask-python36.patch
|
||||
BuildRequires: %{python_module Jinja2 >= 2.4}
|
||||
# BuildRequires: python-Sphinx
|
||||
BuildRequires: python-Werkzeug >= 0.7
|
||||
BuildRequires: python-click >= 2.0
|
||||
BuildRequires: python-itsdangerous >= 0.21
|
||||
BuildRequires: python-nose
|
||||
BuildRequires: python-setuptools
|
||||
BuildRequires: %{python_module Werkzeug >= 0.7}
|
||||
BuildRequires: %{python_module click >= 2.0}
|
||||
BuildRequires: %{python_module itsdangerous >= 0.21}
|
||||
BuildRequires: %{python_module pytest}
|
||||
BuildRequires: %{python_module setuptools}
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: python-rpm-macros
|
||||
Requires: python-Jinja2 >= 2.4
|
||||
Requires: python-Werkzeug >= 0.7
|
||||
Requires: python-click >= 2.0
|
||||
Requires: python-itsdangerous >= 0.21
|
||||
Provides: python-flask = %{version}
|
||||
Obsoletes: python-flask < %{version}
|
||||
Requires(post): update-alternatives
|
||||
Requires(postun): update-alternatives
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
%if 0%{?suse_version} && 0%{?suse_version} <= 1110
|
||||
%{!?python_sitelib: %global python_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
|
||||
%else
|
||||
BuildArch: noarch
|
||||
%ifpython2
|
||||
Provides: %{oldpython}-flask = %{version}
|
||||
Obsoletes: %{oldpython}-flask < %{version}
|
||||
%endif
|
||||
%python_subpackages
|
||||
|
||||
%description
|
||||
Flask is a microframework for Python based on Werkzeug, Jinja 2 and good
|
||||
@ -64,42 +64,30 @@ reference for python-Flask.
|
||||
%prep
|
||||
%setup -q -n Flask-%{version}
|
||||
rm docs/.gitignore # Remove junk
|
||||
%patch0 -p1
|
||||
|
||||
%build
|
||||
python setup.py build
|
||||
%python_build
|
||||
# cd docs && make html
|
||||
|
||||
%install
|
||||
python setup.py install --prefix=%{_prefix} --root=%{buildroot}
|
||||
|
||||
# Prepare for update-alternatives usage
|
||||
mkdir -p %{buildroot}%{_sysconfdir}/alternatives
|
||||
mv %{buildroot}%{_bindir}/flask %{buildroot}%{_bindir}/flask-%{py_ver}
|
||||
ln -s -f %{_sysconfdir}/alternatives/flask %{buildroot}%{_bindir}/flask
|
||||
%python_install
|
||||
%python_clone %{buildroot}%{_bindir}/flask
|
||||
|
||||
%fdupes %{buildroot}%{python_sitelib}
|
||||
|
||||
%post
|
||||
%_sbindir/update-alternatives \
|
||||
--install %{_bindir}/flask flask %{_bindir}/flask-%{py_ver} 30
|
||||
|
||||
%postun
|
||||
if [ $1 -eq 0 ] ; then
|
||||
%_sbindir/update-alternatives --remove flask %{_bindir}/flask-%{py_ver}
|
||||
fi
|
||||
|
||||
%check
|
||||
python setup.py test
|
||||
export LANG=en_US.UTF-8
|
||||
%python_exec -m pytest tests
|
||||
|
||||
%files
|
||||
%files %{python_files}
|
||||
%defattr(-,root,root,-)
|
||||
%doc AUTHORS CHANGES LICENSE README
|
||||
%{_bindir}/flask
|
||||
%{_bindir}/flask-%{py_ver}
|
||||
%ghost %{_sysconfdir}/alternatives/flask
|
||||
%python3_only %{_bindir}/flask
|
||||
%{_bindir}/flask-%{python_bin_suffix}
|
||||
%{python_sitelib}/*
|
||||
|
||||
%files doc
|
||||
%files %{python_files doc}
|
||||
%defattr(-,root,root)
|
||||
%doc docs/
|
||||
%doc examples/
|
||||
|
Loading…
Reference in New Issue
Block a user