1 |
commit: b6f4fe94c0bf11d823d61e21c82a6c005b90fed0 |
2 |
Author: Witold Pilat <witold.pilat <AT> gmail <DOT> com> |
3 |
AuthorDate: Mon Jul 7 03:40:44 2014 +0000 |
4 |
Commit: Justin Lecher <jlec <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Jul 7 03:40:44 2014 +0000 |
6 |
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/sci.git;a=commit;h=b6f4fe94 |
7 |
|
8 |
dev-python/bokeh: dev-python/bokeh: New version with python3 support for bug #516052 |
9 |
|
10 |
Package-Manager: portage-2.2.10 |
11 |
|
12 |
--- |
13 |
dev-python/bokeh/ChangeLog | 11 +++++ |
14 |
.../{bokeh-0.4.2.ebuild => bokeh-0.4.4.ebuild} | 57 ++++++++++++++++++---- |
15 |
.../bokeh/files/bokeh-0.4.4-fix_test_object.patch | 32 ++++++++++++ |
16 |
dev-python/bokeh/metadata.xml | 3 ++ |
17 |
4 files changed, 93 insertions(+), 10 deletions(-) |
18 |
|
19 |
diff --git a/dev-python/bokeh/ChangeLog b/dev-python/bokeh/ChangeLog |
20 |
index e69de29..0dac602 100644 |
21 |
--- a/dev-python/bokeh/ChangeLog |
22 |
+++ b/dev-python/bokeh/ChangeLog |
23 |
@@ -0,0 +1,11 @@ |
24 |
+# ChangeLog for dev-python/bokeh |
25 |
+# Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2 |
26 |
+# $Header: $ |
27 |
+ |
28 |
+*bokeh-0.4.4 (07 Jul 2014) |
29 |
+ |
30 |
+ 07 Jul 2014; Witold Pilat (fau) <witold.pilat@×××××.com> +bokeh-0.4.4.ebuild, |
31 |
+ +files/bokeh-0.4.4-fix_test_object.patch, -ChangeLog, -Manifest, |
32 |
+ -bokeh-0.4.2.ebuild, metadata.xml: |
33 |
+ dev-python/bokeh: dev-python/bokeh: New version with python3 support for bug |
34 |
+ #516052 |
35 |
|
36 |
diff --git a/dev-python/bokeh/bokeh-0.4.2.ebuild b/dev-python/bokeh/bokeh-0.4.4.ebuild |
37 |
similarity index 52% |
38 |
rename from dev-python/bokeh/bokeh-0.4.2.ebuild |
39 |
rename to dev-python/bokeh/bokeh-0.4.4.ebuild |
40 |
index 8f865c0..22d38c5 100644 |
41 |
--- a/dev-python/bokeh/bokeh-0.4.2.ebuild |
42 |
+++ b/dev-python/bokeh/bokeh-0.4.4.ebuild |
43 |
@@ -4,7 +4,7 @@ |
44 |
|
45 |
EAPI=5 |
46 |
|
47 |
-PYTHON_COMPAT=( python2_7 ) |
48 |
+PYTHON_COMPAT=( python{2_7,3_3,3_4} ) |
49 |
|
50 |
inherit distutils-r1 |
51 |
|
52 |
@@ -15,13 +15,11 @@ SRC_URI="https://github.com/ContinuumIO/${PN}/archive/${PV}.tar.gz -> ${P}.tar.g |
53 |
SLOT="0" |
54 |
LICENSE="BSD" |
55 |
KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux" |
56 |
-IUSE="doc test" |
57 |
+IUSE="examples test chaco" |
58 |
+# docs require napoleon sphinx extension which will be included in next sphinx release |
59 |
|
60 |
RDEPEND=" |
61 |
- >=dev-python/chaco-4.4[$(python_gen_usedep 'python2_7')] |
62 |
>=dev-python/flask-0.10.1[${PYTHON_USEDEP}] |
63 |
- >=dev-python/gevent-0.13.8[$(python_gen_usedep 'python2_7')] |
64 |
- >=dev-python/gevent-websocket-0.3.6[$(python_gen_usedep 'python2_7')] |
65 |
>=dev-python/greenlet-0.4.1[${PYTHON_USEDEP}] |
66 |
>=dev-python/itsdangerous-0.23[${PYTHON_USEDEP}] |
67 |
>=dev-python/jinja-2.7[${PYTHON_USEDEP}] |
68 |
@@ -37,25 +35,64 @@ RDEPEND=" |
69 |
>=dev-python/redis-py-2.7.6[${PYTHON_USEDEP}] |
70 |
>=dev-python/requests-1.2.3[${PYTHON_USEDEP}] |
71 |
>=dev-python/six-1.5.2[${PYTHON_USEDEP}] |
72 |
- >=dev-python/traits-4.4[$(python_gen_usedep 'python2_7')] |
73 |
>=dev-python/werkzeug-0.9.1[${PYTHON_USEDEP}] |
74 |
- >=virtual/python-argparse-1[${PYTHON_USEDEP}] |
75 |
-" |
76 |
+ $(python_gen_cond_dep '>=dev-python/gevent-1.0[${PYTHON_USEDEP}]' python2_7) |
77 |
+ $(python_gen_cond_dep '>=dev-python/gevent-websocket-0.9.2[${PYTHON_USEDEP}]' python2_7) |
78 |
+ chaco? ( |
79 |
+ $(python_gen_cond_dep '>=dev-python/traits-4.4[${PYTHON_USEDEP}]' python2_7) |
80 |
+ $(python_gen_cond_dep '>=dev-python/chaco-4.4[${PYTHON_USEDEP}]' python2_7) |
81 |
+ ) |
82 |
|
83 |
+" |
84 |
# testing server: needs websocket not in portage yet |
85 |
# >=dev-python/websocket[${PYTHON_USEDEP}] |
86 |
-DEPEND="${RDEPEND} |
87 |
+# hdf5 backend: needs arraymanagement not in portage yet |
88 |
+DEPEND=" |
89 |
test? ( |
90 |
+ ${RDEPEND} |
91 |
+ >=dev-python/nose-1.3.0[${PYTHON_USEDEP}] |
92 |
>=dev-python/mock-1.0.1[${PYTHON_USEDEP}] |
93 |
>=dev-python/colorama-0.2.7[${PYTHON_USEDEP}] |
94 |
) |
95 |
" |
96 |
+DOCS=( CHANGELOG QUICKSTART.md README.md ) |
97 |
+ |
98 |
+python_prepare_all() { |
99 |
+ # Fix test_references_by_ref_by_value from test_object.py |
100 |
+ local PATCHES=( "${FILESDIR}"/${P}-fix_test_object.patch ) |
101 |
+ # Remove broken test case |
102 |
+ sed -i -e "s:MetaTest:_&:" bokeh/tests/test_bokeh_init.py || die |
103 |
+ |
104 |
+ if ! use chaco; then |
105 |
+ sed -i -e "/'bokeh.chaco_gg'/d" setup.py || die |
106 |
+ fi |
107 |
+ |
108 |
+ distutils-r1_python_prepare_all |
109 |
+} |
110 |
+ |
111 |
+python_install_all() { |
112 |
+ use examples && local EXAMPLES=( examples/. ) |
113 |
+ |
114 |
+ distutils-r1_python_install_all |
115 |
+} |
116 |
+ |
117 |
python_test() { |
118 |
cd "${BUILD_DIR}"/lib || die |
119 |
# exclude server tests for now |
120 |
nosetests -v \ |
121 |
-e multiuser_auth_test \ |
122 |
- -e wsmanager_test \ |
123 |
-e usermodel_test \ |
124 |
|| die |
125 |
} |
126 |
+ |
127 |
+pkg_postinst() { |
128 |
+ elog "websockets work only with python2_7" |
129 |
+ local chaco_msg="chaco useflag doesn't affect python targets other than python2_7" |
130 |
+ if use chaco; then |
131 |
+ if use python_targets_python2_7; then |
132 |
+ elog "${chaco_msg}" |
133 |
+ else |
134 |
+ ewarn "${chaco_msg}" |
135 |
+ fi |
136 |
+ fi |
137 |
+} |
138 |
|
139 |
diff --git a/dev-python/bokeh/files/bokeh-0.4.4-fix_test_object.patch b/dev-python/bokeh/files/bokeh-0.4.4-fix_test_object.patch |
140 |
new file mode 100644 |
141 |
index 0000000..24183d8 |
142 |
--- /dev/null |
143 |
+++ b/dev-python/bokeh/files/bokeh-0.4.4-fix_test_object.patch |
144 |
@@ -0,0 +1,32 @@ |
145 |
+commit 9606ae037dbd9ee888f9763a1bd9c6d7fc3b5824 |
146 |
+Author: Bryan Van de Ven <bryanv@×××××××××.io> |
147 |
+Date: Sat Apr 19 10:05:35 2014 -0500 |
148 |
+ |
149 |
+ fix #548 |
150 |
+ |
151 |
+diff --git a/bokeh/plotobject.py b/bokeh/plotobject.py |
152 |
+index 7485d27..92ae2dd 100644 |
153 |
+--- a/bokeh/plotobject.py |
154 |
++++ b/bokeh/plotobject.py |
155 |
+@@ -220,7 +220,7 @@ class PlotObject(HasProps): |
156 |
+ |
157 |
+ def references(self): |
158 |
+ """Returns all ``PlotObjects`` that this object has references to. """ |
159 |
+- return self.collect_plot_objects(self) |
160 |
++ return set(self.collect_plot_objects(self)) |
161 |
+ |
162 |
+ #--------------------------------------------------------------------- |
163 |
+ # View Model connection methods |
164 |
+diff --git a/bokeh/tests/test_objects.py b/bokeh/tests/test_objects.py |
165 |
+index 1a17f69..75d5678 100644 |
166 |
+--- a/bokeh/tests/test_objects.py |
167 |
++++ b/bokeh/tests/test_objects.py |
168 |
+@@ -242,7 +242,7 @@ class TestPlotObject(unittest.TestCase): |
169 |
+ x2 = X2(y=y, z2=z2) |
170 |
+ |
171 |
+ # TODO: self.assertEqual(x1.references(), [t1, y, t2, x1]) |
172 |
+- self.assertEqual(x2.references(), [t1, y, t2, z2, x2]) |
173 |
++ self.assertEqual(x2.references(), set([t1, y, t2, z2, x2])) |
174 |
+ |
175 |
+ if __name__ == "__main__": |
176 |
+ unittest.main() |
177 |
|
178 |
diff --git a/dev-python/bokeh/metadata.xml b/dev-python/bokeh/metadata.xml |
179 |
index c43dd65..b59e358 100644 |
180 |
--- a/dev-python/bokeh/metadata.xml |
181 |
+++ b/dev-python/bokeh/metadata.xml |
182 |
@@ -9,4 +9,7 @@ |
183 |
style of Protovis/D3, while delivering high-performance |
184 |
interactivity over large data to thin clients. |
185 |
</longdescription> |
186 |
+<use> |
187 |
+ <flag name="chaco">Enable interface for implementing qplot and ggplot like functionality using chaco</flag> |
188 |
+</use> |
189 |
</pkgmetadata> |