dev-python/websocket-client: 0.57.0
[gentoo.git] / dev-python / hpack / hpack-3.0.0.ebuild
1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=6
5 PYTHON_COMPAT=( python2_7 python3_{6,7,8})
6
7 inherit distutils-r1
8
9 DESCRIPTION="Pure-Python HPACK header compression"
10 HOMEPAGE="https://python-hyper.org/hpack/en/latest/ https://pypi.org/project/hpack/"
11 SRC_URI="https://github.com/python-hyper/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
12
13 LICENSE="MIT"
14 SLOT="0"
15 KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~mips ppc ppc64 s390 sparc x86"
16 IUSE="test"
17 RESTRICT="!test? ( test )"
18
19 RDEPEND=""
20 # dev-python/pytest-relaxed causes tests to fail
21 DEPEND="${RDEPEND}
22         test? (
23                 >=dev-python/pytest-2.9.2[${PYTHON_USEDEP}]
24                 >=dev-python/hypothesis-3.4.2[${PYTHON_USEDEP}]
25                 !!dev-python/pytest-relaxed[${PYTHON_USEDEP}]
26         )
27 "
28
29 PATCHES=(
30         "${FILESDIR}"/hpack-3.0.0-hypothesis-healthcheck.patch
31 )
32
33 python_prepare_all() {
34         # Remove a test that is not part of the mainstream tests
35         # Also, it's data directory is not included in the release
36         rm test/test_hpack_integration.py || die
37         distutils-r1_python_prepare_all
38 }
39
40 python_test() {
41         pytest -vv hpack test || die "Tests fail with ${EPYTHON}"
42 }