dev-python/notebook: Version bump
authorMarius Brehler <marbre@linux.sungazer.de>
Sat, 21 May 2016 17:08:26 +0000 (19:08 +0200)
committerMarius Brehler <marbre@linux.sungazer.de>
Sat, 21 May 2016 17:08:26 +0000 (19:08 +0200)
Package-Manager: portage-2.2.26

dev-python/notebook/Manifest
dev-python/notebook/files/notebook-4.2.0-setupbase.py.patch [new file with mode: 0644]
dev-python/notebook/notebook-4.2.0.ebuild [new file with mode: 0644]

index 95e3280c95ca6e99c4df3fa5537ef0203b54c495..8e96f0553816c5279d5033ad712105f624f6b23f 100644 (file)
@@ -1,2 +1,3 @@
 DIST notebook-4.0.6.tar.gz 6705277 SHA256 f62e7a6afbc00bab3615b927595d27b1874cff3218bddcbab62f97f6dae567c3 SHA512 9ce9ca21adcb967725aeb7a18543ace8aca4e88497d3d2fd708a603511e8ef4a932b39337d134d684df03b273bbc442958a37ced8cd499cb7b97a1c29758eeb0 WHIRLPOOL 764afabfa220d37e048a359952bd9cc4de0b791de782ed7cf2a22e8c0e9719b39630fd5c1c7acbf163715924662805f92b406bf6198600f2c4a35d239a12df11
 DIST notebook-4.1.0.tar.gz 9170981 SHA256 b597437ba33538221008e21fea71cd01eda9da1515ca3963d7c74e44f4b03d90 SHA512 745e412a737835956dc4238f70dbaf9c519fea55988941174febdc3ad24962031c3c66cb4ac355a9a639f9a383905e863e8eb0a3c6da62bf72026282154874cb WHIRLPOOL a34501e8e0be300905628e0f0df6914e8491a00924150ff0f5f32d1b7ad99046b84958dc267a229797fb13c98085f7556496a1a8e5fb68a1db503b44cad2b380
+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 (file)
index 0000000..a4c2904
--- /dev/null
@@ -0,0 +1,42 @@
+Disable bundled mathjax.
+
+Patch by Marius Brehler
+--- a/setupbase.py
++++ b/setupbase.py
+@@ -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 (file)
index 0000000..036376b
--- /dev/null
@@ -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_{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
+}