From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 0A59813829C for ; Mon, 6 Jun 2016 18:51:55 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 21921254028; Mon, 6 Jun 2016 18:51:52 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 87AD4254028 for ; Mon, 6 Jun 2016 18:51:51 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 5FAEF340B10 for ; Mon, 6 Jun 2016 18:51:49 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 2D394975 for ; Mon, 6 Jun 2016 18:51:46 +0000 (UTC) From: "Patrick McLean" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Patrick McLean" Message-ID: <1465239097.dbb770ac32710490c529dffe6fc43b6df931798f.chutzpah@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: dev-python/ipython/, dev-python/ipython/files/ X-VCS-Repository: repo/gentoo X-VCS-Files: dev-python/ipython/files/ipython-4.2.0-only-use-backports-shutil-on-python2.patch dev-python/ipython/ipython-4.2.0-r1.ebuild X-VCS-Directories: dev-python/ipython/ dev-python/ipython/files/ X-VCS-Committer: chutzpah X-VCS-Committer-Name: Patrick McLean X-VCS-Revision: dbb770ac32710490c529dffe6fc43b6df931798f X-VCS-Branch: master Date: Mon, 6 Jun 2016 18:51:46 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 46875ad0-7518-4325-a441-e323b1b801c6 X-Archives-Hash: 0f8e8356ed2ca4ea6f5a848bc24f000a commit: dbb770ac32710490c529dffe6fc43b6df931798f Author: Patrick McLean gentoo org> AuthorDate: Mon Jun 6 18:50:03 2016 +0000 Commit: Patrick McLean gentoo 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/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 +}