summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2015-08-08 13:49:04 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2015-08-08 17:38:18 -0700
commit56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch)
tree3f91093cdb475e565ae857f1c5a7fd339e2d781e /dev-python/ipython
downloadgentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip
proj/gentoo: Initial commit
This commit represents a new era for Gentoo: Storing the gentoo-x86 tree in Git, as converted from CVS. This commit is the start of the NEW history. Any historical data is intended to be grafted onto this point. Creation process: 1. Take final CVS checkout snapshot 2. Remove ALL ChangeLog* files 3. Transform all Manifests to thin 4. Remove empty Manifests 5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$ 5.1. Do not touch files with -kb/-ko keyword flags. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'dev-python/ipython')
-rw-r--r--dev-python/ipython/Manifest3
-rw-r--r--dev-python/ipython/files/2.1.0-disable-tests.patch32
-rw-r--r--dev-python/ipython/files/2.1.0-substitute-files.patch27
-rw-r--r--dev-python/ipython/files/ipython-2.2.0-login-backport.patch35
-rw-r--r--dev-python/ipython/ipython-2.2.0-r1.ebuild137
-rw-r--r--dev-python/ipython/ipython-3.2.0.ebuild155
-rw-r--r--dev-python/ipython/ipython-3.2.1.ebuild151
-rw-r--r--dev-python/ipython/metadata.xml52
8 files changed, 592 insertions, 0 deletions
diff --git a/dev-python/ipython/Manifest b/dev-python/ipython/Manifest
new file mode 100644
index 000000000000..c681a5b5fd6f
--- /dev/null
+++ b/dev-python/ipython/Manifest
@@ -0,0 +1,3 @@
+DIST ipython-2.2.0.tar.gz 11912007 SHA256 b7ca77ba54a02f032055b73f5f62b01431f818ae00f63716b78f881c2b2564e2 SHA512 4953bf5e9d6d5c6ad538d07d62b5b100fd86a37f6b861238501581c0059bd4655345ca05cf395e79709c38ce4cb9c6293f5d11ac0252a618ad8272b161140d13 WHIRLPOOL a5e433a3a840b65fd0644f023cc9e93862e48a906e4e9d1596ebbd24290d486be580dca017ef1586da980b6792dcd7ed9aab4af81421bbf083d885927db6fcc8
+DIST ipython-3.2.0.tar.gz 10883925 SHA256 8e64b441e16298c08025b826126b2d7bc5c1776d2d2f071672166f615f327887 SHA512 d298f8ce09f7bd98bf11156c0f34816ce846dc3e6a511d354f0905300af99e15f5be46547766207f1121bd11850456a20262626a8a22be1ffc756eb84f5a982c WHIRLPOOL 482d1c22199aff6bbb9ea23f12fd50e0c8f221bbf43f1779e1739e6d637e7a6f9edd8d4b60263cc3292746f2833a28d72e6282755b046668c96882002dd73134
+DIST ipython-3.2.1.tar.gz 10884249 SHA256 c913adee7ae5b338055274c51a7d2b3cea468b5b316046fa520cd8a434b09177 SHA512 de7723e3b859d21a58a24456c76c8d8ec98c019f290f61269f46270e7647d2b49a98671138fecd75cb6f46384fde7e09618eb5c85c175e0e442c7fae7328d8fe WHIRLPOOL 9f020c167559259931dcb177d0c3a5211939632e5775c2627795ba390cf57bd62c378c15b7ee9b9ed2079180f8df8e062eb9673ed9cfc025a56f1da82c9428d1
diff --git a/dev-python/ipython/files/2.1.0-disable-tests.patch b/dev-python/ipython/files/2.1.0-disable-tests.patch
new file mode 100644
index 000000000000..bdbb1be4246e
--- /dev/null
+++ b/dev-python/ipython/files/2.1.0-disable-tests.patch
@@ -0,0 +1,32 @@
+The extension magics for oct2py and rpy live now in the oct2py and rpy2 package. The tests shipped with ipython are broken. We should disable
+those tests and remove the magics files:
+
+IPython/extensions/rmagic.py -> rpy/ipython/rmagic.py
+IPython/extension/octavemagic.py -> oct2py/ipython/octavemagic.py
+
+deleted: IPython/extensions/octavemagic.py
+deleted: IPython/extensions/rmagic.py
+modified: IPython/testing/iptest.py
+
+diff --git a/IPython/testing/iptest.py b/IPython/testing/iptest.py
+index 45d2c78..db0bdfe 100644
+--- a/IPython/testing/iptest.py
++++ b/IPython/testing/iptest.py
+@@ -250,12 +250,10 @@ sec = test_sections['extensions']
+ if not have['cython']:
+ sec.exclude('cythonmagic')
+ sec.exclude('tests.test_cythonmagic')
+-if not have['oct2py']:
+- sec.exclude('octavemagic')
+- sec.exclude('tests.test_octavemagic')
+-if not have['rpy2'] or not have['numpy']:
+- sec.exclude('rmagic')
+- sec.exclude('tests.test_rmagic')
++sec.exclude('octavemagic')
++sec.exclude('tests.test_octavemagic')
++sec.exclude('rmagic')
++sec.exclude('tests.test_rmagic')
+ # autoreload does some strange stuff, so move it to its own test section
+ sec.exclude('autoreload')
+ sec.exclude('tests.test_autoreload')
+
diff --git a/dev-python/ipython/files/2.1.0-substitute-files.patch b/dev-python/ipython/files/2.1.0-substitute-files.patch
new file mode 100644
index 000000000000..659df39226ac
--- /dev/null
+++ b/dev-python/ipython/files/2.1.0-substitute-files.patch
@@ -0,0 +1,27 @@
+substitute the insource files with these messages
+diff --git a/IPython/extensions/octavemagic.py b/IPython/extensions/octavemagic.py
+new file mode 100644
+index 0000000..dc93fe4
+--- /dev/null
++++ b/IPython/extensions/octavemagic.py
+@@ -0,0 +1,7 @@
++import warnings
++
++def load_ipython_extension(ip):
++ msg = ("The octavemagic extension has been moved to oct2py. "
++ "After installing oct2py, you can load octavemagic with the "
++ "following command: '%load_ext oct2py.ipython'.")
++ warnings.warn(msg, Warning, stacklevel=2)
+diff --git a/IPython/extensions/rmagic.py b/IPython/extensions/rmagic.py
+new file mode 100644
+index 0000000..739e491
+--- /dev/null
++++ b/IPython/extensions/rmagic.py
+@@ -0,0 +1,7 @@
++import warnings
++
++def load_ipython_extension(ip):
++ msg = ("The rmagic extension has been moved to rpy2. "
++ "After installing rpy2, you can load rmagic with the "
++ "following command: '%load_ext rpy2.ipython'.")
++ warnings.warn(msg, Warning, stacklevel=2)
diff --git a/dev-python/ipython/files/ipython-2.2.0-login-backport.patch b/dev-python/ipython/files/ipython-2.2.0-login-backport.patch
new file mode 100644
index 000000000000..cf6a99db21e8
--- /dev/null
+++ b/dev-python/ipython/files/ipython-2.2.0-login-backport.patch
@@ -0,0 +1,35 @@
+From 5d6ce3671318c8d32bab770ece841590bbec358d Mon Sep 17 00:00:00 2001
+From: Matthias Bussonnier <bussonniermatthias@gmail.com>
+Date: Fri, 17 Apr 2015 13:08:32 -0700
+Subject: [PATCH] Set secure cookie by default if login handler is hit.
+
+ backport of https://github.com/jupyter/jupyter_notebook/pull/22 b8e99bc
+
+> There is few chances that logged-in people do not use https connexion,
+> but I guess it can happened if the server is ran in front of a proxy
+> that does the https termination, so leave it configurable.
+>
+> closes ipython/ipython#8325
+---
+ IPython/html/auth/login.py | 8 +++++++-
+ 1 file changed, 7 insertions(+), 1 deletion(-)
+
+diff --git a/IPython/html/auth/login.py b/IPython/html/auth/login.py
+index 1ad4673..1a340c8 100644
+--- a/IPython/html/auth/login.py
++++ b/IPython/html/auth/login.py
+@@ -46,7 +46,13 @@ class LoginHandler(IPythonHandler):
+ pwd = self.get_argument('password', default=u'')
+ if self.login_available:
+ if passwd_check(self.password, pwd):
+- self.set_secure_cookie(self.cookie_name, str(uuid.uuid4()))
++ # tornado <4.2 have a bug that consider secure==True as soon as
++ # 'secure' kwarg is passed to set_secure_cookie
++ if self.settings.get('secure_cookie', self.request.protocol == 'https'):
++ kwargs = {'secure':True}
++ else:
++ kwargs = {}
++ self.set_secure_cookie(self.cookie_name, str(uuid.uuid4()), **kwargs)
+ else:
+ self._render(message={'error': 'Invalid password'})
+ return
diff --git a/dev-python/ipython/ipython-2.2.0-r1.ebuild b/dev-python/ipython/ipython-2.2.0-r1.ebuild
new file mode 100644
index 000000000000..d33f00ed8fc6
--- /dev/null
+++ b/dev-python/ipython/ipython-2.2.0-r1.ebuild
@@ -0,0 +1,137 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 python3_{3,4} )
+PYTHON_REQ_USE='readline,sqlite'
+
+inherit distutils-r1 virtualx
+
+DESCRIPTION="Advanced interactive shell for Python"
+HOMEPAGE="http://ipython.org/"
+SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="amd64 arm ppc ppc64 x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos"
+
+IUSE="doc examples matplotlib mongodb notebook nbconvert octave qt4 +smp test wxwidgets"
+
+PY2_USEDEP=$(python_gen_usedep python2_7)
+CDEPEND="
+ dev-python/decorator[${PYTHON_USEDEP}]
+ dev-python/pexpect[${PYTHON_USEDEP}]
+ dev-python/pyparsing[${PYTHON_USEDEP}]
+ dev-python/setuptools[${PYTHON_USEDEP}]
+ dev-python/simplegeneric[${PYTHON_USEDEP}]
+ matplotlib? ( dev-python/matplotlib[${PYTHON_USEDEP}] )
+ mongodb? ( dev-python/pymongo[${PYTHON_USEDEP}] )
+ octave? ( dev-python/oct2py[${PYTHON_USEDEP}] )
+ smp? ( >=dev-python/pyzmq-2.1.11[${PYTHON_USEDEP}] )
+ wxwidgets? ( $(python_gen_cond_dep 'dev-python/wxpython:*[${PYTHON_USEDEP}]' python2_7) )"
+RDEPEND="${CDEPEND}
+ notebook? (
+ >=www-servers/tornado-3.1[${PYTHON_USEDEP}]
+ dev-python/pygments[${PYTHON_USEDEP}]
+ >=dev-python/pyzmq-2.1.11[${PYTHON_USEDEP}]
+ dev-python/jinja[${PYTHON_USEDEP}]
+ dev-libs/mathjax
+ )
+ nbconvert? (
+ >=app-text/pandoc-1.12.1
+ dev-python/pygments[${PYTHON_USEDEP}]
+ dev-python/sphinx[${PYTHON_USEDEP}]
+ dev-python/jinja[${PYTHON_USEDEP}]
+ )
+ qt4? (
+ || (
+ dev-python/PyQt4[${PYTHON_USEDEP}]
+ dev-python/pyside[${PYTHON_USEDEP}]
+ )
+ dev-python/pygments[${PYTHON_USEDEP}]
+ >=dev-python/pyzmq-2.1.11[${PYTHON_USEDEP}] )"
+DEPEND="${CDEPEND}
+ test? (
+ dev-python/nose[${PYTHON_USEDEP}]
+ dev-python/mock[${PY2_USEDEP}]
+ )
+ doc? (
+ dev-python/cython[${PYTHON_USEDEP}]
+ $(python_gen_cond_dep 'dev-python/fabric[${PYTHON_USEDEP}]' python2_7)
+ dev-python/matplotlib[${PYTHON_USEDEP}]
+ dev-python/nose[${PYTHON_USEDEP}]
+ dev-python/numpydoc[${PYTHON_USEDEP}]
+ dev-python/pymongo[${PYTHON_USEDEP}]
+ dev-python/rpy[${PYTHON_USEDEP}]
+ dev-python/sphinx[${PYTHON_USEDEP}]
+ >=www-servers/tornado-3.1[${PYTHON_USEDEP}]
+ )"
+
+PATCHES=(
+ "${FILESDIR}"/2.1.0-substitute-files.patch
+ "${FILESDIR}"/2.1.0-disable-tests.patch
+ "${FILESDIR}"/${P}-login-backport.patch
+ )
+
+DISTUTILS_IN_SOURCE_BUILD=1
+
+python_prepare_all() {
+ # Remove out of date insource files
+ rm IPython/extensions/rmagic.py || die
+ rm IPython/extensions/octavemagic.py || 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
+}
+
+src_test() {
+ # virtualx has trouble with parallel runs.
+ local DISTUTILS_NO_PARALLEL_BUILD=1
+ distutils-r1_src_test
+}
+
+python_test() {
+ distutils_install_for_testing
+ local fail
+ run_tests() {
+ pushd ${TEST_DIR} > /dev/null
+ "${PYTHON}" -m IPython.testing.iptestcontroller --all || fail=1
+ popd > /dev/null
+ }
+ VIRTUALX_COMMAND=run_tests virtualmake
+ [[ ${fail} ]] && die "Tests fail with ${EPYTHON}"
+}
+
+python_install() {
+ distutils-r1_python_install
+ use notebook && dosym /usr/share/mathjax $(python_get_sitedir)/IPython/html/static/mathjax
+
+ # Create ipythonX.Y symlinks.
+ # TODO:
+ # 1. do we want them for pypy? No. pypy has no numpy
+ # 2. handle it in the eclass instead (use _python_ln_rel).
+ # With pypy not an option the dosym becomes unconditional
+ dosym ../lib/python-exec/${EPYTHON}/ipython \
+ /usr/bin/ipython${EPYTHON#python}
+}
+
+python_install_all() {
+ use doc && local HTML_DOCS=( docs/build/html/. )
+ use examples && local EXAMPLES=( examples/. )
+ distutils-r1_python_install_all
+}
+
+pkg_postinst() {
+ elog "To enable sympyprinting, it's required to emerge sympy"
+ elog "To enable cythonmagic, it's required to emerge cython"
+}
diff --git a/dev-python/ipython/ipython-3.2.0.ebuild b/dev-python/ipython/ipython-3.2.0.ebuild
new file mode 100644
index 000000000000..ad60011ea3bc
--- /dev/null
+++ b/dev-python/ipython/ipython-3.2.0.ebuild
@@ -0,0 +1,155 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 python3_{3,4} )
+PYTHON_REQ_USE='readline,sqlite'
+
+inherit distutils-r1 eutils virtualx
+
+DESCRIPTION="Advanced interactive shell for Python"
+HOMEPAGE="http://ipython.org/"
+SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~ppc ~ppc64 ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos"
+IUSE="doc examples matplotlib mongodb notebook nbconvert octave qt4 +smp test wxwidgets"
+
+REQUIRED_USE="test? ( doc matplotlib mongodb notebook nbconvert octave qt4 wxwidgets )"
+
+PY2_USEDEP=$(python_gen_usedep python2_7)
+CDEPEND="
+ dev-python/decorator[${PYTHON_USEDEP}]
+ dev-python/pexpect[${PYTHON_USEDEP}]
+ dev-python/pyparsing[${PYTHON_USEDEP}]
+ dev-python/setuptools[${PYTHON_USEDEP}]
+ dev-python/simplegeneric[${PYTHON_USEDEP}]
+ matplotlib? ( dev-python/matplotlib[${PYTHON_USEDEP}] )
+ mongodb? ( dev-python/pymongo[${PYTHON_USEDEP}] )
+ octave? ( dev-python/oct2py[${PYTHON_USEDEP}] )
+ smp? ( >=dev-python/pyzmq-13[${PYTHON_USEDEP}] )
+ wxwidgets? ( $(python_gen_cond_dep 'dev-python/wxpython:*[${PYTHON_USEDEP}]' python2_7) )"
+RDEPEND="${CDEPEND}
+ notebook? (
+ dev-libs/mathjax
+ dev-python/jinja[${PYTHON_USEDEP}]
+ dev-python/jsonschema[${PYTHON_USEDEP}]
+ >=dev-python/mistune-0.5[${PYTHON_USEDEP}]
+ dev-python/pygments[${PYTHON_USEDEP}]
+ >=dev-python/pyzmq-13[${PYTHON_USEDEP}]
+ >=dev-python/terminado-0.3.3[${PYTHON_USEDEP}]
+ >=www-servers/tornado-3.1[${PYTHON_USEDEP}]
+ )
+ nbconvert? (
+ || ( >=net-libs/nodejs-0.9.12 >=app-text/pandoc-1.12.1 )
+ dev-python/jinja[${PYTHON_USEDEP}]
+ dev-python/jsonschema[${PYTHON_USEDEP}]
+ >=dev-python/mistune-0.5[${PYTHON_USEDEP}]
+ dev-python/pygments[${PYTHON_USEDEP}]
+ dev-python/sphinx[${PYTHON_USEDEP}]
+ )
+ qt4? (
+ || (
+ dev-python/PyQt4[${PYTHON_USEDEP},svg]
+ dev-python/PyQt5[${PYTHON_USEDEP},svg]
+ dev-python/pyside[${PYTHON_USEDEP},svg]
+ )
+ dev-python/pygments[${PYTHON_USEDEP}]
+ >=dev-python/pyzmq-13[${PYTHON_USEDEP}] )"
+DEPEND="${CDEPEND}
+ test? (
+ app-text/dvipng
+ dev-python/jinja[${PYTHON_USEDEP}]
+ dev-python/mock[${PY2_USEDEP}]
+ >=dev-python/nose-0.10.1[${PYTHON_USEDEP}]
+ dev-python/requests[${PYTHON_USEDEP}]
+ dev-python/sphinx[${PYTHON_USEDEP}]
+ >=www-servers/tornado-4.0[${PYTHON_USEDEP}]
+ )
+ doc? (
+ dev-python/cython[${PYTHON_USEDEP}]
+ $(python_gen_cond_dep 'dev-python/fabric[${PYTHON_USEDEP}]' python2_7)
+ dev-python/jsonschema[${PYTHON_USEDEP}]
+ dev-python/matplotlib[${PYTHON_USEDEP}]
+ >=dev-python/nose-0.10.1[${PYTHON_USEDEP}]
+ dev-python/numpydoc[${PYTHON_USEDEP}]
+ dev-python/pymongo[${PYTHON_USEDEP}]
+ dev-python/rpy[${PYTHON_USEDEP}]
+ >=dev-python/sphinx-1.1[${PYTHON_USEDEP}]
+ >=www-servers/tornado-4.0[${PYTHON_USEDEP}]
+ )"
+
+PATCHES=(
+ "${FILESDIR}"/2.1.0-substitute-files.patch
+ )
+
+DISTUTILS_IN_SOURCE_BUILD=1
+
+python_prepare_all() {
+ # Remove out of date insource files
+ rm IPython/extensions/rmagic.py || 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_noapi
+}
+
+src_test() {
+ # virtualx has trouble with parallel runs.
+ local DISTUTILS_NO_PARALLEL_BUILD=1
+ distutils-r1_src_test
+}
+
+python_test() {
+ distutils_install_for_testing
+ local fail
+ run_tests() {
+ pushd ${TEST_DIR} > /dev/null
+ "${PYTHON}" -m IPython.testing.iptestcontroller --all || fail=1
+ popd > /dev/null
+ }
+ VIRTUALX_COMMAND=run_tests virtualmake
+ [[ ${fail} ]] && die "Tests fail with ${EPYTHON}"
+}
+
+python_install() {
+ distutils-r1_python_install
+ use notebook && \
+ ln -sf "${EPREFIX}/usr/share/mathjax" "${D}$(python_get_sitedir)/IPython/html/static/mathjax"
+
+ # Create ipythonX.Y symlinks.
+ # TODO:
+ # 1. do we want them for pypy? No. pypy has no numpy
+ # 2. handle it in the eclass instead (use _python_ln_rel).
+ # With pypy not an option the dosym becomes unconditional
+ dosym ../lib/python-exec/${EPYTHON}/ipython \
+ /usr/bin/ipython${EPYTHON#python}
+}
+
+python_install_all() {
+ use doc && local HTML_DOCS=( docs/build/html/. )
+ use examples && local EXAMPLES=( examples/. )
+ distutils-r1_python_install_all
+}
+
+pkg_postinst() {
+ optfeature "sympyprinting" dev-python/sympy
+ optfeature "cythonmagic" dev-python/cython
+ if use nbconvert; then
+ if ! has_version app-text/pandoc ; then
+ einfo "Node.js will be used to convert notebooks to other formats"
+ einfo "like HTML. Support for that is still experimental. If you"
+ einfo "encounter any problems, please use app-text/pandoc instead."
+ fi
+ fi
+}
diff --git a/dev-python/ipython/ipython-3.2.1.ebuild b/dev-python/ipython/ipython-3.2.1.ebuild
new file mode 100644
index 000000000000..9d2a0a9138fd
--- /dev/null
+++ b/dev-python/ipython/ipython-3.2.1.ebuild
@@ -0,0 +1,151 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 python3_{3,4} )
+PYTHON_REQ_USE='readline,sqlite'
+
+inherit distutils-r1 eutils virtualx
+
+DESCRIPTION="Advanced interactive shell for Python"
+HOMEPAGE="http://ipython.org/"
+SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~ppc ~ppc64 ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos"
+IUSE="doc examples matplotlib mongodb notebook nbconvert octave qt4 +smp test wxwidgets"
+
+REQUIRED_USE="
+ test? ( doc matplotlib mongodb notebook nbconvert octave qt4 wxwidgets )
+ doc? ( mongodb )"
+
+CDEPEND="
+ dev-python/decorator[${PYTHON_USEDEP}]
+ dev-python/pexpect[${PYTHON_USEDEP}]
+ dev-python/pyparsing[${PYTHON_USEDEP}]
+ dev-python/setuptools[${PYTHON_USEDEP}]
+ dev-python/simplegeneric[${PYTHON_USEDEP}]
+ matplotlib? ( dev-python/matplotlib[${PYTHON_USEDEP}] )
+ mongodb? ( <dev-python/pymongo-3[${PYTHON_USEDEP}] )
+ octave? ( dev-python/oct2py[${PYTHON_USEDEP}] )
+ smp? ( >=dev-python/pyzmq-13[${PYTHON_USEDEP}] )
+ wxwidgets? ( $(python_gen_cond_dep 'dev-python/wxpython:*[${PYTHON_USEDEP}]' python2_7) )"
+RDEPEND="${CDEPEND}
+ notebook? (
+ dev-libs/mathjax
+ dev-python/jinja[${PYTHON_USEDEP}]
+ >=dev-python/jsonschema-2.0[${PYTHON_USEDEP}]
+ >=dev-python/mistune-0.5[${PYTHON_USEDEP}]
+ dev-python/pygments[${PYTHON_USEDEP}]
+ >=dev-python/pyzmq-13[${PYTHON_USEDEP}]
+ >=dev-python/terminado-0.3.3[${PYTHON_USEDEP}]
+ >=www-servers/tornado-4.0[${PYTHON_USEDEP}]
+ )
+ nbconvert? (
+ || ( >=net-libs/nodejs-0.9.12 >=app-text/pandoc-1.12.1 )
+ dev-python/jinja[${PYTHON_USEDEP}]
+ >=dev-python/jsonschema-2.0[${PYTHON_USEDEP}]
+ >=dev-python/mistune-0.5[${PYTHON_USEDEP}]
+ dev-python/pygments[${PYTHON_USEDEP}]
+ dev-python/sphinx[${PYTHON_USEDEP}]
+ )
+ qt4? (
+ || (
+ dev-python/PyQt4[${PYTHON_USEDEP},svg]
+ dev-python/PyQt5[${PYTHON_USEDEP},svg]
+ dev-python/pyside[${PYTHON_USEDEP},svg]
+ )
+ dev-python/pygments[${PYTHON_USEDEP}]
+ >=dev-python/pyzmq-13[${PYTHON_USEDEP}] )"
+DEPEND="${CDEPEND}
+ test? (
+ app-text/dvipng
+ dev-python/jinja[${PYTHON_USEDEP}]
+ $(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/sphinx[${PYTHON_USEDEP}]
+ >=www-servers/tornado-4.0[${PYTHON_USEDEP}]
+ )
+ doc? (
+ dev-python/cython[${PYTHON_USEDEP}]
+ $(python_gen_cond_dep 'dev-python/fabric[${PYTHON_USEDEP}]' python2_7)
+ >=dev-python/jsonschema-2.0[${PYTHON_USEDEP}]
+ dev-python/matplotlib[${PYTHON_USEDEP}]
+ >=dev-python/nose-0.10.1[${PYTHON_USEDEP}]
+ dev-python/numpydoc[${PYTHON_USEDEP}]
+ dev-python/rpy[${PYTHON_USEDEP}]
+ >=dev-python/sphinx-1.1[${PYTHON_USEDEP}]
+ >=www-servers/tornado-4.0[${PYTHON_USEDEP}]
+ )"
+
+PATCHES=(
+ "${FILESDIR}"/2.1.0-substitute-files.patch
+ )
+
+DISTUTILS_IN_SOURCE_BUILD=1
+
+python_prepare_all() {
+ # Remove out of date insource files
+ rm IPython/extensions/rmagic.py || 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_noapi
+}
+
+python_test() {
+ distutils_install_for_testing
+ # https://github.com/ipython/ipython/issues/8639
+ # Failure of some modules only in python3.4
+ local fail
+ run_tests() {
+ pushd ${TEST_DIR} > /dev/null
+ "${PYTHON}" -m IPython.testing.iptestcontroller --all || fail=1
+ popd > /dev/null
+ }
+ VIRTUALX_COMMAND=run_tests virtualmake
+ [[ ${fail} ]] && die "Tests fail with ${EPYTHON}"
+}
+
+python_install() {
+ distutils-r1_python_install
+ use notebook && \
+ ln -sf "${EPREFIX}/usr/share/mathjax" "${D}$(python_get_sitedir)/IPython/html/static/mathjax"
+
+ # Create ipythonX.Y symlinks.
+ # TODO:
+ # 1. do we want them for pypy? No. pypy has no numpy
+ # 2. handle it in the eclass instead (use _python_ln_rel).
+ # With pypy not an option the dosym becomes unconditional
+ dosym ../lib/python-exec/${EPYTHON}/ipython \
+ /usr/bin/ipython${EPYTHON#python}
+}
+
+python_install_all() {
+ use doc && local HTML_DOCS=( docs/build/html/. )
+ use examples && local EXAMPLES=( examples/. )
+ distutils-r1_python_install_all
+}
+
+pkg_postinst() {
+ optfeature "sympyprinting" dev-python/sympy
+ optfeature "cythonmagic" dev-python/cython
+ if use nbconvert; then
+ if ! has_version app-text/pandoc ; then
+ einfo "Node.js will be used to convert notebooks to other formats"
+ einfo "like HTML. Support for that is still experimental. If you"
+ einfo "encounter any problems, please use app-text/pandoc instead."
+ fi
+ fi
+}
diff --git a/dev-python/ipython/metadata.xml b/dev-python/ipython/metadata.xml
new file mode 100644
index 000000000000..e8cfb386059f
--- /dev/null
+++ b/dev-python/ipython/metadata.xml
@@ -0,0 +1,52 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>python</herd>
+ <longdescription lang="en">
+ IPython provides a replacement for the interactive Python interpreter with
+ extra functionality. Main features:
+ * Comprehensive object introspection.
+ * Input history, persistent across sessions.
+ * Caching of output results during a session with automatically generated
+ references.
+ * Readline based name completion.
+ * Extensible system of 'magic' commands for controlling the environment and
+ performing many tasks related either to IPython or the operating system.
+ * Configuration system with easy switching between different setups (simpler
+ than changing $PYTHONSTARTUP environment variables every time).
+ * Session logging and reloading.
+ * Extensible syntax processing for special purpose situations.
+ * Access to the system shell with user-extensible alias system.
+ * Easily embeddable in other Python programs.
+ * Integrated access to the pdb debugger and the Python profiler.
+</longdescription>
+ <longdescription lang="ja">
+対話的に利用する場合にPythonインタープリタから、より機能が豊富なIPythonへ置き換&gt;える事ができます。
+
+主機能:
+* 内包的オブジェクトの分析。
+* 入力ヒストリーはセッションを越えて記憶し続けます。
+* 出力は自動作成されるリファレンスのセッション間はキャッシュします。
+* Readlineを利用した名前補完。
+* 環境管理とIPythonまたはOSのどちらかに関係するタスク実行のためのmagic
+ コマンドを拡張可能なシステム。
+* 異なるセットアップを簡単に交換できるコンフィグレーション・システム。
+ (毎回起動時に、$PYTHONSTARTUP環境変数を指定するよりも簡単です。)
+* セッション・ロギングとセッション・リローディング。
+* 特別な状況時のための拡張可能な構文解析。
+* ユーザー定義できるエイリアス・システムでシステム・シェルにアクセス。
+* 他のPython言語プログラムを組み込むのが簡単。
+* pdbデバッガとprofilerへの統合アクセス。
+</longdescription>
+ <use>
+ <flag name="matplotlib">Add support for <pkg>dev-python/matplotlib</pkg></flag>
+ <flag name="mongodb">Enable support for MongoDB via <pkg>dev-python/pymongo</pkg></flag>
+ <flag name="notebook">Install requirements for the web notebook based on <pkg>www-servers/tornado</pkg></flag>
+ <flag name="nbconvert">Enable support for converting notebooks to various formats using <pkg>app-text/pandoc</pkg></flag>
+ <flag name="octave">Enable octave bridge via <pkg>dev-python/oct2py</pkg></flag>
+ </use>
+ <upstream>
+ <remote-id type="pypi">ipython</remote-id>
+ <remote-id type="github">ipython/ipython</remote-id>
+ </upstream>
+</pkgmetadata>