048fbe2ede252eacf67b089a77e09baeaa845910
[gentoo.git] / dev-python / bokeh / bokeh-0.7.1.ebuild
1 # Copyright 1999-2015 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Id$
4
5 EAPI=5
6
7 PYTHON_COMPAT=( python2_7 python3_{3,4,5} )
8
9 inherit distutils-r1 readme.gentoo
10
11 DESCRIPTION="Statistical and interactive HTML plots for Python"
12 HOMEPAGE="http://bokeh.pydata.org/"
13 SRC_URI="https://github.com/ContinuumIO/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
14
15 SLOT="0"
16 LICENSE="BSD"
17 KEYWORDS="amd64 x86 ~amd64-linux ~x86-linux"
18 IUSE="examples test"
19
20 # A doc build requires napoleon sphinx extension which will be included in sphinx release 1.3
21 # Therefore refraining from adding the doc build for now
22 RDEPEND="
23         >=dev-python/colorama-0.2.7[${PYTHON_USEDEP}]
24         >=dev-python/click-3.3[${PYTHON_USEDEP}]
25         >=dev-python/flask-0.10.1[${PYTHON_USEDEP}]
26         >=dev-python/greenlet-0.4.1[${PYTHON_USEDEP}]
27         >=dev-python/itsdangerous-0.21[${PYTHON_USEDEP}]
28         >=dev-python/jinja-2.7[${PYTHON_USEDEP}]
29         >=dev-python/markdown-2.3.1[${PYTHON_USEDEP}]
30         >=dev-python/markupsafe-0.18[${PYTHON_USEDEP}]
31         >=dev-python/numpy-1.7.1[${PYTHON_USEDEP}]
32         >=dev-python/pandas-0.11[${PYTHON_USEDEP}]
33         >=dev-python/pygments-1.6[${PYTHON_USEDEP}]
34         >=dev-python/python-dateutil-2.1[${PYTHON_USEDEP}]
35         >=dev-python/pystache-0.5.3[${PYTHON_USEDEP}]
36         >=dev-python/pytz-2013b[${PYTHON_USEDEP}]
37         >=dev-python/pyyaml-3.10[${PYTHON_USEDEP}]
38         >=dev-python/pyzmq-14.3.1[${PYTHON_USEDEP}]
39         >=dev-python/redis-py-2.7.6[${PYTHON_USEDEP}]
40         >=dev-python/requests-1.2.3[${PYTHON_USEDEP}]
41         >=dev-python/six-1.5.2[${PYTHON_USEDEP}]
42         >=dev-python/werkzeug-0.9.1[${PYTHON_USEDEP}]
43         >=net-libs/nodejs-0.8.28[npm]
44         >=www-client/phantomjs-1.9.8
45         >=www-servers/tornado-4.0.1[${PYTHON_USEDEP}]
46         $(python_gen_cond_dep '>=dev-python/gevent-1.0[${PYTHON_USEDEP}]' python2_7)
47         $(python_gen_cond_dep '>=dev-python/gevent-websocket-0.9.2[${PYTHON_USEDEP}]' python2_7)
48         "
49 # testing server: needs websocket not in portage yet
50 # websocket is in pypi for the adding
51 # hdf5 backend: needs array management not in portage yet
52 DEPEND="
53         test? (
54                 ${RDEPEND}
55                 >=dev-python/nose-1.3.0[${PYTHON_USEDEP}]
56                 $(python_gen_cond_dep '>=dev-python/mock-1.0.1[${PYTHON_USEDEP}]' python2_7)
57                 >=dev-python/colorama-0.2.7[${PYTHON_USEDEP}] )
58         "
59 DOCS=( CHANGELOG QUICKSTART.md README.md )
60
61 PATCHES=( "${FILESDIR}"/${P}-setup.patch )
62
63 python_prepare_all() {
64         DOC_CONTENTS="websockets work only with python2_7"
65
66         sed -i -e "s/jsbuild = get_user_jsargs()/jsbuild = False/g" setup.py || die
67         cd bokehjs || die
68         npm install ||die
69         cd .. || die
70         esetup.py --build_js sdist
71
72         distutils-r1_python_prepare_all
73 }
74
75 python_install_all() {
76         readme.gentoo_create_doc
77
78         use examples && local EXAMPLES=( examples/. )
79
80         distutils-r1_python_install_all
81 }
82
83 python_test() {
84         cd "${BUILD_DIR}"/lib || die
85         # exclude server tests for now
86         nosetests -v \
87                 -e multiuser_auth_test \
88                 -e usermodel_test \
89                 || die
90 }