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} )
12 DESCRIPTION="Low-level AMQP client for Python (fork of amqplib)"
13 HOMEPAGE="https://github.com/celery/py-amqp https://pypi.org/project/amqp/"
14 SRC_URI="mirror://pypi/${MY_PN:0:1}/${MY_PN}/${MY_P}.tar.gz"
16 S="${WORKDIR}/${MY_P}"
20 KEYWORDS="amd64 ~arm64 x86"
21 IUSE="doc extras test"
22 RESTRICT="!test? ( test )"
26 dev-python/setuptools[${PYTHON_USEDEP}]
27 >=dev-python/vine-1.1.3[${PYTHON_USEDEP}]
29 dev-python/sphinx[${PYTHON_USEDEP}]
30 dev-python/sphinx_celery[${PYTHON_USEDEP}]
33 >=dev-python/case-1.3.1[${PYTHON_USEDEP}]
34 >=dev-python/pytest-3.0[${PYTHON_USEDEP}]
35 dev-python/pytest-cov[${PYTHON_USEDEP}]
36 dev-python/pytest-mock[${PYTHON_USEDEP}]
37 >=dev-python/pytest-rerunfailures-6.0[${PYTHON_USEDEP}]
41 python_prepare_all() {
42 # pytest-sugar is not packaged
43 sed -e '/pytest-sugar/d' -i requirements/test.txt || die
45 # requires a rabbitmq instance
46 rm t/integration/test_rmq.py || die
48 distutils-r1_python_prepare_all
51 python_compile_all() {
52 use doc && emake -C docs html
59 python_install_all() {
60 use doc && local HTML_DOCS=( docs/_build/html/. )
62 insinto /usr/share/${PF}/extras
65 distutils-r1_python_install_all