mirror of
https://github.com/jupyter/notebook.git
synced 2025-01-24 12:05:22 +08:00
Merge pull request #5571 from minrk/readline-deps
add ipython[terminal] dependency group
This commit is contained in:
commit
a9ee746b59
7
setup.py
7
setup.py
@ -271,6 +271,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']
|
||||
)
|
||||
@ -283,12 +284,14 @@ 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'):
|
||||
# Pyreadline has unicode and Python 3 fixes in 2.0
|
||||
install_requires.append('pyreadline>=2.0')
|
||||
extras_require['terminal'].append('pyreadline>=2.0')
|
||||
|
||||
|
||||
if 'setuptools' in sys.modules:
|
||||
# setup.py develop should check for submodules
|
||||
|
17
setupbase.py
17
setupbase.py
@ -8,18 +8,12 @@ This includes:
|
||||
* Functions for finding things like packages, package data, etc.
|
||||
* A function for checking dependencies.
|
||||
"""
|
||||
|
||||
# Copyright (c) IPython Development Team.
|
||||
# Distributed under the terms of the Modified BSD License.
|
||||
|
||||
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.
|
||||
#-------------------------------------------------------------------------------
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
# 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
|
||||
|
Loading…
Reference in New Issue
Block a user