]> git.pld-linux.org Git - packages/python-flask.git/commitdiff
- updated to 1.1.4 (for python2.7) instead of accidental 2.0.2 commit master auto/th/python-flask-1.1.4-1
authorJakub Bogusz <qboosh@pld-linux.org>
Fri, 13 Oct 2023 19:02:53 +0000 (21:02 +0200)
committerJakub Bogusz <qboosh@pld-linux.org>
Fri, 13 Oct 2023 19:02:53 +0000 (21:02 +0200)
- added patch to fix pathlib test

0001-Don-t-require-sphinxcontrib.log_cabinet-extension.patch
python-flask-pathlib2.patch [new file with mode: 0644]
python-flask.spec

index 15dd0a03496e74d51e4d1e42ea1dc3148ed7810e..be0cbdcfade38e05851ce7b0a9e8cc6618b5ce3a 100644 (file)
@@ -7,9 +7,8 @@ Subject: Don't require sphinxcontrib.log_cabinet extension
  docs/conf.py | 1 -
  1 file changed, 1 deletion(-)
 
-diff -urNp -x '*.orig' Flask-2.0.2.org/docs/conf.py Flask-2.0.2/docs/conf.py
---- Flask-2.0.2.org/docs/conf.py       2021-10-01 16:21:57.000000000 +0000
-+++ Flask-2.0.2/docs/conf.py   2021-10-13 09:57:24.866571598 +0000
+--- Flask-1.1.4/docs/conf.py.orig      2023-10-12 21:40:03.642274295 +0200
++++ Flask-1.1.4/docs/conf.py   2023-10-12 21:40:50.942018051 +0200
 @@ -15,7 +15,6 @@ master_doc = "index"
  extensions = [
      "sphinx.ext.autodoc",
@@ -17,4 +16,4 @@ diff -urNp -x '*.orig' Flask-2.0.2.org/docs/conf.py Flask-2.0.2/docs/conf.py
 -    "sphinxcontrib.log_cabinet",
      "pallets_sphinx_themes",
      "sphinx_issues",
-     "sphinx_tabs.tabs",
+ ]
diff --git a/python-flask-pathlib2.patch b/python-flask-pathlib2.patch
new file mode 100644 (file)
index 0000000..eb8fc5c
--- /dev/null
@@ -0,0 +1,16 @@
+Python 2.x pathlib backport doesn't support conversion to str via __fspath__(); pathlib2 does.
+
+--- Flask-1.1.4/tests/test_basic.py.orig       2021-05-14 03:21:10.000000000 +0200
++++ Flask-1.1.4/tests/test_basic.py    2023-10-13 20:55:23.278726095 +0200
+@@ -1426,7 +1426,10 @@ def test_static_url_empty_path_default(a
+ def test_static_folder_with_pathlib_path(app):
+-    from pathlib import Path
++    try:
++        from pathlib2 import Path
++    except ImportError:
++        from pathlib import Path
+     app = flask.Flask(__name__, static_folder=Path("static"))
+     rv = app.test_client().open("/static/index.html", method="GET")
index 0cd4aafcd33954fff024f7c119dc8586faa74684..0769394b2e2b889c8d96b2fb038e23ccd98f414a 100644 (file)
@@ -3,21 +3,22 @@
 %bcond_without  doc    # Sphinx documentation
 %bcond_without tests   # unit tests
 %bcond_without python2 # CPython 2.x module
-# see python3-flask.spec
-%bcond_with    python3 # CPython 3.x module
+%bcond_with    python3 # CPython 3.x module (built from python3-flask.spec)
 
 %define        module  flask
 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:       2.0.2
+# keep 1.x here for python2 support
+Version:       1.1.4
 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: f875da30335908956e2f9f3d0f224f2d
+# Source0-md5: 49c23fb3096ee548f9737bbddc934c41
 Patch0:                0001-Don-t-require-sphinxcontrib.log_cabinet-extension.patch
+Patch1:                %{name}-pathlib2.patch
 URL:           https://flask.palletsprojects.com/
 %if %{with tests} && %(locale -a | grep -q '^C\.UTF-8$'; echo $?)
 BuildRequires: glibc-localedb-all
@@ -30,6 +31,7 @@ BuildRequires:        python-setuptools
 BuildRequires: python-click >= 5.1
 BuildRequires: python-itsdangerous >= 0.24
 BuildRequires: python-jinja2 >= 2.10.1
+BuildRequires: python-pathlib2
 BuildRequires: python-pytest
 BuildRequires: python-werkzeug >= 0.15
 %endif
@@ -93,6 +95,7 @@ Dokumentacja do pakietu Pythona Flask.
 %prep
 %setup -q -n Flask-%{version}
 %patch0 -p1
+%patch1 -p1
 
 %build
 %if %{with python2}
This page took 0.150867 seconds and 4 git commands to generate.