*/*: Clean PYTHON_COMPAT of obsolete impls
[gentoo.git] / dev-python / celery / celery-4.1.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
6 PYTHON_COMPAT=( python2_7 python3_6 )
7
8 inherit distutils-r1 bash-completion-r1
9
10 DESCRIPTION="Asynchronous task queue/job queue based on distributed message passing"
11 HOMEPAGE="http://celeryproject.org/ https://pypi.org/project/celery/"
12 SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
13
14 LICENSE="BSD"
15 SLOT="0"
16 KEYWORDS="amd64 x86"
17 # There are a number of other optional 'extras' which overlap with those of kombu, however
18 # there has been no apparent expression of interest or demand by users for them. See requires.txt
19 IUSE="doc examples redis sqs test yaml"
20 RESTRICT="!test? ( test )"
21
22 # kombu < 4.2: #666228 (can be loosened in next bump)
23 RDEPEND="
24         <dev-python/kombu-4.2[${PYTHON_USEDEP}]
25         >=dev-python/kombu-4.0.2[${PYTHON_USEDEP}]
26         >=dev-python/billiard-3.5.0.2[${PYTHON_USEDEP}]
27         <dev-python/billiard-3.6.0[${PYTHON_USEDEP}]
28         dev-python/pytz[${PYTHON_USEDEP}]
29         dev-python/greenlet[${PYTHON_USEDEP}]
30         dev-python/vine[${PYTHON_USEDEP}]
31 "
32
33 DEPEND="
34         dev-python/setuptools[${PYTHON_USEDEP}]
35         test? ( ${RDEPEND}
36                 >=dev-python/case-1.3.1[${PYTHON_USEDEP}]
37                 dev-python/eventlet[${PYTHON_USEDEP}]
38                 dev-python/gevent[$(python_gen_usedep python2_7)]
39                 >=dev-python/pymongo-2.6.2[${PYTHON_USEDEP}]
40                 dev-python/pyopenssl[${PYTHON_USEDEP}]
41                 >=dev-python/pytest-3.0[${PYTHON_USEDEP}]
42                 >=dev-python/python-dateutil-2.1[${PYTHON_USEDEP}]
43                 dev-python/sqlalchemy[${PYTHON_USEDEP}]
44                 dev-python/redis-py[${PYTHON_USEDEP}]
45                 >=dev-db/redis-2.8.0
46                 >=dev-python/boto-2.13.3[${PYTHON_USEDEP}]
47                 >=dev-python/pyzmq-13.1.0[${PYTHON_USEDEP}]
48                 >=dev-python/pyyaml-3.10[${PYTHON_USEDEP}]
49                 >=dev-python/unittest2-0.5.1[${PYTHON_USEDEP}]
50         )
51         doc? (
52                 dev-python/docutils[${PYTHON_USEDEP}]
53                 >=dev-python/sphinx_celery-1.3[${PYTHON_USEDEP}]
54                 dev-python/jinja[${PYTHON_USEDEP}]
55                 dev-python/sqlalchemy[${PYTHON_USEDEP}]
56                 $(python_gen_cond_dep 'dev-python/typing[${PYTHON_USEDEP}]' python2_7)
57         )"
58
59 # testsuite needs it own source
60 DISTUTILS_IN_SOURCE_BUILD=1
61
62 python_compile_all() {
63         if use doc; then
64                 mkdir docs/.build || die
65                 emake -C docs html
66         fi
67 }
68
69 python_test() {
70         esetup.py test
71 }
72
73 python_install_all() {
74         # Main celeryd init.d and conf.d
75         newinitd "${FILESDIR}/celery.initd-r2" celery
76         newconfd "${FILESDIR}/celery.confd-r2" celery
77
78         if use examples; then
79                 docompress -x "/usr/share/doc/${PF}/examples"
80                 docinto examples
81                 dodoc -r examples/.
82         fi
83
84         use doc && local HTML_DOCS=( docs/_build/html/. )
85
86         newbashcomp extra/bash-completion/celery.bash ${PN}
87
88         distutils-r1_python_install_all
89 }
90
91 pkg_postinst() {
92         optfeature "zookeeper support" dev-python/kazoo
93         optfeature "msgpack support" dev-python/msgpack
94         #optfeature "rabbitmq support" dev-python/librabbitmq
95         #optfeature "slmq support" dev-python/softlayer_messaging
96         optfeature "eventlet support" dev-python/eventlet
97         #optfeature "couchbase support" dev-python/couchbase
98         optfeature "redis support" dev-db/redis dev-python/redis-py
99         optfeature "gevent support" dev-python/gevent
100         optfeature "auth support" dev-python/pyopenssl
101         optfeature "pyro support" dev-python/pyro:4
102         optfeature "yaml support" dev-python/pyyaml
103         optfeature "memcache support" dev-python/pylibmc
104         #optfeature "threads support" dev-python/threadpool
105         optfeature "mongodb support" dev-python/pymongo
106         optfeature "sqlalchemy support" dev-python/sqlalchemy
107         optfeature "sqs support" dev-python/boto
108         #optfeature "cassandra support" dev-python/pycassa
109 }