[packages/python-flask] - up to 1.0.2 but building with tests/doc fails

arekm arekm at pld-linux.org
Thu Nov 8 09:12:37 CET 2018


commit 590f22ae513bfb2cfc53339bccbf67b23fb8301f
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date:   Thu Nov 8 09:12:32 2018 +0100

    - up to 1.0.2 but building with tests/doc fails

 ...quire-sphinxcontrib.log_cabinet-extension.patch | 21 ++++++++++++
 0002-remove-DocVersion-related.patch               | 33 ++++++++++++++++++
 0003-fix-issue-no-theme-named-flask-found.patch    | 20 +++++++++++
 0004-empty-CONTRIBUTING-rst.patch                  |  8 +++++
 python-flask-python3.6.patch                       | 40 ----------------------
 python-flask.spec                                  | 18 ++++++----
 6 files changed, 94 insertions(+), 46 deletions(-)
---
diff --git a/python-flask.spec b/python-flask.spec
index 6b8b250..e0207dc 100644
--- a/python-flask.spec
+++ b/python-flask.spec
@@ -9,14 +9,17 @@
 Summary:	A microframework based on Werkzeug, Jinja2 and good intentions
 Summary(pl.UTF-8):	Mikroszkielet oparty na Werkzeugu, Jinja2 i dobrych intencjach
 Name:		python-%{module}
-Version:	0.12
-Release:	2
+Version:	1.0.2
+Release:	1
 License:	BSD
 Group:		Development/Languages/Python
 #Source0Download: https://pypi.python.org/simple/Flask
 Source0:	https://files.pythonhosted.org/packages/source/F/Flask/Flask-%{version}.tar.gz
-# Source0-md5:	c1d30f51cff4a38f9454b23328a15c5a
-Patch0:		%{name}-python3.6.patch
+# Source0-md5:	824f0f20aae1f44c9c7dc4054adb7969
+Patch0:		0001-Don-t-require-sphinxcontrib.log_cabinet-extension.patch
+Patch1:		0002-remove-DocVersion-related.patch
+Patch2:		0003-fix-issue-no-theme-named-flask-found.patch
+Patch3:		0004-empty-CONTRIBUTING-rst.patch
 URL:		http://flask.pocoo.org/
 %if %{with tests} && %(locale -a | grep -q '^C\.UTF-8$'; echo $?)
 BuildRequires:	glibc-localedb-all
@@ -86,6 +89,9 @@ Dokumentacja do pakietu Pythona Flask.
 %prep
 %setup -q -n Flask-%{version}
 %patch0 -p1
+%patch1 -p1
+%patch2 -p1
+%patch3 -p1
 
 %build
 %if %{with python2}
@@ -135,7 +141,7 @@ rm -rf $RPM_BUILD_ROOT
 %if %{with python2}
 %files
 %defattr(644,root,root,755)
-%doc AUTHORS CHANGES LICENSE README
+%doc AUTHORS CHANGES.rst LICENSE README.rst
 %attr(755,root,root) %{_bindir}/flask
 %attr(755,root,root) %{_bindir}/flask-2
 %{py_sitescriptdir}/flask
@@ -148,7 +154,7 @@ rm -rf $RPM_BUILD_ROOT
 %if %{with python3}
 %files -n python3-%{module}
 %defattr(644,root,root,755)
-%doc AUTHORS CHANGES LICENSE README
+%doc AUTHORS CHANGES.rst LICENSE README.rst
 %attr(755,root,root) %{_bindir}/flask-3
 %{py3_sitescriptdir}/flask
 %{py3_sitescriptdir}/Flask-%{version}-py*.egg-info
diff --git a/0001-Don-t-require-sphinxcontrib.log_cabinet-extension.patch b/0001-Don-t-require-sphinxcontrib.log_cabinet-extension.patch
new file mode 100644
index 0000000..3e0848c
--- /dev/null
+++ b/0001-Don-t-require-sphinxcontrib.log_cabinet-extension.patch
@@ -0,0 +1,21 @@
+From fa0e83cd6d5ca44c1583624ef4373730dca05d16 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Ond=C5=99ej=20Nov=C3=BD?= <onovy at debian.org>
+Date: Mon, 14 May 2018 14:50:56 +0200
+Subject: Don't require sphinxcontrib.log_cabinet extension
+
+---
+ docs/conf.py | 1 -
+ 1 file changed, 1 deletion(-)
+
+diff --git a/docs/conf.py b/docs/conf.py
+index 0417244..dd13886 100644
+--- a/docs/conf.py
++++ b/docs/conf.py
+@@ -20,7 +20,6 @@ master_doc = 'index'
+ extensions = [
+     'sphinx.ext.autodoc',
+     'sphinx.ext.intersphinx',
+-    'sphinxcontrib.log_cabinet',
+ ]
+ 
+ intersphinx_mapping = {
diff --git a/0002-remove-DocVersion-related.patch b/0002-remove-DocVersion-related.patch
new file mode 100644
index 0000000..39ab84c
--- /dev/null
+++ b/0002-remove-DocVersion-related.patch
@@ -0,0 +1,33 @@
+From 067c772588f69f397eeff70019320506b47bb239 Mon Sep 17 00:00:00 2001
+From: chengkang <1412950785 at qq.com>
+Date: Mon, 17 Sep 2018 21:05:53 +0800
+Subject: [PATCH] remove DocVersion related
+Origin: https://github.com/pallets/flask/commit/067c772588f69f397eeff70019320506b47bb239
+
+---
+ docs/conf.py | 7 +------
+ 1 file changed, 1 insertion(+), 6 deletions(-)
+
+--- a/docs/conf.py
++++ b/docs/conf.py
+@@ -4,7 +4,7 @@
+ import inspect
+ import re
+ 
+-from pallets_sphinx_themes import DocVersion, ProjectLink, get_version
++from pallets_sphinx_themes import ProjectLink, get_version
+ 
+ # Project --------------------------------------------------------------
+ 
+@@ -45,11 +45,6 @@
+         ProjectLink(
+             'Issue Tracker', 'https://github.com/pallets/flask/issues/'),
+     ],
+-    'versions': [
+-        DocVersion('dev', 'Development', 'unstable'),
+-        DocVersion('1.0', 'Flask 1.0', 'stable'),
+-        DocVersion('0.12', 'Flask 0.12'),
+-    ],
+     'canonical_url': 'http://flask.pocoo.org/docs/{}/'.format(version),
+     'carbon_ads_args': 'zoneid=1673&serve=C6AILKT&placement=pocooorg',
+ }
diff --git a/0003-fix-issue-no-theme-named-flask-found.patch b/0003-fix-issue-no-theme-named-flask-found.patch
new file mode 100644
index 0000000..59bc9c8
--- /dev/null
+++ b/0003-fix-issue-no-theme-named-flask-found.patch
@@ -0,0 +1,20 @@
+From 3e86fd25e9638898618cda8352402f4281bf809b Mon Sep 17 00:00:00 2001
+From: chengkang <1412950785 at qq.com>
+Date: Mon, 17 Sep 2018 16:18:52 +0800
+Subject: [PATCH] fix issue: no theme named 'flask' found
+Origin: https://github.com/pallets/flask/commit/3e86fd25e9638898618cda8352402f4281bf809b
+
+---
+ docs/conf.py | 1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/docs/conf.py
++++ b/docs/conf.py
+@@ -20,6 +20,7 @@
+ extensions = [
+     'sphinx.ext.autodoc',
+     'sphinx.ext.intersphinx',
++    'pallets_sphinx_themes',
+ ]
+ 
+ intersphinx_mapping = {
diff --git a/0004-empty-CONTRIBUTING-rst.patch b/0004-empty-CONTRIBUTING-rst.patch
new file mode 100644
index 0000000..2e2fc40
--- /dev/null
+++ b/0004-empty-CONTRIBUTING-rst.patch
@@ -0,0 +1,8 @@
+Author: Ondřej Nový <onovy at debian.org>
+Description: Add empty CONTRIBUTING.rst
+Forwarded: sort of, https://github.com/pallets/flask/pull/2913
+
+--- /dev/null
++++ b/CONTRIBUTING.rst
+@@ -0,0 +1 @@
++
diff --git a/python-flask-python3.6.patch b/python-flask-python3.6.patch
deleted file mode 100644
index 55a7151..0000000
--- a/python-flask-python3.6.patch
+++ /dev/null
@@ -1,40 +0,0 @@
-From 01b992b1a1482246d705ffe3b3d0dd7816f0456b Mon Sep 17 00:00:00 2001
-From: Andrew Arendt <AndrewArendt at gmail.com>
-Date: Tue, 10 Jan 2017 11:20:53 -0600
-Subject: [PATCH] Added python3.6 support for tests
-
----
- .travis.yml         | 6 +++++-
- tests/test_basic.py | 2 +-
- tests/test_ext.py   | 4 ++--
- tox.ini             | 2 +-
- 4 files changed, 9 insertions(+), 5 deletions(-)
-
-diff --git a/tests/test_basic.py b/tests/test_basic.py
-index be3d5ed..a099c90 100644
---- a/tests/test_basic.py
-+++ b/tests/test_basic.py
-@@ -333,7 +333,7 @@ def test():
-     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
-diff --git a/tests/test_ext.py b/tests/test_ext.py
-index d336e40..ebb5f02 100644
---- a/tests/test_ext.py
-+++ b/tests/test_ext.py
-@@ -179,8 +179,8 @@ def test_flaskext_broken_package_no_module_caching(flaskext_broken):
- def test_no_error_swallowing(flaskext_broken):
-     with pytest.raises(ImportError) as excinfo:
-         import flask.ext.broken
--
--    assert excinfo.type is ImportError
-+    # python3.6 raises a subclass of ImportError: 'ModuleNotFoundError'
-+    assert issubclass(excinfo.type, ImportError)
-     if PY2:
-         message = 'No module named missing_module'
-     else:
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/python-flask.git/commitdiff/590f22ae513bfb2cfc53339bccbf67b23fb8301f



More information about the pld-cvs-commit mailing list