diff options
author | Louis Sautier <sbraz@gentoo.org> | 2020-09-23 13:23:09 +0200 |
---|---|---|
committer | Louis Sautier <sbraz@gentoo.org> | 2020-09-23 13:29:52 +0200 |
commit | 54a61e3f1ecd9a83cb4603b23d6bcb1a11f9051b (patch) | |
tree | 2b851951dda88ea1d417baa7df065923223ba960 /dev-python/flask-api | |
parent | app-crypt/acme-sh: drop old version (diff) | |
download | gentoo-54a61e3f1ecd9a83cb4603b23d6bcb1a11f9051b.tar.gz gentoo-54a61e3f1ecd9a83cb4603b23d6bcb1a11f9051b.tar.bz2 gentoo-54a61e3f1ecd9a83cb4603b23d6bcb1a11f9051b.zip |
dev-python/flask-api: add PyPy3 and Python 3.9 support, fix deps
Also update HOMEPAGE.
Package-Manager: Portage-3.0.7, Repoman-3.0.1
Signed-off-by: Louis Sautier <sbraz@gentoo.org>
Diffstat (limited to 'dev-python/flask-api')
-rw-r--r-- | dev-python/flask-api/files/flask-api-2.0-fix-pypy-tests.patch | 22 | ||||
-rw-r--r-- | dev-python/flask-api/flask-api-2.0.ebuild | 13 |
2 files changed, 30 insertions, 5 deletions
diff --git a/dev-python/flask-api/files/flask-api-2.0-fix-pypy-tests.patch b/dev-python/flask-api/files/flask-api-2.0-fix-pypy-tests.patch new file mode 100644 index 000000000000..4d30691b60d3 --- /dev/null +++ b/dev-python/flask-api/files/flask-api-2.0-fix-pypy-tests.patch @@ -0,0 +1,22 @@ +commit beb6a364de93a429398a9491e16f60a7aa82f51d +Author: Louis Sautier <sautier.louis@gmail.com> +Date: Tue Sep 22 00:46:38 2020 +0200 + + Fix tests with PyPy, remove unused Python2-related code + +diff --git a/flask_api/tests/test_parsers.py b/flask_api/tests/test_parsers.py +index 90a6b83..b7968f6 100644 +--- a/flask_api/tests/test_parsers.py ++++ b/flask_api/tests/test_parsers.py +@@ -36,9 +36,9 @@ class ParserTests(unittest.TestCase): + with self.assertRaises(exceptions.ParseError) as context: + parser.parse(stream, mediatypes.MediaType('application/json')) + detail = str(context.exception) +- expected_py2 = 'JSON parse error - Expecting property name: line 1 column 1 (char 1)' ++ expected_pypy = 'JSON parse error - Key name must be string at char: line 1 column 2 (char 1)' + expected_py3 = 'JSON parse error - Expecting property name enclosed in double quotes: line 1 column 2 (char 1)' +- self.assertIn(detail, (expected_py2, expected_py3)) ++ self.assertIn(detail, (expected_pypy, expected_py3)) + + def test_invalid_multipart(self): + parser = parsers.MultiPartParser() diff --git a/dev-python/flask-api/flask-api-2.0.ebuild b/dev-python/flask-api/flask-api-2.0.ebuild index e2fe9c1ce9dc..65d2fb330244 100644 --- a/dev-python/flask-api/flask-api-2.0.ebuild +++ b/dev-python/flask-api/flask-api-2.0.ebuild @@ -3,12 +3,12 @@ EAPI=7 -PYTHON_COMPAT=( python3_{6,7,8} ) +PYTHON_COMPAT=( pypy3 python3_{6,7,8,9} ) inherit distutils-r1 DESCRIPTION="Browsable web APIs for Flask" -HOMEPAGE="https://github.com/flask-api/flask-api" +HOMEPAGE="https://www.flaskapi.org/" # pypi mirror don't have docs folder SRC_URI="https://github.com/flask-api/flask-api/archive/v${PV}.tar.gz -> ${P}.tar.gz" @@ -16,10 +16,13 @@ LICENSE="BSD-2" SLOT="0" KEYWORDS="~amd64 ~x86" -RDEPEND="dev-python/flask[${PYTHON_USEDEP}] - dev-python/markdown[${PYTHON_USEDEP}]" +RDEPEND=" + dev-python/flask[${PYTHON_USEDEP}] + dev-python/markdown[${PYTHON_USEDEP}] +" -DEPEND="${RDEPEND}" +# https://github.com/flask-api/flask-api/pull/117 +PATCHES=( "${FILESDIR}/${P}-fix-pypy-tests.patch" ) distutils_enable_tests pytest |