1 |
commit: 6e160c7a2657048c266d3ef6859c654c7f03e06b |
2 |
Author: Marius Brehler <marbre <AT> linux <DOT> sungazer <DOT> de> |
3 |
AuthorDate: Wed Jul 26 06:53:32 2017 +0000 |
4 |
Commit: David Seifert <soap <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Jul 30 09:34:36 2017 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6e160c7a |
7 |
|
8 |
dev-python/notebook: Version bump to 5.0.0 |
9 |
|
10 |
Package-Manager: Portage-2.3.6, Repoman-2.3.1 |
11 |
Closes: https://github.com/gentoo/gentoo/pull/5215 |
12 |
|
13 |
dev-python/notebook/Manifest | 1 + |
14 |
.../files/notebook-5.0.0-setupbase.py.patch | 43 ++++++++++ |
15 |
dev-python/notebook/notebook-5.0.0.ebuild | 92 ++++++++++++++++++++++ |
16 |
3 files changed, 136 insertions(+) |
17 |
|
18 |
diff --git a/dev-python/notebook/Manifest b/dev-python/notebook/Manifest |
19 |
index 6bbbd09f5e9..bc8d7797221 100644 |
20 |
--- a/dev-python/notebook/Manifest |
21 |
+++ b/dev-python/notebook/Manifest |
22 |
@@ -3,3 +3,4 @@ DIST notebook-4.1.0.tar.gz 9170981 SHA256 b597437ba33538221008e21fea71cd01eda9da |
23 |
DIST notebook-4.2.3.tar.gz 10092423 SHA256 39a9603d3fe88b60de2903680c965cf643acf2c16fb2c6bac1d905e1042b5851 SHA512 1b54e2a16fdb79b9344c0f73bd48fe438b18c529707b15816a3ab20353b2e320067082d51829c670117d77830a21c5a64a15d37d1970fd30aae31272d9650d97 WHIRLPOOL 9cbcfc80dd818c77f1db5226b729e576f7428184001747eda8780c70b3cfb6b9472b8760073e2891ee40bc90e0398e88250b02c8c2eb6b7c2517fa6eecf2ceba |
24 |
DIST notebook-4.3.2.tar.gz 10375345 SHA256 fc77edf4ec295542172aa66a3e9d527e75038fcaadd3ed20afbf8596e5629aa9 SHA512 8ff9a4852aafbc2761e82cd1cbacfc85dade97ec58386df55eea1e97f513b3d608106a2cc43305968fd990974daf6c8dac8aab4ab2184c56976289e646a62b7b WHIRLPOOL 4921242a8cfe316e835b88879cbc9cd41abff39daaf6f8e5d373609f3cd64f286052041bcc9e496b5a570dc9126892a1163dfef6df1b037f6ed92f101d8c74d5 |
25 |
DIST notebook-4.4.1.tar.gz 10377605 SHA256 dfadef2babd7c04c6c257df7d07d7ba587e503dbb4e4c95305f9a95b8d3a9765 SHA512 416500355660e74e87edd1649821eb91154f2f0828dce0f2a6a8d3e6448f0ee4459ad661c9a030b5acb594659d37131c76d9edc30630f91700860dc6bfe4450b WHIRLPOOL f97de24b200d382c1cdd2c27c2344a040230b0b892bad18ac4c884bee8aac58fb0106a8939e1b095069ad258863ae822baba45834f1ff1bd0ba5c04d5e5014c5 |
26 |
+DIST notebook-5.0.0.tar.gz 11481080 SHA256 1cea3bbbd03c8e5842a1403347a8cc8134486b3ce081a2e5b1952a00ea66ed54 SHA512 fbee29cc554f36e94b1fe9804187a50581e840cfb5884bcdf2fef82ad9ae3ae0e2082ea0056f815bfa2a1c2f203679169155e61e53253aa2e9004a43ff7fbcae WHIRLPOOL 00d9f41601f5b6a4063d4323be4e236184f18b8253a6d670c3c18800a5883d28a2e036cab99403bb981bf73ab915664a908b06401c9c4facc17d285a16ba2634 |
27 |
|
28 |
diff --git a/dev-python/notebook/files/notebook-5.0.0-setupbase.py.patch b/dev-python/notebook/files/notebook-5.0.0-setupbase.py.patch |
29 |
new file mode 100644 |
30 |
index 00000000000..4dc55d937ca |
31 |
--- /dev/null |
32 |
+++ b/dev-python/notebook/files/notebook-5.0.0-setupbase.py.patch |
33 |
@@ -0,0 +1,43 @@ |
34 |
+Disable bundled mathjax. |
35 |
+ |
36 |
+Patch by Marius Brehler |
37 |
+--- a/setupbase.py |
38 |
++++ b/setupbase.py |
39 |
+@@ -165,37 +165,6 @@ def find_package_data(): |
40 |
+ if f.endswith(('.js', '.css')): |
41 |
+ static_data.append(pjoin(parent, f)) |
42 |
+ |
43 |
+- # Trim mathjax |
44 |
+- mj = lambda *path: pjoin(components, 'MathJax', *path) |
45 |
+- static_data.extend([ |
46 |
+- mj('MathJax.js'), |
47 |
+- mj('config', 'TeX-AMS-MML_HTMLorMML-full.js'), |
48 |
+- mj('config', 'Safe.js'), |
49 |
+- ]) |
50 |
+- |
51 |
+- trees = [] |
52 |
+- mj_out = mj('jax', 'output') |
53 |
+- |
54 |
+- if os.path.exists(mj_out): |
55 |
+- for output in os.listdir(mj_out): |
56 |
+- path = pjoin(mj_out, output) |
57 |
+- static_data.append(pjoin(path, '*.js')) |
58 |
+- autoload = pjoin(path, 'autoload') |
59 |
+- if os.path.isdir(autoload): |
60 |
+- trees.append(autoload) |
61 |
+- |
62 |
+- for tree in trees + [ |
63 |
+- mj('localization'), # limit to en? |
64 |
+- mj('fonts', 'HTML-CSS', 'STIX-Web', 'woff'), |
65 |
+- mj('extensions'), |
66 |
+- mj('jax', 'input', 'TeX'), |
67 |
+- mj('jax', 'output', 'HTML-CSS', 'fonts', 'STIX-Web'), |
68 |
+- mj('jax', 'output', 'SVG', 'fonts', 'STIX-Web'), |
69 |
+- ]: |
70 |
+- for parent, dirs, files in os.walk(tree): |
71 |
+- for f in files: |
72 |
+- static_data.append(pjoin(parent, f)) |
73 |
+- |
74 |
+ os.chdir(os.path.join('tests',)) |
75 |
+ js_tests = glob('*.js') + glob('*/*.js') |
76 |
+ |
77 |
|
78 |
diff --git a/dev-python/notebook/notebook-5.0.0.ebuild b/dev-python/notebook/notebook-5.0.0.ebuild |
79 |
new file mode 100644 |
80 |
index 00000000000..fa4e605c702 |
81 |
--- /dev/null |
82 |
+++ b/dev-python/notebook/notebook-5.0.0.ebuild |
83 |
@@ -0,0 +1,92 @@ |
84 |
+# Copyright 1999-2017 Gentoo Foundation |
85 |
+# Distributed under the terms of the GNU General Public License v2 |
86 |
+ |
87 |
+EAPI=6 |
88 |
+ |
89 |
+PYTHON_COMPAT=( python2_7 python3_{4,5,6} ) |
90 |
+PYTHON_REQ_USE="threads(+)" |
91 |
+ |
92 |
+inherit distutils-r1 |
93 |
+ |
94 |
+DESCRIPTION="Jupyter Interactive Notebook" |
95 |
+HOMEPAGE="http://jupyter.org" |
96 |
+SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz" |
97 |
+ |
98 |
+LICENSE="BSD" |
99 |
+SLOT="0" |
100 |
+KEYWORDS="~amd64 ~arm64 ~x86" |
101 |
+IUSE="doc test" |
102 |
+RDEPEND=" |
103 |
+ >=dev-libs/mathjax-2.4 |
104 |
+ dev-python/jinja[${PYTHON_USEDEP}] |
105 |
+ >=dev-python/terminado-0.3.3[${PYTHON_USEDEP}] |
106 |
+ >=www-servers/tornado-4.0[${PYTHON_USEDEP}] |
107 |
+ dev-python/ipython_genutils[${PYTHON_USEDEP}] |
108 |
+ >=dev-python/traitlets-4.2.1[${PYTHON_USEDEP}] |
109 |
+ dev-python/jupyter_core[${PYTHON_USEDEP}] |
110 |
+ dev-python/jupyter_client[${PYTHON_USEDEP}] |
111 |
+ dev-python/nbformat[${PYTHON_USEDEP}] |
112 |
+ >=dev-python/nbconvert-4.2.0[${PYTHON_USEDEP}] |
113 |
+ dev-python/ipykernel[${PYTHON_USEDEP}] |
114 |
+ " |
115 |
+DEPEND="${RDEPEND} |
116 |
+ dev-python/setuptools[${PYTHON_USEDEP}] |
117 |
+ test? ( |
118 |
+ $(python_gen_cond_dep 'dev-python/mock[${PYTHON_USEDEP}]' 'python2*') |
119 |
+ >=dev-python/nose-0.10.1[${PYTHON_USEDEP}] |
120 |
+ dev-python/nose_warnings_filters[${PYTHON_USEDEP}] |
121 |
+ dev-python/requests[${PYTHON_USEDEP}] |
122 |
+ dev-python/coverage[${PYTHON_USEDEP}] |
123 |
+ ) |
124 |
+ doc? ( |
125 |
+ app-text/pandoc |
126 |
+ >=dev-python/ipython-4.0.0[${PYTHON_USEDEP}] |
127 |
+ >=dev-python/sphinx-1.1[${PYTHON_USEDEP}] |
128 |
+ ) |
129 |
+ " |
130 |
+ |
131 |
+PATCHES=( "${FILESDIR}/${P}"-setupbase.py.patch ) |
132 |
+ |
133 |
+python_prepare_all() { |
134 |
+ sed \ |
135 |
+ -e "/import setup/s:$:\nimport setuptools:g" \ |
136 |
+ -i setup.py || die |
137 |
+ |
138 |
+ # disable bundled mathjax |
139 |
+ sed -i 's/^.*MathJax.*$//' bower.json || die |
140 |
+ |
141 |
+ # Prevent un-needed download during build |
142 |
+ if use doc; then |
143 |
+ sed \ |
144 |
+ -e "/^ 'sphinx.ext.intersphinx',/d" \ |
145 |
+ -i docs/source/conf.py || die |
146 |
+ fi |
147 |
+ |
148 |
+ distutils-r1_python_prepare_all |
149 |
+} |
150 |
+ |
151 |
+python_compile_all() { |
152 |
+ if use doc; then |
153 |
+ emake -C docs html |
154 |
+ HTML_DOCS=( docs/build/html/. ) |
155 |
+ fi |
156 |
+} |
157 |
+ |
158 |
+python_test() { |
159 |
+ nosetests \ |
160 |
+ --verbosity=3 \ |
161 |
+ notebook || die |
162 |
+} |
163 |
+ |
164 |
+python_install() { |
165 |
+ distutils-r1_python_install |
166 |
+ |
167 |
+ ln -sf \ |
168 |
+ "${EPREFIX}/usr/share/mathjax" \ |
169 |
+ "${D}$(python_get_sitedir)/notebook/static/components/MathJax" || die |
170 |
+} |
171 |
+ |
172 |
+pkg_preinst() { |
173 |
+ # remove old mathjax folder if present |
174 |
+ rm -rf "${EROOT%/}"/usr/lib*/python*/site-packages/notebook/static/components/MathJax || die |
175 |
+} |