summaryrefslogtreecommitdiff
path: root/dev-python/ipython/files
diff options
context:
space:
mode:
authorPatrick McLean <chutzpah@gentoo.org>2016-06-06 11:50:03 -0700
committerPatrick McLean <chutzpah@gentoo.org>2016-06-06 11:51:37 -0700
commitdbb770ac32710490c529dffe6fc43b6df931798f (patch)
treed0f7e6f97db3b76c029b259720b8ff24d9ab4ca0 /dev-python/ipython/files
parentb16468d2e4bf6763477d6063f0345a49ac3ecd55 (diff)
downloadgentoo-dbb770ac32710490c529dffe6fc43b6df931798f.tar.gz
gentoo-dbb770ac32710490c529dffe6fc43b6df931798f.tar.bz2
gentoo-dbb770ac32710490c529dffe6fc43b6df931798f.zip
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
Diffstat (limited to 'dev-python/ipython/files')
-rw-r--r--dev-python/ipython/files/ipython-4.2.0-only-use-backports-shutil-on-python2.patch40
1 files changed, 40 insertions, 0 deletions
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 000000000000..ba17f0fbcadb
--- /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))