Gentoo Archives: gentoo-commits

From: Andreas Sturmlechner <asturm@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-python/flask-script/files/, dev-python/flask-script/
Date: Sun, 01 Dec 2019 19:27:41
Message-Id: 1575228300.c402d39ea0c39abcb27f01b965b011e9005ff54b.asturm@gentoo
1 commit: c402d39ea0c39abcb27f01b965b011e9005ff54b
2 Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
3 AuthorDate: Sat Nov 30 12:53:23 2019 +0000
4 Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
5 CommitDate: Sun Dec 1 19:25:00 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c402d39e
7
8 dev-python/flask-script: Add patch from Debian for flask_script usage
9
10 Package-Manager: Portage-2.3.80, Repoman-2.3.19
11 Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>
12
13 ...lask-script-2.0.6-flask_script-everywhere.patch | 54 ++++++++++++++++++++++
14 dev-python/flask-script/flask-script-2.0.6.ebuild | 2 +
15 2 files changed, 56 insertions(+)
16
17 diff --git a/dev-python/flask-script/files/flask-script-2.0.6-flask_script-everywhere.patch b/dev-python/flask-script/files/flask-script-2.0.6-flask_script-everywhere.patch
18 new file mode 100644
19 index 00000000000..b10b2f0a228
20 --- /dev/null
21 +++ b/dev-python/flask-script/files/flask-script-2.0.6-flask_script-everywhere.patch
22 @@ -0,0 +1,54 @@
23 +From fcf894b6e4d0ad17489480b722c870aaea600db1 Mon Sep 17 00:00:00 2001
24 +From: anthraxx <levente@×××××××××××××.net>
25 +Date: Wed, 6 Sep 2017 12:03:22 +0200
26 +Subject: [PATCH] using flask_script everywhere instead of flask.ext.script
27 +
28 +---
29 + docs/index.rst | 2 +-
30 + examples/manage.py | 4 ++--
31 + tests.py | 4 ++--
32 + 3 files changed, 5 insertions(+), 5 deletions(-)
33 +
34 +diff --git a/docs/index.rst b/docs/index.rst
35 +index 775ffca..9266d4b 100644
36 +--- a/docs/index.rst
37 ++++ b/docs/index.rst
38 +@@ -577,7 +577,7 @@ Then the user can register the sub-manager to their primary Manager (within mana
39 +
40 + manager = Manager(app)
41 +
42 +- from flask.ext.database import manager as database_manager
43 ++ from flask_database import manager as database_manager
44 + manager.add_command("database", database_manager)
45 +
46 + The commands will then be available::
47 +#diff --git a/examples/manage.py b/examples/manage.py
48 +#index 5c0dc21..8129555 100755
49 +#--- a/examples/manage.py
50 +#+++ b/examples/manage.py
51 +#@@ -4,8 +4,8 @@
52 +# import pprint
53 +#
54 +# from flask import Flask, current_app
55 +#-from flask.ext.script import Manager, prompt_choices, Server
56 +#-from flask.ext.script.commands import ShowUrls, Clean
57 +#+from flask_script import Manager, prompt_choices, Server
58 +#+from flask_script.commands import ShowUrls, Clean
59 +#
60 +#
61 +# def create_app(config=None):
62 +diff --git a/tests.py b/tests.py
63 +index 93d0071..24f3f15 100644
64 +--- a/tests.py
65 ++++ b/tests.py
66 +@@ -5,8 +5,8 @@
67 + import unittest
68 +
69 + from flask import Flask
70 +-from flask.ext.script._compat import StringIO, text_type
71 +-from flask.ext.script import Command, Manager, Option, prompt, prompt_bool, prompt_choices
72 ++from flask_script._compat import StringIO, text_type
73 ++from flask_script import Command, Manager, Option, prompt, prompt_bool, prompt_choices
74 +
75 + from pytest import raises
76 +
77
78 diff --git a/dev-python/flask-script/flask-script-2.0.6.ebuild b/dev-python/flask-script/flask-script-2.0.6.ebuild
79 index 8510f9ee8f0..58fcc347ef3 100644
80 --- a/dev-python/flask-script/flask-script-2.0.6.ebuild
81 +++ b/dev-python/flask-script/flask-script-2.0.6.ebuild
82 @@ -28,6 +28,8 @@ DEPEND="${RDEPEND}
83
84 S="${WORKDIR}/${MY_P}"
85
86 +PATCHES=( "${FILESDIR}/${P}-flask_script-everywhere.patch" )
87 +
88 python_compile_all() {
89 use doc && emake -C docs html
90 }