dev-python/flask-login: python3_8, disable broken test, missing RDEPEND
authorAndreas Sturmlechner <asturm@gentoo.org>
Sat, 30 Nov 2019 12:15:30 +0000 (13:15 +0100)
committerAndreas Sturmlechner <asturm@gentoo.org>
Wed, 5 Feb 2020 21:27:34 +0000 (22:27 +0100)
Test failed with python3_6 already.

Upstream bug: https://github.com/maxcountryman/flask-login/issues/461

Closes: https://bugs.gentoo.org/701546
Package-Manager: Portage-2.3.87, Repoman-2.3.20
Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
dev-python/flask-login/flask-login-0.4.1-r1.ebuild [new file with mode: 0644]

diff --git a/dev-python/flask-login/flask-login-0.4.1-r1.ebuild b/dev-python/flask-login/flask-login-0.4.1-r1.ebuild
new file mode 100644 (file)
index 0000000..716ad88
--- /dev/null
@@ -0,0 +1,53 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( pypy3 python3_{6,7,8} )
+inherit distutils-r1
+
+DESCRIPTION="Login session support for Flask"
+HOMEPAGE="https://pypi.org/project/Flask-Login/"
+# Should be replaced with the PyPi URI for the next release, if possible
+# See https://github.com/maxcountryman/flask-login/pull/393
+SRC_URI="https://github.com/maxcountryman/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="doc test"
+RESTRICT="!test? ( test )"
+
+RDEPEND="
+       >=dev-python/flask-0.10[${PYTHON_USEDEP}]
+       dev-python/werkzeug[${PYTHON_USEDEP}]
+"
+DEPEND="
+       doc? (
+               dev-python/sphinx[${PYTHON_USEDEP}]
+       )
+       test? (
+               ${RDEPEND}
+               dev-python/blinker[${PYTHON_USEDEP}]
+               dev-python/mock[${PYTHON_USEDEP}]
+               dev-python/nose[${PYTHON_USEDEP}]
+               dev-python/semantic_version[${PYTHON_USEDEP}]
+       )"
+
+python_prepare_all() {
+       sed -i "s/'sphinx.ext.intersphinx', //" docs/conf.py || die
+       distutils-r1_python_prepare_all
+}
+
+python_compile_all() {
+       if use doc; then
+               emake -C docs html
+               HTML_DOCS=( docs/_build/html/. )
+       fi
+}
+
+python_test() {
+       # test is broken upstream with >=dev-python/werkzeug-0.15, bug 701546
+       nosetests -v -e test_unauthorized_uses_host_from_x_forwarded_for_header \
+               || die "Tests fail with ${EPYTHON}"
+}