diff options
author | 2021-03-02 08:26:48 +0000 | |
---|---|---|
committer | 2021-03-02 08:40:19 +0000 | |
commit | c4952755d59519af229a8973e08e90291d93ee16 (patch) | |
tree | b2a2a9a83e3cb2888580fc29a744473d3ffc71b4 /dev-python/falcon | |
parent | dev-python/flask: add Python 3.9 to live too (diff) | |
download | gentoo-c4952755d59519af229a8973e08e90291d93ee16.tar.gz gentoo-c4952755d59519af229a8973e08e90291d93ee16.tar.bz2 gentoo-c4952755d59519af229a8973e08e90291d93ee16.zip |
dev-python/falcon: Python 3.9, tests, modernise
Closes: https://bugs.gentoo.org/748279
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'dev-python/falcon')
-rw-r--r-- | dev-python/falcon/falcon-2.0.0.ebuild | 33 |
1 files changed, 22 insertions, 11 deletions
diff --git a/dev-python/falcon/falcon-2.0.0.ebuild b/dev-python/falcon/falcon-2.0.0.ebuild index e22b065f73af..ff5be1f6d87a 100644 --- a/dev-python/falcon/falcon-2.0.0.ebuild +++ b/dev-python/falcon/falcon-2.0.0.ebuild @@ -1,10 +1,10 @@ -# Copyright 1999-2020 Gentoo Authors +# Copyright 1999-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=7 -PYTHON_COMPAT=( python3_{7,8} ) - +PYTHON_COMPAT=( python3_{7,8,9} ) +DISTUTILS_USE_SETUPTOOLS=rdepend inherit distutils-r1 DESCRIPTION="A supersonic micro-framework for building cloud APIs" @@ -15,20 +15,31 @@ LICENSE="Apache-2.0" SLOT="0" KEYWORDS="~amd64 ~x86" IUSE="+cython" -RESTRICT="test" -RDEPEND="dev-python/six[${PYTHON_USEDEP}] +BDEPEND="cython? ( dev-python/cython[${PYTHON_USEDEP}] )" +RDEPEND=" + dev-python/six[${PYTHON_USEDEP}] dev-python/python-mimeparse[${PYTHON_USEDEP}] - cython? ( dev-python/cython[${PYTHON_USEDEP}] )" +" +DEPEND="${RDEPEND}" -DEPEND="${RDEPEND} - dev-python/setuptools[${PYTHON_USEDEP}]" +distutils_enable_tests pytest src_prepare() { if ! use cython; then - sed -i -e 's/if with_cython:/if False:/' setup.py \ - || die 'sed failed.' + sed -i -e 's/if with_cython:/if False:/' setup.py || die fi - eapply_user + default +} + +python_test() { + local deselect=( + # mujson is unpackaged, test-only dep + --ignore tests/test_media_handlers.py + # uses unsafe serialization (unsafe_load) + --deselect tests/test_httperror.py::TestHTTPError::test_custom_error_serializer + ) + + pytest -vv "${deselect[@]}" || die "Tests failed with ${EPYTHON}" } |