Gentoo Archives: gentoo-commits

From: Arthur Zamarin <arthurzam@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-python/flask-script/, dev-python/flask-script/files/
Date: Tue, 24 Aug 2021 18:20:35
Message-Id: 1629829081.27d8ceb8cfe8c704601449d84e4f970039eab20d.arthurzam@gentoo
1 commit: 27d8ceb8cfe8c704601449d84e4f970039eab20d
2 Author: Arthur Zamarin <arthurzam <AT> gentoo <DOT> org>
3 AuthorDate: Mon Aug 23 18:08:20 2021 +0000
4 Commit: Arthur Zamarin <arthurzam <AT> gentoo <DOT> org>
5 CommitDate: Tue Aug 24 18:18:01 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=27d8ceb8
7
8 dev-python/flask-script: enable py3.10, cleanup ebuild
9
10 Signed-off-by: Arthur Zamarin <arthurzam <AT> gentoo.org>
11
12 ...lask-script-2.0.6-flask_script-everywhere.patch | 39 ++++++++--------------
13 dev-python/flask-script/flask-script-2.0.6.ebuild | 23 +++----------
14 2 files changed, 18 insertions(+), 44 deletions(-)
15
16 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
17 index b10b2f0a228..04259c89a42 100644
18 --- a/dev-python/flask-script/files/flask-script-2.0.6-flask_script-everywhere.patch
19 +++ b/dev-python/flask-script/files/flask-script-2.0.6-flask_script-everywhere.patch
20 @@ -1,16 +1,7 @@
21 -From fcf894b6e4d0ad17489480b722c870aaea600db1 Mon Sep 17 00:00:00 2001
22 From: anthraxx <levente@×××××××××××××.net>
23 Date: Wed, 6 Sep 2017 12:03:22 +0200
24 Subject: [PATCH] using flask_script everywhere instead of flask.ext.script
25
26 ----
27 - docs/index.rst | 2 +-
28 - examples/manage.py | 4 ++--
29 - tests.py | 4 ++--
30 - 3 files changed, 5 insertions(+), 5 deletions(-)
31 -
32 -diff --git a/docs/index.rst b/docs/index.rst
33 -index 775ffca..9266d4b 100644
34 --- a/docs/index.rst
35 +++ b/docs/index.rst
36 @@ -577,7 +577,7 @@ Then the user can register the sub-manager to their primary Manager (within mana
37 @@ -22,23 +13,6 @@ index 775ffca..9266d4b 100644
38 manager.add_command("database", database_manager)
39
40 The commands will then be available::
41 -#diff --git a/examples/manage.py b/examples/manage.py
42 -#index 5c0dc21..8129555 100755
43 -#--- a/examples/manage.py
44 -#+++ b/examples/manage.py
45 -#@@ -4,8 +4,8 @@
46 -# import pprint
47 -#
48 -# from flask import Flask, current_app
49 -#-from flask.ext.script import Manager, prompt_choices, Server
50 -#-from flask.ext.script.commands import ShowUrls, Clean
51 -#+from flask_script import Manager, prompt_choices, Server
52 -#+from flask_script.commands import ShowUrls, Clean
53 -#
54 -#
55 -# def create_app(config=None):
56 -diff --git a/tests.py b/tests.py
57 -index 93d0071..24f3f15 100644
58 --- a/tests.py
59 +++ b/tests.py
60 @@ -5,8 +5,8 @@
61 @@ -52,3 +26,16 @@ index 93d0071..24f3f15 100644
62
63 from pytest import raises
64
65 +--- a/flask_script/__init__.py
66 ++++ b/flask_script/__init__.py
67 +@@ -12,9 +12,8 @@ from collections import OrderedDict
68 + import argparse
69 +
70 + from flask import Flask
71 +-from flask._compat import text_type
72 +
73 +-from ._compat import iteritems
74 ++from ._compat import iteritems, text_type
75 + from .commands import Group, Option, Command, Server, Shell
76 + from .cli import prompt, prompt_pass, prompt_bool, prompt_choices
77 +
78
79 diff --git a/dev-python/flask-script/flask-script-2.0.6.ebuild b/dev-python/flask-script/flask-script-2.0.6.ebuild
80 index cd84dc29df0..1932eee2f30 100644
81 --- a/dev-python/flask-script/flask-script-2.0.6.ebuild
82 +++ b/dev-python/flask-script/flask-script-2.0.6.ebuild
83 @@ -3,7 +3,7 @@
84
85 EAPI=7
86
87 -PYTHON_COMPAT=( python3_{7,8,9} )
88 +PYTHON_COMPAT=( python3_{8..10} )
89 inherit distutils-r1
90
91 MY_PN="Flask-Script"
92 @@ -14,32 +14,19 @@ HOMEPAGE="https://flask-script.readthedocs.io/en/latest/
93 https://flask-script.readthedocs.io/en/latest/
94 https://pypi.org/project/Flask-Script/"
95 SRC_URI="mirror://pypi/${MY_PN:0:1}/${MY_PN}/${MY_P}.tar.gz"
96 +S="${WORKDIR}/${MY_P}"
97
98 LICENSE="BSD"
99 SLOT="0"
100 KEYWORDS="amd64 x86"
101 -IUSE="doc test"
102 -RESTRICT="!test? ( test )"
103
104 RDEPEND=">=dev-python/flask-0.10.1-r1[${PYTHON_USEDEP}]"
105 -DEPEND="${RDEPEND}
106 - dev-python/setuptools[${PYTHON_USEDEP}]
107 - doc? ( dev-python/sphinx[${PYTHON_USEDEP}] )
108 - test? ( dev-python/pytest[${PYTHON_USEDEP}] )"
109 -
110 -S="${WORKDIR}/${MY_P}"
111
112 PATCHES=( "${FILESDIR}/${P}-flask_script-everywhere.patch" )
113
114 -python_compile_all() {
115 - use doc && emake -C docs html
116 -}
117 +distutils_enable_tests pytest
118 +distutils_enable_sphinx docs
119
120 python_test() {
121 - py.test tests.py || die "Tests failed under ${EPYTHON}"
122 -}
123 -
124 -python_install_all() {
125 - use doc && local HTML_DOCS=( docs/_build/html/. )
126 - distutils-r1_python_install_all
127 + epytest tests.py
128 }