* [gentoo-commits] repo/gentoo:master commit in: dev-python/ipython/, dev-python/ipython/files/
@ 2015-09-17 18:37 Justin Lecher
0 siblings, 0 replies; 7+ messages in thread
From: Justin Lecher @ 2015-09-17 18:37 UTC (permalink / raw
To: gentoo-commits
commit: f3630dfe21300198d3ea9cb380f3f91b414bf707
Author: Marius Brehler <marbre <AT> linux <DOT> sungazer <DOT> de>
AuthorDate: Thu Sep 17 18:11:24 2015 +0000
Commit: Justin Lecher <jlec <AT> gentoo <DOT> org>
CommitDate: Thu Sep 17 18:11:24 2015 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f3630dfe
dev-python/ipython: Fix security issue
"Maliciously crafted text files in IPython/Jupyter editor"
http://seclists.org/oss-sec/2015/q3/558
https://bugs.gentoo.org/show_bug.cgi?id=560708
Package-Manager: portage-2.2.20.1
...n-3.2.1-Don-t-redirect-from-edit-to-files.patch | 55 ++++++++
...nly-redirect-to-editor-for-text-documents.patch | 38 +++++
.../ipython-3.2.1-set-mime-type-on-files.patch | 35 +++++
...et-model-mimetype-even-when-content-False.patch | 64 +++++++++
dev-python/ipython/ipython-3.2.1-r1.ebuild | 155 +++++++++++++++++++++
5 files changed, 347 insertions(+)
diff --git a/dev-python/ipython/files/ipython-3.2.1-Don-t-redirect-from-edit-to-files.patch b/dev-python/ipython/files/ipython-3.2.1-Don-t-redirect-from-edit-to-files.patch
new file mode 100644
index 0000000..5ec742c
--- /dev/null
+++ b/dev-python/ipython/files/ipython-3.2.1-Don-t-redirect-from-edit-to-files.patch
@@ -0,0 +1,55 @@
+Upstream patch to fix
+"Maliciously crafted text files in IPython/Jupyter editor".
+
+http://seclists.org/oss-sec/2015/q3/558
+https://bugs.gentoo.org/show_bug.cgi?id=560708
+
+
+From 2b835ca6daec2592d9127dc85bf2cdcfb718edf2 Mon Sep 17 00:00:00 2001
+From: Min RK <benjaminrk@gmail.com>
+Date: Mon, 20 Jul 2015 12:11:23 -0700
+Subject: [PATCH 4/4] Don't redirect from /edit/ to /files/
+
+show failure to decode, instead
+---
+ IPython/html/static/edit/js/editor.js | 15 +++------------
+ 1 file changed, 3 insertions(+), 12 deletions(-)
+
+diff --git a/IPython/html/static/edit/js/editor.js b/IPython/html/static/edit/js/editor.js
+index dd12ea4..75d65e0 100644
+--- a/IPython/html/static/edit/js/editor.js
++++ b/IPython/html/static/edit/js/editor.js
+@@ -90,19 +90,10 @@ function($,
+ }).catch(
+ function(error) {
+ that.events.trigger("file_load_failed.Editor", error);
+- if (((error.xhr||{}).responseJSON||{}).reason === 'bad format') {
+- window.location = utils.url_path_join(
+- that.base_url,
+- 'files',
+- that.file_path
+- );
+- } else {
+- console.warn('Error while loading: the error was:')
+- console.warn(error)
+- }
++ console.warn('Error loading: ', error);
+ cm.setValue("Error! " + error.message +
+ "\nSaving disabled.\nSee Console for more details.");
+- cm.setOption('readOnly','nocursor')
++ cm.setOption('readOnly','nocursor');
+ that.save_enabled = false;
+ }
+ );
+@@ -186,7 +177,7 @@ function($,
+ Editor.prototype._clean_state = function(){
+ var clean = this.codemirror.isClean(this.generation);
+ if (clean === this.clean){
+- return
++ return;
+ } else {
+ this.clean = clean;
+ }
+--
+2.4.6
+
diff --git a/dev-python/ipython/files/ipython-3.2.1-only-redirect-to-editor-for-text-documents.patch b/dev-python/ipython/files/ipython-3.2.1-only-redirect-to-editor-for-text-documents.patch
new file mode 100644
index 0000000..4b1f7d3
--- /dev/null
+++ b/dev-python/ipython/files/ipython-3.2.1-only-redirect-to-editor-for-text-documents.patch
@@ -0,0 +1,38 @@
+Upstream patch to fix
+"Maliciously crafted text files in IPython/Jupyter editor".
+
+http://seclists.org/oss-sec/2015/q3/558
+https://bugs.gentoo.org/show_bug.cgi?id=560708
+
+
+From df24d9153b86863ccfa98bf509704d9304143ce1 Mon Sep 17 00:00:00 2001
+From: Min RK <benjaminrk@gmail.com>
+Date: Mon, 20 Jul 2015 12:11:04 -0700
+Subject: [PATCH 3/4] only redirect to editor for text documents
+
+treat unidentified mime-types as text
+---
+ IPython/html/static/tree/js/notebooklist.js | 7 +++++++
+ 1 file changed, 7 insertions(+)
+
+diff --git a/IPython/html/static/tree/js/notebooklist.js b/IPython/html/static/tree/js/notebooklist.js
+index 0065143..d8c7b2a 100644
+--- a/IPython/html/static/tree/js/notebooklist.js
++++ b/IPython/html/static/tree/js/notebooklist.js
+@@ -532,6 +532,13 @@ define([
+ icon = 'running_' + icon;
+ }
+ var uri_prefix = NotebookList.uri_prefixes[model.type];
++ if (model.type === 'file' &&
++ model.mimetype && model.mimetype.substr(0,5) !== 'text/'
++ ) {
++ // send text/unidentified files to editor, others go to raw viewer
++ uri_prefix = 'files';
++ }
++
+ item.find(".item_icon").addClass(icon).addClass('icon-fixed-width');
+ var link = item.find("a.item_link")
+ .attr('href',
+--
+2.4.6
+
diff --git a/dev-python/ipython/files/ipython-3.2.1-set-mime-type-on-files.patch b/dev-python/ipython/files/ipython-3.2.1-set-mime-type-on-files.patch
new file mode 100644
index 0000000..b5d4b5f
--- /dev/null
+++ b/dev-python/ipython/files/ipython-3.2.1-set-mime-type-on-files.patch
@@ -0,0 +1,35 @@
+Upstream patch to fix
+"Maliciously crafted text files in IPython/Jupyter editor".
+
+http://seclists.org/oss-sec/2015/q3/558
+https://bugs.gentoo.org/show_bug.cgi?id=560708
+
+
+From d729ce7c2063c0de746a7c2ea39697040d0af5bf Mon Sep 17 00:00:00 2001
+From: Min RK <benjaminrk@gmail.com>
+Date: Mon, 20 Jul 2015 12:10:10 -0700
+Subject: [PATCH 1/4] set mime-type on /files/
+
+---
+ IPython/html/files/handlers.py | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+diff --git a/IPython/html/files/handlers.py b/IPython/html/files/handlers.py
+index 7727d08..b358d94 100644
+--- a/IPython/html/files/handlers.py
++++ b/IPython/html/files/handlers.py
+@@ -40,6 +40,11 @@ def get(self, path):
+ cur_mime = mimetypes.guess_type(name)[0]
+ if cur_mime is not None:
+ self.set_header('Content-Type', cur_mime)
++ else:
++ if model['format'] == 'base64':
++ self.set_header('Content-Type', 'application/octet-stream')
++ else:
++ self.set_header('Content-Type', 'text/plain')
+
+ if model['format'] == 'base64':
+ b64_bytes = model['content'].encode('ascii')
+--
+2.4.6
+
diff --git a/dev-python/ipython/files/ipython-3.2.1-set-model-mimetype-even-when-content-False.patch b/dev-python/ipython/files/ipython-3.2.1-set-model-mimetype-even-when-content-False.patch
new file mode 100644
index 0000000..a69f746
--- /dev/null
+++ b/dev-python/ipython/files/ipython-3.2.1-set-model-mimetype-even-when-content-False.patch
@@ -0,0 +1,64 @@
+Upstream patch to fix
+"Maliciously crafted text files in IPython/Jupyter editor".
+
+http://seclists.org/oss-sec/2015/q3/558
+https://bugs.gentoo.org/show_bug.cgi?id=560708
+
+
+From 50a1366a8fcfb94671c87199515ebc922882f447 Mon Sep 17 00:00:00 2001
+From: Min RK <benjaminrk@gmail.com>
+Date: Mon, 20 Jul 2015 12:10:25 -0700
+Subject: [PATCH 2/4] set model mimetype, even when content=False
+
+---
+ IPython/html/services/contents/filemanager.py | 12 +++++++-----
+ IPython/html/services/contents/handlers.py | 3 ---
+ 2 files changed, 7 insertions(+), 8 deletions(-)
+
+diff --git a/IPython/html/services/contents/filemanager.py b/IPython/html/services/contents/filemanager.py
+index 01ce07b..c869c75 100644
+--- a/IPython/html/services/contents/filemanager.py
++++ b/IPython/html/services/contents/filemanager.py
+@@ -277,18 +277,20 @@ def _file_model(self, path, content=True, format=None):
+ model['type'] = 'file'
+
+ os_path = self._get_os_path(path)
++ model['mimetype'] = mimetypes.guess_type(os_path)[0]
+
+ if content:
+ content, format = self._read_file(os_path, format)
+- default_mime = {
+- 'text': 'text/plain',
+- 'base64': 'application/octet-stream'
+- }[format]
++ if model['mimetype'] is None:
++ default_mime = {
++ 'text': 'text/plain',
++ 'base64': 'application/octet-stream'
++ }[format]
++ model['mimetype'] = default_mime
+
+ model.update(
+ content=content,
+ format=format,
+- mimetype=mimetypes.guess_type(os_path)[0] or default_mime,
+ )
+
+ return model
+diff --git a/IPython/html/services/contents/handlers.py b/IPython/html/services/contents/handlers.py
+index 5cd849e..d77e70e 100644
+--- a/IPython/html/services/contents/handlers.py
++++ b/IPython/html/services/contents/handlers.py
+@@ -52,9 +52,6 @@ def validate_model(model, expect_content):
+ )
+
+ maybe_none_keys = ['content', 'format']
+- if model['type'] == 'file':
+- # mimetype should be populated only for file models
+- maybe_none_keys.append('mimetype')
+ if expect_content:
+ errors = [key for key in maybe_none_keys if model[key] is None]
+ if errors:
+--
+2.4.6
+
diff --git a/dev-python/ipython/ipython-3.2.1-r1.ebuild b/dev-python/ipython/ipython-3.2.1-r1.ebuild
new file mode 100644
index 0000000..19a1588
--- /dev/null
+++ b/dev-python/ipython/ipython-3.2.1-r1.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 ~mips ~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/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}
+ dev-python/setuptools[${PYTHON_USEDEP}]
+ 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
+ "${FILESDIR}/${P}"-set-mime-type-on-files.patch
+ "${FILESDIR}/${P}"-set-model-mimetype-even-when-content-False.patch
+ "${FILESDIR}/${P}"-only-redirect-to-editor-for-text-documents.patch
+ "${FILESDIR}/${P}"-Don-t-redirect-from-edit-to-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
+}
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-python/ipython/, dev-python/ipython/files/
@ 2015-09-22 9:25 Justin Lecher
0 siblings, 0 replies; 7+ messages in thread
From: Justin Lecher @ 2015-09-22 9:25 UTC (permalink / raw
To: gentoo-commits
commit: 109af39f8885db800c3a13931c80d31d83939d9d
Author: Justin Lecher <jlec <AT> gentoo <DOT> org>
AuthorDate: Tue Sep 22 09:24:37 2015 +0000
Commit: Justin Lecher <jlec <AT> gentoo <DOT> org>
CommitDate: Tue Sep 22 09:24:37 2015 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=109af39f
dev-python/ipython: Drop vulnerable version
Gentoo-Bug: https://bugs.gentoo.org/show_bug.cgi?id=560708
Package-Manager: portage-2.2.21
Signed-off-by: Justin Lecher <jlec <AT> gentoo.org>
dev-python/ipython/Manifest | 1 -
.../files/ipython-2.2.0-login-backport.patch | 35 -----
dev-python/ipython/ipython-3.2.0.ebuild | 155 ---------------------
dev-python/ipython/ipython-3.2.1.ebuild | 151 --------------------
4 files changed, 342 deletions(-)
diff --git a/dev-python/ipython/Manifest b/dev-python/ipython/Manifest
index c681a5b..a7ca2e2 100644
--- a/dev-python/ipython/Manifest
+++ b/dev-python/ipython/Manifest
@@ -1,3 +1,2 @@
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/ipython-2.2.0-login-backport.patch b/dev-python/ipython/files/ipython-2.2.0-login-backport.patch
deleted file mode 100644
index cf6a99d..0000000
--- a/dev-python/ipython/files/ipython-2.2.0-login-backport.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-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-3.2.0.ebuild b/dev-python/ipython/ipython-3.2.0.ebuild
deleted file mode 100644
index 16f47ab..0000000
--- a/dev-python/ipython/ipython-3.2.0.ebuild
+++ /dev/null
@@ -1,155 +0,0 @@
-# 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/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}
- dev-python/setuptools[${PYTHON_USEDEP}]
- 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
deleted file mode 100644
index cce989a..0000000
--- a/dev-python/ipython/ipython-3.2.1.ebuild
+++ /dev/null
@@ -1,151 +0,0 @@
-# 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 ~mips 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/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}
- dev-python/setuptools[${PYTHON_USEDEP}]
- 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
-}
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-python/ipython/, dev-python/ipython/files/
@ 2015-10-10 15:48 Justin Lecher
0 siblings, 0 replies; 7+ messages in thread
From: Justin Lecher @ 2015-10-10 15:48 UTC (permalink / raw
To: gentoo-commits
commit: 664e0d0f43e4f3ddc8033a3b6a3d6d57d0590425
Author: Justin Lecher <jlec <AT> gentoo <DOT> org>
AuthorDate: Sat Oct 10 15:48:42 2015 +0000
Commit: Justin Lecher <jlec <AT> gentoo <DOT> org>
CommitDate: Sat Oct 10 15:48:42 2015 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=664e0d0f
dev-python/ipython: Drop vulnerable version (CVE-2015-5607, CVE-2015-7337)
Gentoo-Bug: https://bugs.gentoo.org/show_bug.cgi?id=554868
Gentoo-Bug: https://bugs.gentoo.org/show_bug.cgi?id=560708
Package-Manager: portage-2.2.23
Signed-off-by: Justin Lecher <jlec <AT> gentoo.org>
dev-python/ipython/Manifest | 1 -
dev-python/ipython/files/2.1.0-disable-tests.patch | 32 -----
dev-python/ipython/ipython-2.2.0-r1.ebuild | 137 ---------------------
3 files changed, 170 deletions(-)
diff --git a/dev-python/ipython/Manifest b/dev-python/ipython/Manifest
index a7ca2e2..49d8b3f 100644
--- a/dev-python/ipython/Manifest
+++ b/dev-python/ipython/Manifest
@@ -1,2 +1 @@
-DIST ipython-2.2.0.tar.gz 11912007 SHA256 b7ca77ba54a02f032055b73f5f62b01431f818ae00f63716b78f881c2b2564e2 SHA512 4953bf5e9d6d5c6ad538d07d62b5b100fd86a37f6b861238501581c0059bd4655345ca05cf395e79709c38ce4cb9c6293f5d11ac0252a618ad8272b161140d13 WHIRLPOOL a5e433a3a840b65fd0644f023cc9e93862e48a906e4e9d1596ebbd24290d486be580dca017ef1586da980b6792dcd7ed9aab4af81421bbf083d885927db6fcc8
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
deleted file mode 100644
index bdbb1be..0000000
--- a/dev-python/ipython/files/2.1.0-disable-tests.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-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/ipython-2.2.0-r1.ebuild b/dev-python/ipython/ipython-2.2.0-r1.ebuild
deleted file mode 100644
index 62c6f8e..0000000
--- a/dev-python/ipython/ipython-2.2.0-r1.ebuild
+++ /dev/null
@@ -1,137 +0,0 @@
-# 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/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}
- dev-python/setuptools[${PYTHON_USEDEP}]
- 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"
-}
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-python/ipython/, dev-python/ipython/files/
@ 2016-06-06 18:51 Patrick McLean
0 siblings, 0 replies; 7+ messages in thread
From: Patrick McLean @ 2016-06-06 18:51 UTC (permalink / raw
To: gentoo-commits
commit: dbb770ac32710490c529dffe6fc43b6df931798f
Author: Patrick McLean <chutzpah <AT> gentoo <DOT> org>
AuthorDate: Mon Jun 6 18:50:03 2016 +0000
Commit: Patrick McLean <chutzpah <AT> gentoo <DOT> org>
CommitDate: Mon Jun 6 18:51:37 2016 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=dbb770ac
dev-python/ipython: Add missing RDEPEND for python2, apply patch to not use on python3
Adds RDEPEND on dev-python/backports-shutil_get_terminal_size for python2, add patch from
https://github.com/ipython/ipython/pull/9417 to not require on python3.
Gentoo-Bug: 585038
Package-Manager: portage-2.3.0_rc1
....2.0-only-use-backports-shutil-on-python2.patch | 40 ++++++
dev-python/ipython/ipython-4.2.0-r1.ebuild | 145 +++++++++++++++++++++
2 files changed, 185 insertions(+)
diff --git a/dev-python/ipython/files/ipython-4.2.0-only-use-backports-shutil-on-python2.patch b/dev-python/ipython/files/ipython-4.2.0-only-use-backports-shutil-on-python2.patch
new file mode 100644
index 0000000..ba17f0f
--- /dev/null
+++ b/dev-python/ipython/files/ipython-4.2.0-only-use-backports-shutil-on-python2.patch
@@ -0,0 +1,40 @@
+diff --git a/IPython/utils/terminal.py b/IPython/utils/terminal.py
+index 9e7be2a..a1f0f73 100644
+--- a/IPython/utils/terminal.py
++++ b/IPython/utils/terminal.py
+@@ -9,22 +9,18 @@
+ * Alexander Belchenko (e-mail: bialix AT ukr.net)
+ """
+
+-#-----------------------------------------------------------------------------
+-# Copyright (C) 2008-2011 The IPython Development Team
+-#
+-# Distributed under the terms of the BSD License. The full license is in
+-# the file COPYING, distributed as part of this software.
+-#-----------------------------------------------------------------------------
+-
+-#-----------------------------------------------------------------------------
+-# Imports
+-#-----------------------------------------------------------------------------
++# Copyright (c) IPython Development Team.
++# Distributed under the terms of the Modified BSD License.
+
+ import os
+ import struct
+ import sys
+ import warnings
+-import backports.shutil_get_terminal_size
++try:
++ from shutil import get_terminal_size as _get_terminal_size
++except ImportError:
++ # use backport on Python 2
++ from backports.shutil_get_terminal_size import get_terminal_size as _get_terminal_size
+
+ from . import py3compat
+
+@@ -122,4 +118,4 @@ def freeze_term_title():
+
+
+ def get_terminal_size(defaultx=80, defaulty=25):
+- return backports.shutil_get_terminal_size.get_terminal_size((defaultx, defaulty))
++ return _get_terminal_size((defaultx, defaulty))
diff --git a/dev-python/ipython/ipython-4.2.0-r1.ebuild b/dev-python/ipython/ipython-4.2.0-r1.ebuild
new file mode 100644
index 0000000..dc201d7
--- /dev/null
+++ b/dev-python/ipython/ipython-4.2.0-r1.ebuild
@@ -0,0 +1,145 @@
+# 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='readline,sqlite,threads(+)'
+
+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 ~arm64 ~x86"
+IUSE="doc examples matplotlib mongodb notebook nbconvert qt4 +smp test wxwidgets"
+
+REQUIRED_USE="
+ test? ( doc matplotlib mongodb notebook nbconvert qt4 wxwidgets )
+ doc? ( mongodb )"
+
+CDEPEND="
+ dev-python/decorator[${PYTHON_USEDEP}]
+ dev-python/pexpect[${PYTHON_USEDEP}]
+ dev-python/pickleshare[${PYTHON_USEDEP}]
+ dev-python/pyparsing[${PYTHON_USEDEP}]
+ dev-python/simplegeneric[${PYTHON_USEDEP}]
+ >=dev-python/traitlets-4.2.1[${PYTHON_USEDEP}]
+ >=dev-python/prompt_toolkit-1.0.0[${PYTHON_USEDEP}]
+ matplotlib? ( dev-python/matplotlib[${PYTHON_USEDEP}] )
+ mongodb? ( <dev-python/pymongo-3[${PYTHON_USEDEP}] )
+ wxwidgets? ( $(python_gen_cond_dep 'dev-python/wxpython:*[${PYTHON_USEDEP}]' python2_7) )"
+
+RDEPEND="${CDEPEND}
+ notebook? (
+ dev-python/notebook[${PYTHON_USEDEP}]
+ dev-python/ipywidgets[${PYTHON_USEDEP}]
+ )
+ nbconvert? ( dev-python/nbconvert[${PYTHON_USEDEP}] )"
+DEPEND="${CDEPEND}
+ >=dev-python/setuptools-18.5[${PYTHON_USEDEP}]
+ $(python_gen_cond_dep \
+ 'dev-python/backports-shutil_get_terminal_size[${PYTHON_USEDEP}]' 'python2*')
+ 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/pygments[${PYTHON_USEDEP}]
+ dev-python/requests[${PYTHON_USEDEP}]
+ dev-python/sphinx[${PYTHON_USEDEP}]
+ dev-python/testpath[${PYTHON_USEDEP}]
+ >=www-servers/tornado-4.0[${PYTHON_USEDEP}]
+ x11-base/xorg-server[xvfb]
+ )
+ 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/rpy[${PYTHON_USEDEP}]
+ >=dev-python/sphinx-1.3[${PYTHON_USEDEP}]
+ >=www-servers/tornado-4.0[${PYTHON_USEDEP}]
+ )"
+
+PDEPEND="
+ qt4? ( dev-python/qtconsole )
+ smp? ( dev-python/ipyparallel[${PYTHON_USEDEP}] )"
+
+PATCHES=(
+ "${FILESDIR}"/2.1.0-substitute-files.patch
+ "${FILESDIR}/${P}-only-use-backports-shutil-on-python2.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 || die
+ "${PYTHON}" -m IPython.testing.iptestcontroller --all || fail=1
+ popd > /dev/null || die
+ }
+ virtx run_tests
+ [[ ${fail} ]] && die "Tests fail with ${EPYTHON}"
+}
+
+python_install() {
+ distutils-r1_python_install
+
+ # 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/. )
+ distutils-r1_python_install_all
+ if use examples; then
+ insinto /usr/share/doc/${PF}/examples
+ doins -r examples/.
+ docompress -x /usr/share/doc/${PF}/examples
+ fi
+}
+
+pkg_postinst() {
+ optfeature "sympyprinting" dev-python/sympy
+ optfeature "cythonmagic" dev-python/cython
+ optfeature "%lprun magic command" dev-python/line_profiler
+ optfeature "%mprun magic command" dev-python/memory_profiler
+ 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
+}
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-python/ipython/, dev-python/ipython/files/
@ 2024-07-27 9:53 Michał Górny
0 siblings, 0 replies; 7+ messages in thread
From: Michał Górny @ 2024-07-27 9:53 UTC (permalink / raw
To: gentoo-commits
commit: 40d34951ce3cbf80e931427ea131604751ca2cc5
Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Sat Jul 27 09:46:42 2024 +0000
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Sat Jul 27 09:53:04 2024 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=40d34951
dev-python/ipython: Remove old
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
dev-python/ipython/Manifest | 2 -
.../ipython/files/2.1.0-substitute-files.patch | 27 ---
.../ipython/files/ipython-8.24.0-mpl-3.9.patch | 72 --------
.../ipython/files/ipython-8.24.0-pytest-8.patch | 125 --------------
dev-python/ipython/ipython-8.24.0-r1.ebuild | 182 ---------------------
dev-python/ipython/ipython-8.24.0.ebuild | 179 --------------------
dev-python/ipython/ipython-8.25.0.ebuild | 152 -----------------
7 files changed, 739 deletions(-)
diff --git a/dev-python/ipython/Manifest b/dev-python/ipython/Manifest
index 062a0f892705..4deaec7642df 100644
--- a/dev-python/ipython/Manifest
+++ b/dev-python/ipython/Manifest
@@ -1,3 +1 @@
-DIST ipython-8.24.0.tar.gz 5491819 BLAKE2B 49ca26f4ab6ceb7c787038db5b1073790d7a32cb96951bcc2ffa4ac05b3a689507e654344fda196560e2dc4b9e2225335e27bc3fb7472ba487adebb1ebba44e1 SHA512 adf032a93e94e1e8008a1cc106fb348d0bccb914a335e0ad04490531e7a7d16e7a2dc4a345f7faf1b3151d60a649413fa78130688cb59de088e5eb4291689310
-DIST ipython-8.25.0.tar.gz 5492936 BLAKE2B 1abb407e60d04e9f7834ee112f68bc1152b5693880dc091103ee015b1749949f9522537f183fd598992a5fe26124408bcfa8ad8550779fe94c0f2223b4879dca SHA512 b048a7bf65a16a1bc0d451a547998458ebfe93b4576bb89080f99d3e6ccbba34cfb1d3d33e2d32a6d1f6e8b2f3cf1b102b775f66c6610272ee8ffe15222d951f
DIST ipython-8.26.0.tar.gz 5493422 BLAKE2B 2d05630d64d932190bf07c233e4241f5ce4830e62a3fb3551a93d9bfa83545de8090902a0528004b8233169d20652b7a3bbf1913ce078254246002956b1e44e1 SHA512 05f331cd39b75aed78bb06460f56145d9cefa2d65d818ae0fd25b3739d2c11830e3d6c427206787d3b3efec10de8ed4c966c25a70e4b7a7e1c914cfe8fba6a70
diff --git a/dev-python/ipython/files/2.1.0-substitute-files.patch b/dev-python/ipython/files/2.1.0-substitute-files.patch
deleted file mode 100644
index 659df39226ac..000000000000
--- a/dev-python/ipython/files/2.1.0-substitute-files.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-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-8.24.0-mpl-3.9.patch b/dev-python/ipython/files/ipython-8.24.0-mpl-3.9.patch
deleted file mode 100644
index 927cc95ccf29..000000000000
--- a/dev-python/ipython/files/ipython-8.24.0-mpl-3.9.patch
+++ /dev/null
@@ -1,72 +0,0 @@
-diff --git a/IPython/core/pylabtools.py b/IPython/core/pylabtools.py
-index 1f5a11f37e..4287834418 100644
---- a/IPython/core/pylabtools.py
-+++ b/IPython/core/pylabtools.py
-@@ -345,8 +345,10 @@ def find_gui_and_backend(gui=None, gui_select=None):
- backend = matplotlib.rcParamsOrig["backend"]
- backend, gui = backend_registry.resolve_backend(backend)
- else:
-+ gui = _convert_gui_to_matplotlib(gui)
- backend, gui = backend_registry.resolve_gui_or_backend(gui)
-
-+ gui = _convert_gui_from_matplotlib(gui)
- return gui, backend
-
- # Fallback to previous behaviour (Matplotlib < 3.9)
-@@ -509,10 +511,28 @@ def _list_matplotlib_backends_and_gui_loops() -> list[str]:
- if _matplotlib_manages_backends():
- from matplotlib.backends.registry import backend_registry
-
-- ret = backend_registry.list_all() + backend_registry.list_gui_frameworks()
-+ ret = backend_registry.list_all() + [
-+ _convert_gui_from_matplotlib(gui)
-+ for gui in backend_registry.list_gui_frameworks()
-+ ]
- else:
- from IPython.core import pylabtools
-
- ret = list(pylabtools.backends.keys())
-
- return sorted(["auto"] + ret)
-+
-+
-+# Matplotlib and IPython do not always use the same gui framework name.
-+# Always use the approprate one of these conversion functions when passing a
-+# gui framework name to/from Matplotlib.
-+def _convert_gui_to_matplotlib(gui: str | None) -> str | None:
-+ if gui and gui.lower() == "osx":
-+ return "macosx"
-+ return gui
-+
-+
-+def _convert_gui_from_matplotlib(gui: str | None) -> str | None:
-+ if gui and gui.lower() == "macosx":
-+ return "osx"
-+ return gui
-diff --git a/IPython/core/tests/test_pylabtools.py b/IPython/core/tests/test_pylabtools.py
-index 4099f04044..6bddb34807 100644
---- a/IPython/core/tests/test_pylabtools.py
-+++ b/IPython/core/tests/test_pylabtools.py
-@@ -276,11 +276,11 @@ def test_figure_no_canvas():
- # name is gui
- ("gtk3", "gtk3", "gtk3agg"),
- ("gtk4", "gtk4", "gtk4agg"),
-- ("headless", "headless", "agg"),
-+ ("headless", None, "agg"),
- ("osx", "osx", "macosx"),
- ("qt", "qt", "qtagg"),
- ("qt5", "qt5", "qt5agg"),
-- ("qt6", "qt6", "qt6agg"),
-+ ("qt6", "qt6", "qtagg"),
- ("tk", "tk", "tkagg"),
- ("wx", "wx", "wxagg"),
- # name is backend
-@@ -301,8 +301,6 @@ def test_figure_no_canvas():
- ("qtcairo", "qt", "qtcairo"),
- ("qt5agg", "qt5", "qt5agg"),
- ("qt5cairo", "qt5", "qt5cairo"),
-- ("qt6agg", "qt", "qt6agg"),
-- ("qt6cairo", "qt", "qt6cairo"),
- ("tkagg", "tk", "tkagg"),
- ("tkcairo", "tk", "tkcairo"),
- ("webagg", "webagg", "webagg"),
diff --git a/dev-python/ipython/files/ipython-8.24.0-pytest-8.patch b/dev-python/ipython/files/ipython-8.24.0-pytest-8.patch
deleted file mode 100644
index 04f1a1534ac5..000000000000
--- a/dev-python/ipython/files/ipython-8.24.0-pytest-8.patch
+++ /dev/null
@@ -1,125 +0,0 @@
-From 7df70a3cd79068be6f98596e427d60a5d0cfe5b3 Mon Sep 17 00:00:00 2001
-From: Steve Kowalik <steven@wedontsleep.org>
-Date: Thu, 23 May 2024 13:00:43 +1000
-Subject: [PATCH] Support pytest 8.1+ changes in pytest plugin
-
-Pytest 8.1 has also changed the plugin API, as well as required new
-keyword arguments. I've shifted the pytest version calculation to the
-module level so we can use it everywhere, and continue supporting all
-versions of pytest that we can.
-
-Fixes #14390
----
- IPython/testing/plugin/pytest_ipdoctest.py | 36 ++++++++++++++++------
- 1 file changed, 26 insertions(+), 10 deletions(-)
-
-diff --git a/IPython/testing/plugin/pytest_ipdoctest.py b/IPython/testing/plugin/pytest_ipdoctest.py
-index fc8af13b579..40a3ae92b40 100644
---- a/IPython/testing/plugin/pytest_ipdoctest.py
-+++ b/IPython/testing/plugin/pytest_ipdoctest.py
-@@ -38,7 +38,11 @@
- from _pytest.compat import safe_getattr
- from _pytest.config import Config
- from _pytest.config.argparsing import Parser
--from _pytest.fixtures import FixtureRequest
-+
-+try:
-+ from _pytest.fixtures import TopRequest as FixtureRequest
-+except ImportError:
-+ from _pytest.fixtures import FixtureRequest
- from _pytest.nodes import Collector
- from _pytest.outcomes import OutcomeException
- from _pytest.pathlib import fnmatch_ex, import_path
-@@ -69,6 +73,8 @@
- # Lazy definition of output checker class
- CHECKER_CLASS: Optional[Type["IPDoctestOutputChecker"]] = None
-
-+pytest_version = tuple([int(part) for part in pytest.__version__.split(".")])
-+
-
- def pytest_addoption(parser: Parser) -> None:
- parser.addini(
-@@ -143,7 +149,7 @@ def pytest_collect_file(
- return None
-
-
--if int(pytest.__version__.split(".")[0]) < 7:
-+if pytest_version[0] < 7:
- _collect_file = pytest_collect_file
-
- def pytest_collect_file(
-@@ -448,7 +454,7 @@ def reportinfo(self) -> Tuple[Union["os.PathLike[str]", str], Optional[int], str
- assert self.dtest is not None
- return self.path, self.dtest.lineno, "[ipdoctest] %s" % self.name
-
-- if int(pytest.__version__.split(".")[0]) < 7:
-+ if pytest_version[0] < 7:
-
- @property
- def path(self) -> Path:
-@@ -521,7 +527,7 @@ def collect(self) -> Iterable[IPDoctestItem]:
- self, name=test.name, runner=runner, dtest=test
- )
-
-- if int(pytest.__version__.split(".")[0]) < 7:
-+ if pytest_version[0] < 7:
-
- @property
- def path(self) -> Path:
-@@ -636,20 +642,26 @@ def _find(
- )
-
- if self.path.name == "conftest.py":
-- if int(pytest.__version__.split(".")[0]) < 7:
-+ if pytest_version[0] < 7:
- module = self.config.pluginmanager._importconftest(
- self.path,
- self.config.getoption("importmode"),
- )
- else:
-+ kwargs = {"rootpath": self.config.rootpath}
-+ if pytest_version >= (8, 1):
-+ kwargs["consider_namespace_packages"] = False
- module = self.config.pluginmanager._importconftest(
- self.path,
- self.config.getoption("importmode"),
-- rootpath=self.config.rootpath,
-+ **kwargs,
- )
- else:
- try:
-- module = import_path(self.path, root=self.config.rootpath)
-+ kwargs = {"root": self.config.rootpath}
-+ if pytest_version >= (8, 1):
-+ kwargs["consider_namespace_packages"] = False
-+ module = import_path(self.path, **kwargs)
- except ImportError:
- if self.config.getvalue("ipdoctest_ignore_import_errors"):
- pytest.skip("unable to import module %r" % self.path)
-@@ -671,7 +683,7 @@ def _find(
- self, name=test.name, runner=runner, dtest=test
- )
-
-- if int(pytest.__version__.split(".")[0]) < 7:
-+ if pytest_version[0] < 7:
-
- @property
- def path(self) -> Path:
-@@ -701,11 +713,15 @@ def func() -> None:
-
- doctest_item.funcargs = {} # type: ignore[attr-defined]
- fm = doctest_item.session._fixturemanager
-+ kwargs = {"node": doctest_item, "func": func, "cls": None}
-+ if pytest_version <= (8, 0):
-+ kwargs["funcargs"] = False
- doctest_item._fixtureinfo = fm.getfixtureinfo( # type: ignore[attr-defined]
-- node=doctest_item, func=func, cls=None, funcargs=False
-+ **kwargs
- )
- fixture_request = FixtureRequest(doctest_item, _ispytest=True)
-- fixture_request._fillfixtures()
-+ if pytest_version <= (8, 0):
-+ fixture_request._fillfixtures()
- return fixture_request
-
-
diff --git a/dev-python/ipython/ipython-8.24.0-r1.ebuild b/dev-python/ipython/ipython-8.24.0-r1.ebuild
deleted file mode 100644
index f4db7e09820a..000000000000
--- a/dev-python/ipython/ipython-8.24.0-r1.ebuild
+++ /dev/null
@@ -1,182 +0,0 @@
-# Copyright 1999-2024 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-DISTUTILS_USE_PEP517=standalone
-PYTHON_COMPAT=( pypy3 python3_{10..12} )
-PYTHON_REQ_USE='readline(+),sqlite,threads(+)'
-
-inherit distutils-r1 optfeature pypi virtualx
-
-DESCRIPTION="Advanced interactive shell for Python"
-HOMEPAGE="
- https://ipython.org/
- https://github.com/ipython/ipython/
- https://pypi.org/project/ipython/
-"
-
-LICENSE="BSD"
-SLOT="0"
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ppc ppc64 ~riscv ~s390 ~sparc x86 ~arm64-macos ~x64-macos"
-IUSE="doc examples notebook nbconvert qt5 +smp test"
-RESTRICT="!test? ( test )"
-
-RDEPEND="
- dev-python/decorator[${PYTHON_USEDEP}]
- >=dev-python/jedi-0.16[${PYTHON_USEDEP}]
- dev-python/matplotlib-inline[${PYTHON_USEDEP}]
- >=dev-python/pexpect-4.3[${PYTHON_USEDEP}]
- >=dev-python/prompt-toolkit-3.0.41[${PYTHON_USEDEP}]
- <dev-python/prompt-toolkit-3.1[${PYTHON_USEDEP}]
- >=dev-python/pygments-2.4.0[${PYTHON_USEDEP}]
- dev-python/stack-data[${PYTHON_USEDEP}]
- >=dev-python/traitlets-5.13.0[${PYTHON_USEDEP}]
- $(python_gen_cond_dep '
- dev-python/exceptiongroup[${PYTHON_USEDEP}]
- ' 3.10)
- $(python_gen_cond_dep '
- dev-python/typing-extensions[${PYTHON_USEDEP}]
- ' 3.10 3.11)
-"
-
-BDEPEND="
- dev-python/setuptools[${PYTHON_USEDEP}]
- test? (
- app-text/dvipng[truetype]
- >=dev-python/ipykernel-5.1.0[${PYTHON_USEDEP}]
- >=dev-python/matplotlib-3.9[${PYTHON_USEDEP}]
- dev-python/nbformat[${PYTHON_USEDEP}]
- >=dev-python/numpy-1.23[${PYTHON_USEDEP}]
- dev-python/matplotlib-inline[${PYTHON_USEDEP}]
- dev-python/pickleshare[${PYTHON_USEDEP}]
- dev-python/pytest-asyncio[${PYTHON_USEDEP}]
- dev-python/requests[${PYTHON_USEDEP}]
- dev-python/testpath[${PYTHON_USEDEP}]
- )
- doc? (
- >=dev-python/ipykernel-5.1.0[${PYTHON_USEDEP}]
- dev-python/matplotlib[${PYTHON_USEDEP}]
- >=dev-python/sphinx-2[${PYTHON_USEDEP}]
- dev-python/sphinx-rtd-theme[${PYTHON_USEDEP}]
- )
-"
-
-distutils_enable_tests pytest
-
-RDEPEND+="
- nbconvert? (
- dev-python/nbconvert[${PYTHON_USEDEP}]
- )
-"
-PDEPEND="
- $(python_gen_cond_dep '
- notebook? (
- dev-python/notebook[${PYTHON_USEDEP}]
- dev-python/ipywidgets[${PYTHON_USEDEP}]
- dev-python/widgetsnbextension[${PYTHON_USEDEP}]
- )
- qt5? ( dev-python/qtconsole[${PYTHON_USEDEP}] )
- ' 'python*')
- smp? (
- >=dev-python/ipykernel-5.1.0[${PYTHON_USEDEP}]
- >=dev-python/ipyparallel-6.2.3[${PYTHON_USEDEP}]
- )
-"
-
-PATCHES=(
- "${FILESDIR}"/2.1.0-substitute-files.patch
- # https://github.com/ipython/ipython/pull/14441
- "${FILESDIR}/${P}-pytest-8.patch"
- # https://github.com/ipython/ipython/pull/14420
- "${FILESDIR}/${P}-mpl-3.9.patch"
-)
-
-python_prepare_all() {
- # Remove out of date insource files
- #rm IPython/extensions/cythonmagic.py || die
- #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
-
- # Rename the test directory to reduce sys.path pollution
- # https://github.com/ipython/ipython/issues/12892
- mv IPython/extensions/{,ipython_}tests || die
-
- distutils-r1_python_prepare_all
-}
-
-python_compile_all() {
- if use doc; then
- emake -C docs html_noapi
- HTML_DOCS=( docs/build/html/. )
- fi
-}
-
-src_test() {
- virtx distutils-r1_src_test
-}
-
-python_test() {
- local -x IPYTHON_TESTING_TIMEOUT_SCALE=20
- local EPYTEST_DESELECT=(
- # TODO: looks to be a regression due to a newer dep
- IPython/core/tests/test_oinspect.py::test_class_signature
- IPython/core/tests/test_oinspect.py::test_render_signature_long
- IPython/terminal/tests/test_shortcuts.py::test_modify_shortcut_with_filters
- )
-
- case ${EPYTHON} in
- pypy3)
- EPYTEST_DESELECT+=(
- # https://github.com/numpy/numpy/issues/25164
- IPython/lib/tests/test_display.py::TestAudioDataWithoutNumpy
- )
- ;;
- esac
-
- # nonfatal implied by virtx
- local -x PYTEST_DISABLE_PLUGIN_AUTOLOAD=1
- nonfatal epytest -p asyncio --asyncio-mode=auto ||
- die "Tests failed on ${EPYTHON}"
-}
-
-python_install() {
- distutils-r1_python_install
-
- # 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() {
- distutils-r1_python_install_all
-
- if use examples; then
- dodoc -r examples
- docompress -x /usr/share/doc/${PF}/examples
- fi
-}
-
-pkg_postinst() {
- optfeature "code formatting" dev-python/black
- optfeature "sympyprinting" dev-python/sympy
- optfeature "cythonmagic" dev-python/cython
- optfeature "%lprun magic command" dev-python/line-profiler
- optfeature "%matplotlib magic command" dev-python/matplotlib-inline
-
- if use nbconvert; then
- if ! has_version virtual/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-8.24.0.ebuild b/dev-python/ipython/ipython-8.24.0.ebuild
deleted file mode 100644
index bbb1d7e16ff3..000000000000
--- a/dev-python/ipython/ipython-8.24.0.ebuild
+++ /dev/null
@@ -1,179 +0,0 @@
-# Copyright 1999-2024 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-DISTUTILS_USE_PEP517=standalone
-PYTHON_COMPAT=( pypy3 python3_{10..12} )
-PYTHON_REQ_USE='readline(+),sqlite,threads(+)'
-
-inherit distutils-r1 optfeature pypi virtualx
-
-DESCRIPTION="Advanced interactive shell for Python"
-HOMEPAGE="
- https://ipython.org/
- https://github.com/ipython/ipython/
- https://pypi.org/project/ipython/
-"
-
-LICENSE="BSD"
-SLOT="0"
-KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ppc ppc64 ~riscv ~s390 sparc x86 ~arm64-macos ~x64-macos"
-IUSE="doc examples notebook nbconvert qt5 +smp test"
-RESTRICT="!test? ( test )"
-
-RDEPEND="
- dev-python/decorator[${PYTHON_USEDEP}]
- >=dev-python/jedi-0.16[${PYTHON_USEDEP}]
- dev-python/matplotlib-inline[${PYTHON_USEDEP}]
- >=dev-python/pexpect-4.3[${PYTHON_USEDEP}]
- >=dev-python/prompt-toolkit-3.0.41[${PYTHON_USEDEP}]
- <dev-python/prompt-toolkit-3.1[${PYTHON_USEDEP}]
- >=dev-python/pygments-2.4.0[${PYTHON_USEDEP}]
- dev-python/stack-data[${PYTHON_USEDEP}]
- >=dev-python/traitlets-5.13.0[${PYTHON_USEDEP}]
- $(python_gen_cond_dep '
- dev-python/exceptiongroup[${PYTHON_USEDEP}]
- ' 3.10)
- $(python_gen_cond_dep '
- dev-python/typing-extensions[${PYTHON_USEDEP}]
- ' 3.10 3.11)
-"
-
-BDEPEND="
- dev-python/setuptools[${PYTHON_USEDEP}]
- test? (
- app-text/dvipng[truetype]
- >=dev-python/ipykernel-5.1.0[${PYTHON_USEDEP}]
- dev-python/matplotlib[${PYTHON_USEDEP}]
- dev-python/nbformat[${PYTHON_USEDEP}]
- >=dev-python/numpy-1.23[${PYTHON_USEDEP}]
- dev-python/matplotlib-inline[${PYTHON_USEDEP}]
- dev-python/pickleshare[${PYTHON_USEDEP}]
- <dev-python/pytest-8[${PYTHON_USEDEP}]
- dev-python/pytest-asyncio[${PYTHON_USEDEP}]
- dev-python/requests[${PYTHON_USEDEP}]
- dev-python/testpath[${PYTHON_USEDEP}]
- )
- doc? (
- >=dev-python/ipykernel-5.1.0[${PYTHON_USEDEP}]
- dev-python/matplotlib[${PYTHON_USEDEP}]
- >=dev-python/sphinx-2[${PYTHON_USEDEP}]
- dev-python/sphinx-rtd-theme[${PYTHON_USEDEP}]
- )
-"
-
-distutils_enable_tests pytest
-
-RDEPEND+="
- nbconvert? (
- dev-python/nbconvert[${PYTHON_USEDEP}]
- )
-"
-PDEPEND="
- $(python_gen_cond_dep '
- notebook? (
- dev-python/notebook[${PYTHON_USEDEP}]
- dev-python/ipywidgets[${PYTHON_USEDEP}]
- dev-python/widgetsnbextension[${PYTHON_USEDEP}]
- )
- qt5? ( dev-python/qtconsole[${PYTHON_USEDEP}] )
- ' 'python*')
- smp? (
- >=dev-python/ipykernel-5.1.0[${PYTHON_USEDEP}]
- >=dev-python/ipyparallel-6.2.3[${PYTHON_USEDEP}]
- )
-"
-
-PATCHES=(
- "${FILESDIR}"/2.1.0-substitute-files.patch
-)
-
-python_prepare_all() {
- # Remove out of date insource files
- #rm IPython/extensions/cythonmagic.py || die
- #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
-
- # Rename the test directory to reduce sys.path pollution
- # https://github.com/ipython/ipython/issues/12892
- mv IPython/extensions/{,ipython_}tests || die
-
- distutils-r1_python_prepare_all
-}
-
-python_compile_all() {
- if use doc; then
- emake -C docs html_noapi
- HTML_DOCS=( docs/build/html/. )
- fi
-}
-
-src_test() {
- virtx distutils-r1_src_test
-}
-
-python_test() {
- local -x IPYTHON_TESTING_TIMEOUT_SCALE=20
- local EPYTEST_DESELECT=(
- # TODO: looks to be a regression due to a newer dep
- IPython/core/tests/test_oinspect.py::test_class_signature
- IPython/core/tests/test_oinspect.py::test_render_signature_long
- IPython/terminal/tests/test_shortcuts.py::test_modify_shortcut_with_filters
- )
-
- case ${EPYTHON} in
- pypy3)
- EPYTEST_DESELECT+=(
- # https://github.com/numpy/numpy/issues/25164
- IPython/lib/tests/test_display.py::TestAudioDataWithoutNumpy
- )
- ;;
- esac
-
- # nonfatal implied by virtx
- local -x PYTEST_DISABLE_PLUGIN_AUTOLOAD=1
- nonfatal epytest -p asyncio --asyncio-mode=auto ||
- die "Tests failed on ${EPYTHON}"
-}
-
-python_install() {
- distutils-r1_python_install
-
- # 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() {
- distutils-r1_python_install_all
-
- if use examples; then
- dodoc -r examples
- docompress -x /usr/share/doc/${PF}/examples
- fi
-}
-
-pkg_postinst() {
- optfeature "code formatting" dev-python/black
- optfeature "sympyprinting" dev-python/sympy
- optfeature "cythonmagic" dev-python/cython
- optfeature "%lprun magic command" dev-python/line-profiler
- optfeature "%matplotlib magic command" dev-python/matplotlib-inline
-
- if use nbconvert; then
- if ! has_version virtual/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-8.25.0.ebuild b/dev-python/ipython/ipython-8.25.0.ebuild
deleted file mode 100644
index aadbb2c3a170..000000000000
--- a/dev-python/ipython/ipython-8.25.0.ebuild
+++ /dev/null
@@ -1,152 +0,0 @@
-# Copyright 1999-2024 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-DISTUTILS_USE_PEP517=standalone
-PYTHON_COMPAT=( pypy3 python3_{10..12} )
-PYTHON_REQ_USE='readline(+),sqlite,threads(+)'
-
-inherit distutils-r1 optfeature pypi virtualx
-
-DESCRIPTION="Advanced interactive shell for Python"
-HOMEPAGE="
- https://ipython.org/
- https://github.com/ipython/ipython/
- https://pypi.org/project/ipython/
-"
-
-LICENSE="BSD"
-SLOT="0"
-KEYWORDS="~alpha ~amd64 arm arm64 ~hppa ~ia64 ~loong ppc ppc64 ~riscv ~s390 sparc x86 ~arm64-macos ~x64-macos"
-IUSE="examples notebook nbconvert qt5 +smp test"
-RESTRICT="!test? ( test )"
-
-RDEPEND="
- dev-python/decorator[${PYTHON_USEDEP}]
- >=dev-python/jedi-0.16[${PYTHON_USEDEP}]
- dev-python/matplotlib-inline[${PYTHON_USEDEP}]
- >=dev-python/pexpect-4.3[${PYTHON_USEDEP}]
- >=dev-python/prompt-toolkit-3.0.41[${PYTHON_USEDEP}]
- <dev-python/prompt-toolkit-3.1[${PYTHON_USEDEP}]
- >=dev-python/pygments-2.4.0[${PYTHON_USEDEP}]
- dev-python/stack-data[${PYTHON_USEDEP}]
- >=dev-python/traitlets-5.13.0[${PYTHON_USEDEP}]
- $(python_gen_cond_dep '
- dev-python/exceptiongroup[${PYTHON_USEDEP}]
- ' 3.10)
- $(python_gen_cond_dep '
- dev-python/typing-extensions[${PYTHON_USEDEP}]
- ' 3.10 3.11)
-"
-
-BDEPEND="
- dev-python/setuptools[${PYTHON_USEDEP}]
- test? (
- app-text/dvipng[truetype]
- >=dev-python/ipykernel-5.1.0[${PYTHON_USEDEP}]
- >=dev-python/matplotlib-3.9[${PYTHON_USEDEP}]
- dev-python/nbformat[${PYTHON_USEDEP}]
- >=dev-python/numpy-1.23[${PYTHON_USEDEP}]
- dev-python/matplotlib-inline[${PYTHON_USEDEP}]
- dev-python/pickleshare[${PYTHON_USEDEP}]
- dev-python/pytest-asyncio[${PYTHON_USEDEP}]
- dev-python/requests[${PYTHON_USEDEP}]
- dev-python/testpath[${PYTHON_USEDEP}]
- )
-"
-
-distutils_enable_tests pytest
-
-RDEPEND+="
- nbconvert? (
- dev-python/nbconvert[${PYTHON_USEDEP}]
- )
-"
-PDEPEND="
- $(python_gen_cond_dep '
- notebook? (
- dev-python/notebook[${PYTHON_USEDEP}]
- dev-python/ipywidgets[${PYTHON_USEDEP}]
- dev-python/widgetsnbextension[${PYTHON_USEDEP}]
- )
- qt5? ( dev-python/qtconsole[${PYTHON_USEDEP}] )
- ' 'python*')
- smp? (
- >=dev-python/ipykernel-5.1.0[${PYTHON_USEDEP}]
- >=dev-python/ipyparallel-6.2.3[${PYTHON_USEDEP}]
- )
-"
-
-python_prepare_all() {
- # Rename the test directory to reduce sys.path pollution
- # https://github.com/ipython/ipython/issues/12892
- mv IPython/extensions/{,ipython_}tests || die
-
- distutils-r1_python_prepare_all
-}
-
-src_test() {
- virtx distutils-r1_src_test
-}
-
-python_test() {
- local -x IPYTHON_TESTING_TIMEOUT_SCALE=20
- local EPYTEST_DESELECT=(
- # TODO: looks to be a regression due to a newer dep
- IPython/core/tests/test_oinspect.py::test_class_signature
- IPython/core/tests/test_oinspect.py::test_render_signature_long
- IPython/terminal/tests/test_shortcuts.py::test_modify_shortcut_with_filters
- )
-
- case ${EPYTHON} in
- pypy3)
- EPYTEST_DESELECT+=(
- # https://github.com/ipython/ipython/issues/14244
- IPython/lib/tests/test_display.py::TestAudioDataWithoutNumpy
- )
- ;;
- esac
-
- # nonfatal implied by virtx
- local -x PYTEST_DISABLE_PLUGIN_AUTOLOAD=1
- nonfatal epytest -p asyncio --asyncio-mode=auto ||
- die "Tests failed on ${EPYTHON}"
-}
-
-python_install() {
- distutils-r1_python_install
-
- # 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() {
- distutils-r1_python_install_all
-
- if use examples; then
- dodoc -r examples
- docompress -x /usr/share/doc/${PF}/examples
- fi
-}
-
-pkg_postinst() {
- optfeature "code formatting" dev-python/black
- optfeature "sympyprinting" dev-python/sympy
- optfeature "cythonmagic" dev-python/cython
- optfeature "%lprun magic command" dev-python/line-profiler
- optfeature "%matplotlib magic command" dev-python/matplotlib-inline
-
- if use nbconvert; then
- if ! has_version virtual/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
-}
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-python/ipython/, dev-python/ipython/files/
@ 2024-12-20 0:02 Sam James
0 siblings, 0 replies; 7+ messages in thread
From: Sam James @ 2024-12-20 0:02 UTC (permalink / raw
To: gentoo-commits
commit: 404bee8d79dc272a718132e5c138a8be2bab968d
Author: Gabi Falk <gabifalk <AT> gmx <DOT> com>
AuthorDate: Tue Dec 17 19:00:00 2024 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Thu Dec 19 23:58:59 2024 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=404bee8d
dev-python/ipython: Backport upstream fix for python 3.13 regression
The regression was detected by ipython's own testsuite.
This part of the IPython code is expected to break again with python 3.14,
because the curframe_locals attribute was removed in the PR cpython#124369.
However, there are plans to restore this attribute for backward compatibility in
PR cpython#125951 before the CPython 3.14 release.
Url: https://github.com/ipython/ipython/pull/14598
Url: https://github.com/ipython/ipython/commit/c1e945b5bc8fb673109cf32c4f238f6d5e0f5149
Url: https://github.com/python/cpython/pull/124369
Url: https://github.com/python/cpython/pull/125951
Url: https://github.com/ipython/ipython/issues/14620
Closes: https://bugs.gentoo.org/946568
Signed-off-by: Gabi Falk <gabifalk <AT> gmx.com>
Closes: https://github.com/gentoo/gentoo/pull/39746
Signed-off-by: Sam James <sam <AT> gentoo.org>
...n-8.30.0-python3.13-debugger-pdb-curframe.patch | 30 ++++++++++++++++++++++
...thon-8.30.0.ebuild => ipython-8.30.0-r1.ebuild} | 2 ++
2 files changed, 32 insertions(+)
diff --git a/dev-python/ipython/files/ipython-8.30.0-python3.13-debugger-pdb-curframe.patch b/dev-python/ipython/files/ipython-8.30.0-python3.13-debugger-pdb-curframe.patch
new file mode 100644
index 000000000000..8e44fd3d0261
--- /dev/null
+++ b/dev-python/ipython/files/ipython-8.30.0-python3.13-debugger-pdb-curframe.patch
@@ -0,0 +1,30 @@
+FAILED IPython/core/tests/test_run.py::TestMagicRunPass::test_run_debug_twice - AttributeError: 'Pdb' object has no attribute 'curframe'. Did you mean: 'botframe'?
+FAILED IPython/core/tests/test_run.py::TestMagicRunPass::test_run_debug_twice_with_breakpoint - AttributeError: 'Pdb' object has no attribute 'curframe'. Did you mean: 'botframe'?
+https://bugs.gentoo.org/946568
+https://github.com/ipython/ipython/pull/14598
+https://github.com/ipython/ipython/commit/c1e945b5bc8fb673109cf32c4f238f6d5e0f5149.patch
+
+From c1e945b5bc8fb673109cf32c4f238f6d5e0f5149 Mon Sep 17 00:00:00 2001
+From: M Bussonnier <bussonniermatthias@gmail.com>
+Date: Sun, 8 Dec 2024 11:37:11 +0100
+Subject: [PATCH] Fix pdb issues in Python 3.13.1
+
+For some reason it is not always set, it was/is a bug in IPython to not
+check.
+---
+ IPython/core/debugger.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/IPython/core/debugger.py b/IPython/core/debugger.py
+index 1f0d7b2fba..76c42e0230 100644
+--- a/IPython/core/debugger.py
++++ b/IPython/core/debugger.py
+@@ -550,7 +550,7 @@ def _get_frame_locals(self, frame):
+ So if frame is self.current_frame we instead return self.curframe_locals
+
+ """
+- if frame is self.curframe:
++ if frame is getattr(self, "curframe", None):
+ return self.curframe_locals
+ else:
+ return frame.f_locals
diff --git a/dev-python/ipython/ipython-8.30.0.ebuild b/dev-python/ipython/ipython-8.30.0-r1.ebuild
similarity index 98%
rename from dev-python/ipython/ipython-8.30.0.ebuild
rename to dev-python/ipython/ipython-8.30.0-r1.ebuild
index b67d14eb4763..8cae90959a59 100644
--- a/dev-python/ipython/ipython-8.30.0.ebuild
+++ b/dev-python/ipython/ipython-8.30.0-r1.ebuild
@@ -81,6 +81,8 @@ PDEPEND="
)
"
+PATCHES=( "${FILESDIR}"/${P}-python3.13-debugger-pdb-curframe.patch ) # bug #946568
+
python_prepare_all() {
# Rename the test directory to reduce sys.path pollution
# https://github.com/ipython/ipython/issues/12892
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-python/ipython/, dev-python/ipython/files/
@ 2025-01-04 12:29 Michał Górny
0 siblings, 0 replies; 7+ messages in thread
From: Michał Górny @ 2025-01-04 12:29 UTC (permalink / raw
To: gentoo-commits
commit: a8b7e06e512424c94f98d6b9f412446e0dce9809
Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Sat Jan 4 12:27:41 2025 +0000
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Sat Jan 4 12:29:25 2025 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a8b7e06e
dev-python/ipython: Remove old
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
dev-python/ipython/Manifest | 1 -
...n-8.30.0-python3.13-debugger-pdb-curframe.patch | 30 ----
dev-python/ipython/ipython-8.30.0-r1.ebuild | 163 ---------------------
3 files changed, 194 deletions(-)
diff --git a/dev-python/ipython/Manifest b/dev-python/ipython/Manifest
index b8eb5bf2d0c3..4fefdd56602c 100644
--- a/dev-python/ipython/Manifest
+++ b/dev-python/ipython/Manifest
@@ -1,2 +1 @@
-DIST ipython-8.30.0.tar.gz 5592205 BLAKE2B e935305ce08ba287bb811a3efe7ae88821485f726c4c45815f4c39c1a51bb59ab439d256fbb91ddd71d12512fb58c913e4120663d6035b4644da67b3eee9b91c SHA512 36432ed736ce06f47b3ccb6172e6c03a15bfa51a2e38b80d5b579687abad0c03181684b218750f320b185fe3f96baf159eb9c9184c40ddfca78fdd9683233a9b
DIST ipython-8.31.0.tar.gz 5501011 BLAKE2B 0ffc49a663c7a0942fadc4eb98fac945c726a3150f20fe87a68935d660ce280346c270740788b6a5f70291f572d7663ace9dc8a131773176ac89dc7259cafcbe SHA512 b5fe31c54f93a696fcb6474d4bc7ca7c52ad1ce7bdd94971fd9b886b1e134d662524810bd5cc98e621fd3965f65c647cbd2d77d518d001af07a61c4b5a3320cb
diff --git a/dev-python/ipython/files/ipython-8.30.0-python3.13-debugger-pdb-curframe.patch b/dev-python/ipython/files/ipython-8.30.0-python3.13-debugger-pdb-curframe.patch
deleted file mode 100644
index 8e44fd3d0261..000000000000
--- a/dev-python/ipython/files/ipython-8.30.0-python3.13-debugger-pdb-curframe.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-FAILED IPython/core/tests/test_run.py::TestMagicRunPass::test_run_debug_twice - AttributeError: 'Pdb' object has no attribute 'curframe'. Did you mean: 'botframe'?
-FAILED IPython/core/tests/test_run.py::TestMagicRunPass::test_run_debug_twice_with_breakpoint - AttributeError: 'Pdb' object has no attribute 'curframe'. Did you mean: 'botframe'?
-https://bugs.gentoo.org/946568
-https://github.com/ipython/ipython/pull/14598
-https://github.com/ipython/ipython/commit/c1e945b5bc8fb673109cf32c4f238f6d5e0f5149.patch
-
-From c1e945b5bc8fb673109cf32c4f238f6d5e0f5149 Mon Sep 17 00:00:00 2001
-From: M Bussonnier <bussonniermatthias@gmail.com>
-Date: Sun, 8 Dec 2024 11:37:11 +0100
-Subject: [PATCH] Fix pdb issues in Python 3.13.1
-
-For some reason it is not always set, it was/is a bug in IPython to not
-check.
----
- IPython/core/debugger.py | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/IPython/core/debugger.py b/IPython/core/debugger.py
-index 1f0d7b2fba..76c42e0230 100644
---- a/IPython/core/debugger.py
-+++ b/IPython/core/debugger.py
-@@ -550,7 +550,7 @@ def _get_frame_locals(self, frame):
- So if frame is self.current_frame we instead return self.curframe_locals
-
- """
-- if frame is self.curframe:
-+ if frame is getattr(self, "curframe", None):
- return self.curframe_locals
- else:
- return frame.f_locals
diff --git a/dev-python/ipython/ipython-8.30.0-r1.ebuild b/dev-python/ipython/ipython-8.30.0-r1.ebuild
deleted file mode 100644
index 8cae90959a59..000000000000
--- a/dev-python/ipython/ipython-8.30.0-r1.ebuild
+++ /dev/null
@@ -1,163 +0,0 @@
-# Copyright 1999-2024 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-DISTUTILS_USE_PEP517=standalone
-PYTHON_COMPAT=( pypy3 python3_{10..13} )
-PYTHON_REQ_USE='readline(+),sqlite,threads(+)'
-
-inherit distutils-r1 optfeature pypi virtualx
-
-DESCRIPTION="Advanced interactive shell for Python"
-HOMEPAGE="
- https://ipython.org/
- https://github.com/ipython/ipython/
- https://pypi.org/project/ipython/
-"
-
-LICENSE="BSD"
-SLOT="0"
-KEYWORDS="~alpha amd64 arm arm64 hppa ~loong ppc ppc64 ~riscv ~s390 sparc x86 ~arm64-macos ~x64-macos"
-IUSE="examples notebook nbconvert qt5 +smp test"
-RESTRICT="!test? ( test )"
-
-RDEPEND="
- dev-python/decorator[${PYTHON_USEDEP}]
- >=dev-python/jedi-0.16[${PYTHON_USEDEP}]
- dev-python/matplotlib-inline[${PYTHON_USEDEP}]
- >=dev-python/pexpect-4.3[${PYTHON_USEDEP}]
- >=dev-python/prompt-toolkit-3.0.41[${PYTHON_USEDEP}]
- <dev-python/prompt-toolkit-3.1[${PYTHON_USEDEP}]
- >=dev-python/pygments-2.4.0[${PYTHON_USEDEP}]
- dev-python/stack-data[${PYTHON_USEDEP}]
- >=dev-python/traitlets-5.13.0[${PYTHON_USEDEP}]
- $(python_gen_cond_dep '
- dev-python/exceptiongroup[${PYTHON_USEDEP}]
- ' 3.10)
- $(python_gen_cond_dep '
- dev-python/typing-extensions[${PYTHON_USEDEP}]
- ' 3.10 3.11)
-"
-
-BDEPEND="
- dev-python/setuptools[${PYTHON_USEDEP}]
- test? (
- app-text/dvipng[truetype]
- >=dev-python/ipykernel-5.1.0[${PYTHON_USEDEP}]
- >=dev-python/matplotlib-3.9[${PYTHON_USEDEP}]
- dev-python/nbformat[${PYTHON_USEDEP}]
- >=dev-python/numpy-1.23[${PYTHON_USEDEP}]
- dev-python/matplotlib-inline[${PYTHON_USEDEP}]
- dev-python/packaging[${PYTHON_USEDEP}]
- dev-python/pickleshare[${PYTHON_USEDEP}]
- dev-python/pytest-asyncio[${PYTHON_USEDEP}]
- dev-python/requests[${PYTHON_USEDEP}]
- dev-python/testpath[${PYTHON_USEDEP}]
- )
-"
-
-distutils_enable_tests pytest
-
-RDEPEND+="
- nbconvert? (
- dev-python/nbconvert[${PYTHON_USEDEP}]
- )
-"
-PDEPEND="
- $(python_gen_cond_dep '
- qt5? ( dev-python/qtconsole[${PYTHON_USEDEP}] )
- ' 'python*')
- $(python_gen_cond_dep '
- notebook? (
- dev-python/notebook[${PYTHON_USEDEP}]
- dev-python/ipywidgets[${PYTHON_USEDEP}]
- dev-python/widgetsnbextension[${PYTHON_USEDEP}]
- )
- ' 3.{10..12})
- smp? (
- >=dev-python/ipykernel-5.1.0[${PYTHON_USEDEP}]
- >=dev-python/ipyparallel-6.2.3[${PYTHON_USEDEP}]
- )
-"
-
-PATCHES=( "${FILESDIR}"/${P}-python3.13-debugger-pdb-curframe.patch ) # bug #946568
-
-python_prepare_all() {
- # Rename the test directory to reduce sys.path pollution
- # https://github.com/ipython/ipython/issues/12892
- mv IPython/extensions/{,ipython_}tests || die
-
- distutils-r1_python_prepare_all
-}
-
-src_test() {
- virtx distutils-r1_src_test
-}
-
-python_test() {
- local -x IPYTHON_TESTING_TIMEOUT_SCALE=20
- local EPYTEST_DESELECT=(
- # TODO: looks to be a regression due to a newer dep
- IPython/core/tests/test_oinspect.py::test_class_signature
- IPython/core/tests/test_oinspect.py::test_render_signature_long
- IPython/terminal/tests/test_shortcuts.py::test_modify_shortcut_with_filters
- )
-
- case ${EPYTHON} in
- pypy3)
- EPYTEST_DESELECT+=(
- # https://github.com/ipython/ipython/issues/14244
- IPython/lib/tests/test_display.py::TestAudioDataWithoutNumpy
- )
- ;;
- python3.13)
- EPYTEST_DESELECT+=(
- # docstring mismatch?
- IPython/core/tests/test_debugger.py::IPython.core.tests.test_debugger.test_ipdb_magics
- )
- ;;
- esac
-
- # nonfatal implied by virtx
- local -x PYTEST_DISABLE_PLUGIN_AUTOLOAD=1
- nonfatal epytest -p asyncio --asyncio-mode=auto ||
- die "Tests failed on ${EPYTHON}"
-}
-
-python_install() {
- distutils-r1_python_install
-
- # 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() {
- distutils-r1_python_install_all
-
- if use examples; then
- dodoc -r examples
- docompress -x /usr/share/doc/${PF}/examples
- fi
-}
-
-pkg_postinst() {
- optfeature "code formatting" dev-python/black
- optfeature "sympyprinting" dev-python/sympy
- optfeature "cythonmagic" dev-python/cython
- optfeature "%lprun magic command" dev-python/line-profiler
- optfeature "%matplotlib magic command" dev-python/matplotlib-inline
-
- if use nbconvert; then
- if ! has_version virtual/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
-}
^ permalink raw reply related [flat|nested] 7+ messages in thread
end of thread, other threads:[~2025-01-04 12:29 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-06-06 18:51 [gentoo-commits] repo/gentoo:master commit in: dev-python/ipython/, dev-python/ipython/files/ Patrick McLean
-- strict thread matches above, loose matches on Subject: below --
2025-01-04 12:29 Michał Górny
2024-12-20 0:02 Sam James
2024-07-27 9:53 Michał Górny
2015-10-10 15:48 Justin Lecher
2015-09-22 9:25 Justin Lecher
2015-09-17 18:37 Justin Lecher
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox