python-ipython: update to 4.2.0

This commit is contained in:
Alessio Sergi 2016-04-24 22:48:48 +02:00
parent 11ad1414d1
commit d413551c8c
2 changed files with 66 additions and 4 deletions

View file

@ -0,0 +1,62 @@
https://github.com/ipython/ipython/pull/9417
diff --git IPython/utils/terminal.py IPython/utils/terminal.py
index 9e7be2a..a1f0f73 100644
--- IPython/utils/terminal.py
+++ IPython/utils/terminal.py
@@ -9,22 +9,18 @@ Authors:
* 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 setup.py setup.py
index 6479c51..14b5142 100755
--- setup.py
+++ setup.py
@@ -195,7 +195,6 @@ install_requires = [
'pickleshare',
'simplegeneric>0.8',
'traitlets',
- 'backports.shutil_get_terminal_size',
]
# Platform-specific dependencies:
@@ -203,6 +202,7 @@ install_requires = [
# but requires pip >= 6. pip < 6 ignores these.
extras_require.update({
+ ':python_version == "2.7"': ['backports.shutil_get_terminal_size'],
':sys_platform != "win32"': ['pexpect'],
':sys_platform == "darwin"': ['appnope'],
':sys_platform == "darwin" and platform_python_implementation == "CPython"': ['gnureadline'],

View file

@ -1,6 +1,6 @@
# Template file for 'python-ipython'
pkgname=python-ipython
version=4.1.2
version=4.2.0
revision=1
noarch=yes
wrksrc="ipython-${version}"
@ -8,14 +8,14 @@ build_style=python-module
python_versions="2.7 3.4"
hostmakedepends="python-setuptools python3.4-setuptools"
depends="python-decorator python-pexpect python-pickleshare python-simplegeneric
python-traitlets"
python-traitlets python-backports.shutil_get_terminal_size"
pycompile_module="IPython"
short_desc="Enhanced interactive Python2 shell"
maintainer="Alessio Sergi <al3hex@gmail.com>"
homepage="http://ipython.org/"
license="3-clause-BSD"
distfiles="${PYPI_SITE}/i/ipython/ipython-${version}.tar.gz"
checksum=052f9692a227f285febecec856d749811ac6a20b32c7629b4de31f04ea701692
distfiles="https://pypi.python.org/packages/4e/c7/519b95112dba6f3ae91530bcb8564454c575fcb1fdb323b2b0ee9eff1227/ipython-${version}.tar.gz"
checksum=dba42f182b5f6f26630d2202efd30383712d9f7d8d8d9896b37ae2145deca616
post_install() {
# use decorators of numpy