From 05238bc5e56e3a36be217a38bf36e7e55c589b41 2014-04-21 18:42:03 From: MinRK Date: 2014-04-21 18:42:03 Subject: [PATCH] add ipython[terminal] dependency group for pyreadline on Windows. gnureadline is still a dependency on OS X pyreadline will *not* be installed by default anymore. There will no longer be any checks for dependencies in entry points. --- diff --git a/setup.py b/setup.py index fba2a8b..abff61d 100755 --- a/setup.py +++ b/setup.py @@ -270,6 +270,7 @@ extras_require = dict( zmq = ['pyzmq>=2.1.11'], doc = ['Sphinx>=1.1', 'numpydoc'], test = ['nose>=0.10.1'], + terminal = [], notebook = ['tornado>=3.1', 'pyzmq>=2.1.11', 'jinja2'], nbconvert = ['pygments', 'jinja2', 'Sphinx>=0.3'] ) @@ -282,9 +283,13 @@ for deps in extras_require.values(): extras_require['all'] = everything install_requires = [] + +# add readline if sys.platform == 'darwin': if any(arg.startswith('bdist') for arg in sys.argv) or not setupext.check_for_readline(): install_requires.append('gnureadline') +elif sys.platform.startswith('win'): + extras_require['terminal'].append('pyreadline>=2.0') if 'setuptools' in sys.modules: diff --git a/setupbase.py b/setupbase.py index 9120369..7423aff 100644 --- a/setupbase.py +++ b/setupbase.py @@ -8,18 +8,12 @@ This includes: * Functions for finding things like packages, package data, etc. * A function for checking dependencies. """ -from __future__ import print_function -#------------------------------------------------------------------------------- -# Copyright (C) 2008 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. -#------------------------------------------------------------------------------- +# Copyright (c) IPython Development Team. +# Distributed under the terms of the Modified BSD License. + +from __future__ import print_function -#------------------------------------------------------------------------------- -# Imports -#------------------------------------------------------------------------------- import errno import os import sys @@ -647,7 +641,8 @@ def get_bdist_wheel(): for pkg in ("gnureadline", "pyreadline", "mock"): _remove_startswith(requires, pkg) requires.append("gnureadline; sys.platform == 'darwin' and platform.python_implementation == 'CPython'") - requires.append("pyreadline (>=2.0); sys.platform == 'win32' and platform.python_implementation == 'CPython'") + requires.append("pyreadline (>=2.0); extra == 'terminal' and sys.platform == 'win32' and platform.python_implementation == 'CPython'") + requires.append("pyreadline (>=2.0); extra == 'all' and sys.platform == 'win32' and platform.python_implementation == 'CPython'") requires.append("mock; extra == 'test' and python_version < '3.3'") for r in requires: pkg_info['Requires-Dist'] = r