aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarius Brehler <marbre@linux.sungazer.de>2016-05-17 14:59:42 +0200
committerMarius Brehler <marbre@linux.sungazer.de>2016-05-17 14:59:42 +0200
commitdbb43424cf13adf94071f7a76a81b7b83adb5a6e (patch)
tree7bd261f00a3ddf6519027e09a43066942fcf3c4d
parentdev-python/entrypoints: Bump to EAPI=6 (diff)
downloadsci-dbb43424cf13adf94071f7a76a81b7b83adb5a6e.tar.gz
sci-dbb43424cf13adf94071f7a76a81b7b83adb5a6e.tar.bz2
sci-dbb43424cf13adf94071f7a76a81b7b83adb5a6e.zip
dev-python/notebook: Version bump
Package-Manager: portage-2.2.28
-rw-r--r--dev-python/notebook/Manifest1
-rw-r--r--dev-python/notebook/files/notebook-4.2.0-setupbase.py.patch42
-rw-r--r--dev-python/notebook/notebook-4.2.0.ebuild94
3 files changed, 137 insertions, 0 deletions
diff --git a/dev-python/notebook/Manifest b/dev-python/notebook/Manifest
index 896c9f68e..8279b777c 100644
--- a/dev-python/notebook/Manifest
+++ b/dev-python/notebook/Manifest
@@ -1 +1,2 @@
DIST notebook-4.0.6.tar.gz 6705277 SHA256 f62e7a6afbc00bab3615b927595d27b1874cff3218bddcbab62f97f6dae567c3 SHA512 9ce9ca21adcb967725aeb7a18543ace8aca4e88497d3d2fd708a603511e8ef4a932b39337d134d684df03b273bbc442958a37ced8cd499cb7b97a1c29758eeb0 WHIRLPOOL 764afabfa220d37e048a359952bd9cc4de0b791de782ed7cf2a22e8c0e9719b39630fd5c1c7acbf163715924662805f92b406bf6198600f2c4a35d239a12df11
+DIST notebook-4.2.0.tar.gz 10090035 SHA256 e10c4916c77b48394796b5b1440d61d7b210f9941194048fe20ef88948016d84 SHA512 a6e88fc07b5085e9a330585ace7a4d80cd45f292efea24f75604ab3140dfb60913fe832a3ad98787c472e1f9255bdfbf50024ee0b414780808560e4d54dc84b0 WHIRLPOOL 016c7e31bcf08ca13ecbd129331a675d22256156ede12a1d69120e5dacf2b6d6bdab94ab325899636e4338bb95884ab4fe2db04c07a34b09eec452ea70e5696f
diff --git a/dev-python/notebook/files/notebook-4.2.0-setupbase.py.patch b/dev-python/notebook/files/notebook-4.2.0-setupbase.py.patch
new file mode 100644
index 000000000..949c445a7
--- /dev/null
+++ b/dev-python/notebook/files/notebook-4.2.0-setupbase.py.patch
@@ -0,0 +1,42 @@
+Disable bundled mathjax.
+
+Patch by Marius Brehler
+--- ${WORKDIR}/setupbase.py 2016-04-15 21:15:35.000000000 +0200
++++ ${WORKDIR}/setupbase.py 2016-05-17 14:54:04.998783993 +0200
+@@ -152,36 +152,6 @@ def find_package_data():
+ if f.endswith(('.js', '.css')):
+ static_data.append(pjoin(parent, f))
+
+- # Trim mathjax
+- mj = lambda *path: pjoin(components, 'MathJax', *path)
+- static_data.extend([
+- mj('MathJax.js'),
+- mj('config', 'TeX-AMS_HTML-full.js'),
+- mj('config', 'Safe.js'),
+- ])
+-
+- trees = []
+- mj_out = mj('jax', 'output')
+-
+- if os.path.exists(mj_out):
+- for output in os.listdir(mj_out):
+- path = pjoin(mj_out, output)
+- static_data.append(pjoin(path, '*.js'))
+- autoload = pjoin(path, 'autoload')
+- if os.path.isdir(autoload):
+- trees.append(autoload)
+-
+- for tree in trees + [
+- mj('localization'), # limit to en?
+- mj('fonts', 'HTML-CSS', 'STIX-Web', 'woff'),
+- mj('extensions'),
+- mj('jax', 'input', 'TeX'),
+- mj('jax', 'output', 'HTML-CSS', 'fonts', 'STIX-Web'),
+- mj('jax', 'output', 'SVG', 'fonts', 'STIX-Web'),
+- ]:
+- for parent, dirs, files in os.walk(tree):
+- for f in files:
+- static_data.append(pjoin(parent, f))
+
+ os.chdir(os.path.join('tests',))
+ js_tests = glob('*.js') + glob('*/*.js')
diff --git a/dev-python/notebook/notebook-4.2.0.ebuild b/dev-python/notebook/notebook-4.2.0.ebuild
new file mode 100644
index 000000000..5aeeac7f5
--- /dev/null
+++ b/dev-python/notebook/notebook-4.2.0.ebuild
@@ -0,0 +1,94 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=6
+
+PYTHON_COMPAT=( python2_7 python3_{3,4,5} )
+PYTHON_REQ_USE="threads(+)"
+
+inherit distutils-r1
+
+DESCRIPTION="Jupyter Interactive Notebook"
+HOMEPAGE="http://jupyter.org"
+SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="doc test"
+RDEPEND="
+ >=dev-libs/mathjax-2.4
+ dev-python/jinja[${PYTHON_USEDEP}]
+ >=dev-python/terminado-0.3.3[${PYTHON_USEDEP}]
+ >=www-servers/tornado-4.0[${PYTHON_USEDEP}]
+ dev-python/ipython_genutils[${PYTHON_USEDEP}]
+ dev-python/traitlets[${PYTHON_USEDEP}]
+ dev-python/jupyter_core[${PYTHON_USEDEP}]
+ dev-python/jupyter_client[${PYTHON_USEDEP}]
+ dev-python/nbformat[${PYTHON_USEDEP}]
+ >=dev-python/nbconvert-4.2.0[${PYTHON_USEDEP}]
+ dev-python/ipykernel[${PYTHON_USEDEP}]
+ "
+DEPEND="${RDEPEND}
+ dev-python/setuptools[${PYTHON_USEDEP}]
+ test? (
+ $(python_gen_cond_dep 'dev-python/mock[${PYTHON_USEDEP}]' python2_7)
+ >=dev-python/nose-0.10.1[${PYTHON_USEDEP}]
+ dev-python/requests[${PYTHON_USEDEP}]
+ dev-python/coverage[${PYTHON_USEDEP}]
+ )
+ doc? (
+ app-text/pandoc
+ >=dev-python/ipython-4.0.0[${PYTHON_USEDEP}]
+ >=dev-python/sphinx-1.1[${PYTHON_USEDEP}]
+ )
+ "
+
+python_prepare_all() {
+ eapply "${FILESDIR}/${P}"-setupbase.py.patch
+
+ sed \
+ -e "/import setup/s:$:\nimport setuptools:g" \
+ -i setup.py || die
+
+ # disable bundled mathjax
+ sed -i 's/^.*MathJax.*$//' bower.json || die
+
+ # Prevent un-needed download during build
+ if use doc; then
+ sed \
+ -e "/^ 'sphinx.ext.intersphinx',/d" \
+ -i docs/source/conf.py || die
+ fi
+
+ distutils-r1_python_prepare_all
+}
+
+python_compile_all() {
+ use doc && emake -C docs html
+}
+
+python_test() {
+ nosetests \
+ --verbosity=3 \
+ notebook || die
+}
+
+python_install() {
+ distutils-r1_python_install
+
+ ln -sf \
+ "${EPREFIX}/usr/share/mathjax" \
+ "${D}$(python_get_sitedir)/notebook/static/components/MathJax" || die
+}
+
+python_install_all() {
+ use doc && HTML_DOCS=( docs/build/html/. )
+ distutils-r1_python_install_all
+}
+
+pkg_preinst() {
+ # remove old mathjax folder if present
+ rm -rf "${EROOT}"/usr/lib*/python*/site-packages/notebook/static/components/MathJax
+}