diff options
author | Justin Lecher <jlec@gentoo.org> | 2016-05-22 19:20:54 +0200 |
---|---|---|
committer | Justin Lecher <jlec@gentoo.org> | 2016-05-22 19:20:54 +0200 |
commit | 1d6524865bfe1fa2480d698cc3df6c05c71843ca (patch) | |
tree | fe7d45f0733208987781110e5f0d51b2aeed6fc0 /dev-python | |
parent | Merge branch 'anthonyryan1-launchpad' (diff) | |
parent | dev-python/notebook: Version bump (diff) | |
download | gentoo-1d6524865bfe1fa2480d698cc3df6c05c71843ca.tar.gz gentoo-1d6524865bfe1fa2480d698cc3df6c05c71843ca.tar.bz2 gentoo-1d6524865bfe1fa2480d698cc3df6c05c71843ca.zip |
Merge branch 'marbre-notebook'
* marbre-notebook:
dev-python/notebook: Version bump
dev-python/nbconvert: Version bump
dev-python/entrypoints: New ebuild, required for nbconvert
Diffstat (limited to 'dev-python')
-rw-r--r-- | dev-python/entrypoints/Manifest | 1 | ||||
-rw-r--r-- | dev-python/entrypoints/entrypoints-0.2.1.ebuild | 60 | ||||
-rw-r--r-- | dev-python/entrypoints/files/entrypoints-0.2.1-init.py.patch | 8 | ||||
-rw-r--r-- | dev-python/entrypoints/files/entrypoints-0.2.1-setup.py.patch | 20 | ||||
-rw-r--r-- | dev-python/entrypoints/metadata.xml | 21 | ||||
-rw-r--r-- | dev-python/nbconvert/Manifest | 1 | ||||
-rw-r--r-- | dev-python/nbconvert/nbconvert-4.2.0.ebuild | 73 | ||||
-rw-r--r-- | dev-python/notebook/Manifest | 1 | ||||
-rw-r--r-- | dev-python/notebook/files/notebook-4.2.0-setupbase.py.patch | 42 | ||||
-rw-r--r-- | dev-python/notebook/notebook-4.2.0.ebuild | 94 |
10 files changed, 321 insertions, 0 deletions
diff --git a/dev-python/entrypoints/Manifest b/dev-python/entrypoints/Manifest new file mode 100644 index 000000000000..8ba52629a387 --- /dev/null +++ b/dev-python/entrypoints/Manifest @@ -0,0 +1 @@ +DIST entrypoints-0.2.1.tar.gz 11126 SHA256 0d6b6798446c2e5e5dd6691e79356c29e82234bdb67995233f57413a11f2ded4 SHA512 67a24fc53ae8bdac6bda163d2c8057b158979d55ccdbcdb8709966573bf0a999728e04eb92a05fbc2c0d532593de0ec6518bcfed1d5bcf875b00bbd5c48494c7 WHIRLPOOL f673fb42bad930bb1907692013df469d64b9afb77c3e0acca250fb0b14fe17ec3962cb60de2f0760ede40c8f039690851424b816e047669916ff1d73389daaf7 diff --git a/dev-python/entrypoints/entrypoints-0.2.1.ebuild b/dev-python/entrypoints/entrypoints-0.2.1.ebuild new file mode 100644 index 000000000000..c67fb71b9dda --- /dev/null +++ b/dev-python/entrypoints/entrypoints-0.2.1.ebuild @@ -0,0 +1,60 @@ +# 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} ) + +inherit distutils-r1 + +DESCRIPTION="Discover and load entry points from installed packages" +HOMEPAGE="https://github.com/takluyver/entrypoints" +SRC_URI="https://github.com//takluyver/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="doc test" + +DEPEND=" + $(python_gen_cond_dep 'dev-python/configparser[${PYTHON_USEDEP}]' python2_7) + test? ( + dev-python/pytest[${PYTHON_USEDEP}] + virtual/python-pathlib[${PYTHON_USEDEP}] + ) + doc? ( dev-python/sphinx[${PYTHON_USEDEP}] ) + " + +PATCHES=( + "${FILESDIR}/${P}"-setup.py.patch + "${FILESDIR}/${P}"-init.py.patch +) + +python_prepare_all() { + + # Prevent un-needed download during build + if use doc; then + sed -e "/^ 'sphinx.ext.intersphinx',/d" -i doc/conf.py || die + fi + + distutils-r1_python_prepare_all + + mv "${WORKDIR}/${P}"/entrypoints.py "${WORKDIR}/${P}/${PN}/" || die +} + +python_compile_all() { + use doc && emake -C doc html +} + +python_install_all() { + use doc && HTML_DOCS=( doc/_build/html/. ) + distutils-r1_python_install_all + } + +python_test() { + distutils_install_for_testing + cd "${TEST_DIR}"/lib || die + cp -r "${S}"/tests "${TEST_DIR}"/lib/ || die + py.test || die +} diff --git a/dev-python/entrypoints/files/entrypoints-0.2.1-init.py.patch b/dev-python/entrypoints/files/entrypoints-0.2.1-init.py.patch new file mode 100644 index 000000000000..40d5d82730d3 --- /dev/null +++ b/dev-python/entrypoints/files/entrypoints-0.2.1-init.py.patch @@ -0,0 +1,8 @@ +__init__.py for entrypoints by Marius Brehler <marbre@linux.sungazer.de>. + +Patch by Marius Brehler <marbrbre@linux.sungazer.de>. +--- /dev/null ++++ b/entrypoints/__init__.py +@@ -0,0 +1 @@ ++from .entrypoints import * +\ No newline at end of file diff --git a/dev-python/entrypoints/files/entrypoints-0.2.1-setup.py.patch b/dev-python/entrypoints/files/entrypoints-0.2.1-setup.py.patch new file mode 100644 index 000000000000..98786854773c --- /dev/null +++ b/dev-python/entrypoints/files/entrypoints-0.2.1-setup.py.patch @@ -0,0 +1,20 @@ +setup.py for entrypoints by Marius Brehler <marbre@linux.sungazer.de>. + +Patch by Marius Brehler <marbrbre@linux.sungazer.de>. +--- /dev/null ++++ b/setup.py +@@ -0,0 +1,13 @@ ++from distutils.core import setup ++ ++setup(name='entrypoints', ++ version='0.2.1', ++ description='Discover and load entry points from installed packages.', ++ author='Thomas Kluyver', ++ author_email='thomas@kluyver.me.uk', ++ url='https://github.com/takluyver/entrypoints', ++ packages=['entrypoints'], ++ classifiers=[ ++ 'License :: OSI Approved :: MIT License' ++ ] ++) +\ No newline at end of file diff --git a/dev-python/entrypoints/metadata.xml b/dev-python/entrypoints/metadata.xml new file mode 100644 index 000000000000..acbfe4f76fbe --- /dev/null +++ b/dev-python/entrypoints/metadata.xml @@ -0,0 +1,21 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>marbre@linux.sungazer.de</email> + <name>Marius Brehler</name> + </maintainer> + <maintainer type="project"> + <email>sci@gentoo.org</email> + <name>Gentoo Science Project</name> + </maintainer> + <longdescription> + Entry points are a way for Python packages to advertise objects with + some common interface. The most common examples are console_scripts + entry points, which define shell commands by identifying a Python + function to run. + </longdescription> + <upstream> + <remote-id type="github">takluyver/testpath</remote-id> + </upstream> +</pkgmetadata> diff --git a/dev-python/nbconvert/Manifest b/dev-python/nbconvert/Manifest index 18314c5481ef..e252c3701f3c 100644 --- a/dev-python/nbconvert/Manifest +++ b/dev-python/nbconvert/Manifest @@ -1 +1,2 @@ DIST nbconvert-4.1.0.tar.gz 263948 SHA256 e0296e45293dd127d028f678e3b6aba3f1db3283a134178bdb49eea402d4cf1c SHA512 9761cf8cdf206bd8f27c666d7b520cbd7d805353cf46b212b46ee6053b47ec6728a5926dfe59acef109c8770580c41d51aa5b943a27e72bccecc68a7d7b68bfb WHIRLPOOL 9cc27a45b00ee9914674cd14a279be1691eb8a8538803bdda127513f56dd0ce53b10745f305f8fb82abd2d19efe7c1b0284bf05f8088360d2def6c97db0c1c6e +DIST nbconvert-4.2.0.tar.gz 428726 SHA256 55946d7522741294fcdd50799bd1777d16673ce721fecca0610cdb86749863c6 SHA512 441d32e5bd63cb7d0b9a70b814ec6ea647a04542601461cb8b008f4f9ab894f5729687093400703b222435100384378653fbbb38427431d9da62992ef778906a WHIRLPOOL 024ef6b9a70a9248431c71092de7ae993fad1144110669c0d538d13646cd991b5389f4550c269c55c541d96526541b884d5dec8632048a9365eb1986fe34d85a diff --git a/dev-python/nbconvert/nbconvert-4.2.0.ebuild b/dev-python/nbconvert/nbconvert-4.2.0.ebuild new file mode 100644 index 000000000000..1ae46dcaf90b --- /dev/null +++ b/dev-python/nbconvert/nbconvert-4.2.0.ebuild @@ -0,0 +1,73 @@ +# 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} ) + +inherit distutils-r1 + +DESCRIPTION="Converting Jupyter Notebooks" +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-python/jupyter_core[${PYTHON_USEDEP}] + dev-python/nbformat[${PYTHON_USEDEP}] + dev-python/mistune[${PYTHON_USEDEP}] + dev-python/jinja[${PYTHON_USEDEP}] + dev-python/pygments[${PYTHON_USEDEP}] + dev-python/traitlets[${PYTHON_USEDEP}] + dev-python/entrypoints[${PYTHON_USEDEP}] + " +DEPEND="${RDEPEND} + doc? ( + dev-python/ipython[${PYTHON_USEDEP}] + dev-python/jupyter_client[${PYTHON_USEDEP}] + dev-python/sphinx[${PYTHON_USEDEP}] + app-text/pandoc + ) + test? ( + dev-python/nose[${PYTHON_USEDEP}] + dev-python/coverage[${PYTHON_USEDEP}] + dev-python/ipykernel[${PYTHON_USEDEP}] + ) + " + +python_prepare_all() { + # 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() { + distutils_install_for_testing + cd "${TEST_DIR}"/lib || die + nosetests --with-coverage --cover-package=nbconvert nbconvert || die +} + +python_install_all() { + use doc && HTML_DOCS=( docs/build/html/. ) + distutils-r1_python_install_all +} + +pkg_postinst() { + if ! has_version app-text/pandoc ; then + einfo "Pandoc is required for converting to formats other than Python," + einfo "HTML, and Markdown. If you need this functionality, install" + einfo "app-text/pandoc." + fi +} diff --git a/dev-python/notebook/Manifest b/dev-python/notebook/Manifest index 95e3280c95ca..8e96f0553816 100644 --- a/dev-python/notebook/Manifest +++ b/dev-python/notebook/Manifest @@ -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 index 000000000000..a4c29048b925 --- /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 +--- 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 index 000000000000..036376b9e73d --- /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_{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 +} |