mirror of
https://github.com/jupyter/notebook.git
synced 2025-01-18 11:55:46 +08:00
always construct requirements
This commit is contained in:
parent
d8ade7980d
commit
4975f2db6b
64
setup.py
64
setup.py
@ -67,6 +67,7 @@ from setupbase import (
|
|||||||
update_submodules,
|
update_submodules,
|
||||||
require_submodules,
|
require_submodules,
|
||||||
UpdateSubmodules,
|
UpdateSubmodules,
|
||||||
|
get_bdist_wheel,
|
||||||
CompileCSS,
|
CompileCSS,
|
||||||
JavascriptVersion,
|
JavascriptVersion,
|
||||||
install_symlinked,
|
install_symlinked,
|
||||||
@ -242,8 +243,8 @@ setup_args['cmdclass'] = {
|
|||||||
# For some commands, use setuptools. Note that we do NOT list install here!
|
# For some commands, use setuptools. Note that we do NOT list install here!
|
||||||
# If you want a setuptools-enhanced install, just run 'setupegg.py install'
|
# If you want a setuptools-enhanced install, just run 'setupegg.py install'
|
||||||
needs_setuptools = set(('develop', 'release', 'bdist_egg', 'bdist_rpm',
|
needs_setuptools = set(('develop', 'release', 'bdist_egg', 'bdist_rpm',
|
||||||
'bdist', 'bdist_dumb', 'bdist_wininst', 'install_egg_info',
|
'bdist', 'bdist_dumb', 'bdist_wininst', 'bdist_wheel',
|
||||||
'egg_info', 'easy_install', 'upload',
|
'egg_info', 'easy_install', 'upload', 'install_egg_info',
|
||||||
))
|
))
|
||||||
if sys.platform == 'win32':
|
if sys.platform == 'win32':
|
||||||
# Depend on setuptools for install on *Windows only*
|
# Depend on setuptools for install on *Windows only*
|
||||||
@ -259,43 +260,42 @@ if len(needs_setuptools.intersection(sys.argv)) > 0:
|
|||||||
# specific to setup
|
# specific to setup
|
||||||
setuptools_extra_args = {}
|
setuptools_extra_args = {}
|
||||||
|
|
||||||
|
# setuptools requirements
|
||||||
|
|
||||||
|
extras_require = dict(
|
||||||
|
parallel = 'pyzmq>=2.1.11',
|
||||||
|
qtconsole = ['pyzmq>=2.1.11', 'pygments'],
|
||||||
|
zmq = 'pyzmq>=2.1.11',
|
||||||
|
doc = ['Sphinx>=1.1', 'numpydoc'],
|
||||||
|
test = 'nose>=0.10.1',
|
||||||
|
notebook = ['tornado>=3.1', 'pyzmq>=2.1.11', 'jinja2'],
|
||||||
|
nbconvert = ['pygments', 'jinja2', 'Sphinx>=0.3']
|
||||||
|
)
|
||||||
|
everything = set()
|
||||||
|
for deps in extras_require.values():
|
||||||
|
if not isinstance(deps, list):
|
||||||
|
deps = [deps]
|
||||||
|
for dep in deps:
|
||||||
|
everything.add(dep)
|
||||||
|
extras_require['all'] = everything
|
||||||
|
install_requires = []
|
||||||
|
if sys.platform == 'darwin':
|
||||||
|
install_requires.append('readline')
|
||||||
|
elif sys.platform.startswith('win'):
|
||||||
|
# Pyreadline has unicode and Python 3 fixes in 2.0
|
||||||
|
install_requires.append('pyreadline>=2.0')
|
||||||
|
|
||||||
|
|
||||||
if 'setuptools' in sys.modules:
|
if 'setuptools' in sys.modules:
|
||||||
# setup.py develop should check for submodules
|
# setup.py develop should check for submodules
|
||||||
from setuptools.command.develop import develop
|
from setuptools.command.develop import develop
|
||||||
setup_args['cmdclass']['develop'] = require_submodules(develop)
|
setup_args['cmdclass']['develop'] = require_submodules(develop)
|
||||||
|
setup_args['cmdclass']['bdist_wheel'] = get_bdist_wheel()
|
||||||
|
|
||||||
setuptools_extra_args['zip_safe'] = False
|
setuptools_extra_args['zip_safe'] = False
|
||||||
setuptools_extra_args['entry_points'] = {'console_scripts':find_entry_points()}
|
setuptools_extra_args['entry_points'] = {'console_scripts':find_entry_points()}
|
||||||
setup_args['extras_require'] = dict(
|
setup_args['extras_require'] = extras_require
|
||||||
parallel = 'pyzmq>=2.1.11',
|
requires = setup_args['install_requires'] = install_requires
|
||||||
qtconsole = ['pyzmq>=2.1.11', 'pygments'],
|
|
||||||
zmq = 'pyzmq>=2.1.11',
|
|
||||||
doc = ['Sphinx>=1.1', 'numpydoc'],
|
|
||||||
test = 'nose>=0.10.1',
|
|
||||||
notebook = ['tornado>=3.1', 'pyzmq>=2.1.11', 'jinja2'],
|
|
||||||
nbconvert = ['pygments', 'jinja2', 'Sphinx>=0.3']
|
|
||||||
)
|
|
||||||
everything = set()
|
|
||||||
for deps in setup_args['extras_require'].values():
|
|
||||||
if not isinstance(deps, list):
|
|
||||||
deps = [deps]
|
|
||||||
for dep in deps:
|
|
||||||
everything.add(dep)
|
|
||||||
setup_args['extras_require']['all'] = everything
|
|
||||||
|
|
||||||
requires = setup_args.setdefault('install_requires', [])
|
|
||||||
setupext.display_status = False
|
|
||||||
if not setupext.check_for_readline():
|
|
||||||
if sys.platform == 'darwin':
|
|
||||||
requires.append('readline')
|
|
||||||
elif sys.platform.startswith('win'):
|
|
||||||
# Pyreadline 64 bit windows issue solved in versions >=1.7.1
|
|
||||||
# Also solves issues with some older versions of pyreadline that
|
|
||||||
# satisfy the unconstrained depdendency.
|
|
||||||
requires.append('pyreadline>=1.7.1')
|
|
||||||
else:
|
|
||||||
pass
|
|
||||||
# do we want to install readline here?
|
|
||||||
|
|
||||||
# Script to be run by the windows binary installer after the default setup
|
# Script to be run by the windows binary installer after the default setup
|
||||||
# routine, to add shortcuts and similar windows-only things. Windows
|
# routine, to add shortcuts and similar windows-only things. Windows
|
||||||
|
Loading…
Reference in New Issue
Block a user