1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
5 PYTHON_COMPAT=( python2_7 python3_{6,7,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"
15 KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~mips ppc ppc64 s390 sparc x86"
17 RESTRICT="!test? ( test )"
20 # dev-python/pytest-relaxed causes tests to fail
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}]
30 "${FILESDIR}"/hpack-3.0.0-hypothesis-healthcheck.patch
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
41 pytest -vv hpack test || die "Tests fail with ${EPYTHON}"