示例#1
0
文件: setup.py 项目: ANB2/ipython
    needs_setuptools.add('install')

if len(needs_setuptools.intersection(sys.argv)) > 0:
    import setuptools

# This dict is used for passing extra arguments that are setuptools
# specific to setup
setuptools_extra_args = {}

if 'setuptools' in sys.modules:
    # setup.py develop should check for submodules
    from setuptools.command.develop import develop
    setup_args['cmdclass']['develop'] = require_submodules(develop)
    
    setuptools_extra_args['zip_safe'] = False
    setuptools_extra_args['entry_points'] = {'console_scripts':find_entry_points()}
    setup_args['extras_require'] = dict(
        parallel = 'pyzmq>=2.1.11',
        qtconsole = ['pyzmq>=2.1.11', 'pygments'],
        zmq = 'pyzmq>=2.1.11',
        doc = 'Sphinx>=0.3',
        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)
示例#2
0
    install_requires.append('pexpect')

everything = set()
for deps in extras_require.values():
    everything.update(deps)
extras_require['all'] = everything

if 'setuptools' in sys.modules:
    # setup.py develop should check for submodules
    from setuptools.command.develop import develop
    setup_args['cmdclass']['develop'] = require_submodules(develop)
    setup_args['cmdclass']['bdist_wheel'] = css_js_prerelease(get_bdist_wheel())
    
    setuptools_extra_args['zip_safe'] = False
    setuptools_extra_args['entry_points'] = {
        'console_scripts': find_entry_points(),
        'pygments.lexers': [
            'ipythonconsole = IPython.lib.lexers:IPythonConsoleLexer',
            'ipython = IPython.lib.lexers:IPythonLexer',
            'ipython3 = IPython.lib.lexers:IPython3Lexer',
        ],
    }
    setup_args['extras_require'] = extras_require
    requires = setup_args['install_requires'] = install_requires

    # Script to be run by the windows binary installer after the default setup
    # routine, to add shortcuts and similar windows-only things.  Windows
    # post-install scripts MUST reside in the scripts/ dir, otherwise distutils
    # doesn't find them.
    if 'bdist_wininst' in sys.argv:
        if len(sys.argv) > 2 and \
示例#3
0
    if "setuptools" in sys.modules:
        for key in list(extras_require):
            if "platform_python_implementation" in key:
                new_key = key.replace("platform_python_implementation", "python_implementation")
                extras_require[new_key] = extras_require.pop(key)

everything = set()
for key, deps in extras_require.items():
    if ":" not in key:
        everything.update(deps)
extras_require["all"] = everything

if "setuptools" in sys.modules:
    setuptools_extra_args["zip_safe"] = False
    setuptools_extra_args["entry_points"] = {
        "console_scripts": find_entry_points(),
        "pygments.lexers": [
            "ipythonconsole = IPython.lib.lexers:IPythonConsoleLexer",
            "ipython = IPython.lib.lexers:IPythonLexer",
            "ipython3 = IPython.lib.lexers:IPython3Lexer",
        ],
    }
    setup_args["extras_require"] = extras_require
    requires = setup_args["install_requires"] = install_requires

    # Script to be run by the windows binary installer after the default setup
    # routine, to add shortcuts and similar windows-only things.  Windows
    # post-install scripts MUST reside in the scripts/ dir, otherwise distutils
    # doesn't find them.
    if "bdist_wininst" in sys.argv:
        if len(sys.argv) > 2 and ("sdist" in sys.argv or "bdist_rpm" in sys.argv):
示例#4
0
文件: setup.py 项目: pyarnold/ipython
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')

if 'setuptools' in sys.modules:
    # setup.py develop should check for submodules
    from setuptools.command.develop import 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['entry_points'] = {
        'console_scripts': find_entry_points()}
    setup_args['extras_require'] = extras_require
    requires = setup_args['install_requires'] = install_requires

    # Script to be run by the windows binary installer after the default setup
    # routine, to add shortcuts and similar windows-only things.  Windows
    # post-install scripts MUST reside in the scripts/ dir, otherwise distutils
    # doesn't find them.
    if 'bdist_wininst' in sys.argv:
        if len(sys.argv) > 2 and \
                ('sdist' in sys.argv or 'bdist_rpm' in sys.argv):
            print >> sys.stderr, "ERROR: bdist_wininst must be run alone. Exiting."
            sys.exit(1)
        setup_args['data_files'].append(
            ['Scripts', ('scripts/ipython.ico', 'scripts/ipython_nb.ico')])
        setup_args['scripts'] = [
    if 'setuptools' in sys.modules:
        for key in list(extras_require):
            if 'platform_python_implementation' in key:
                new_key = key.replace('platform_python_implementation', 'python_implementation')
                extras_require[new_key] = extras_require.pop(key)

everything = set()
for key, deps in extras_require.items():
    if ':' not in key:
        everything.update(deps)
extras_require['all'] = everything

if 'setuptools' in sys.modules:
    setuptools_extra_args['zip_safe'] = False
    setuptools_extra_args['entry_points'] = {
        'console_scripts': find_entry_points(),
        'pygments.lexers': [
            'ipythonconsole = IPython.lib.lexers:IPythonConsoleLexer',
            'ipython = IPython.lib.lexers:IPythonLexer',
            'ipython3 = IPython.lib.lexers:IPython3Lexer',
        ],
    }
    setup_args['extras_require'] = extras_require
    requires = setup_args['install_requires'] = install_requires

    # Script to be run by the windows binary installer after the default setup
    # routine, to add shortcuts and similar windows-only things.  Windows
    # post-install scripts MUST reside in the scripts/ dir, otherwise distutils
    # doesn't find them.
    if 'bdist_wininst' in sys.argv:
        if len(sys.argv) > 2 and \
示例#6
0
if len(needs_setuptools.intersection(sys.argv)) > 0:
    import setuptools

# This dict is used for passing extra arguments that are setuptools
# specific to setup
setuptools_extra_args = {}

if 'setuptools' in sys.modules:
    # setup.py develop should check for submodules
    from setuptools.command.develop import develop
    setup_args['cmdclass']['develop'] = require_submodules(develop)

    setuptools_extra_args['zip_safe'] = False
    setuptools_extra_args['entry_points'] = {
        'console_scripts': find_entry_points()
    }
    setup_args['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 setup_args['extras_require'].values():
        if not isinstance(deps, list):
            deps = [deps]
        for dep in deps:
            everything.add(dep)
示例#7
0
            if 'platform_python_implementation' in key:
                new_key = key.replace('platform_python_implementation',
                                      'python_implementation')
                extras_require[new_key] = extras_require.pop(key)

everything = set()
for key, deps in extras_require.items():
    if ':' not in key:
        everything.update(deps)
extras_require['all'] = everything

if 'setuptools' in sys.modules:
    setuptools_extra_args['zip_safe'] = False
    setuptools_extra_args['entry_points'] = {
        'console_scripts':
        find_entry_points(),
        'pygments.lexers': [
            'ipythonconsole = IPython.lib.lexers:IPythonConsoleLexer',
            'ipython = IPython.lib.lexers:IPythonLexer',
            'ipython3 = IPython.lib.lexers:IPython3Lexer',
        ],
    }
    setup_args['extras_require'] = extras_require
    requires = setup_args['install_requires'] = install_requires

    # Script to be run by the windows binary installer after the default setup
    # routine, to add shortcuts and similar windows-only things.  Windows
    # post-install scripts MUST reside in the scripts/ dir, otherwise distutils
    # doesn't find them.
    if 'bdist_wininst' in sys.argv:
        if len(sys.argv) > 2 and \
示例#8
0
# add readline
if sys.platform == 'darwin':
    if 'bdist_wheel' in sys.argv[1:] 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:
    # setup.py develop should check for submodules
    from setuptools.command.develop import develop
    setup_args['cmdclass']['develop'] = require_submodules(develop)
    setup_args['cmdclass']['bdist_wheel'] = css_js_prerelease(get_bdist_wheel())
    
    setuptools_extra_args['zip_safe'] = False
    setuptools_extra_args['entry_points'] = {'console_scripts':find_entry_points()}
    setup_args['extras_require'] = extras_require
    requires = setup_args['install_requires'] = install_requires

    # Script to be run by the windows binary installer after the default setup
    # routine, to add shortcuts and similar windows-only things.  Windows
    # post-install scripts MUST reside in the scripts/ dir, otherwise distutils
    # doesn't find them.
    if 'bdist_wininst' in sys.argv:
        if len(sys.argv) > 2 and \
               ('sdist' in sys.argv or 'bdist_rpm' in sys.argv):
            print >> sys.stderr, "ERROR: bdist_wininst must be run alone. Exiting."
            sys.exit(1)
        setup_args['data_files'].append(
            ['Scripts', ('scripts/ipython.ico', 'scripts/ipython_nb.ico')])
        setup_args['scripts'] = [pjoin('scripts','ipython_win_post_install.py')]
示例#9
0
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:
    # setup.py develop should check for submodules
    from setuptools.command.develop import develop

    setup_args["cmdclass"]["develop"] = require_submodules(develop)
    setup_args["cmdclass"]["bdist_wheel"] = css_js_prerelease(get_bdist_wheel())

    setuptools_extra_args["zip_safe"] = False
    setuptools_extra_args["entry_points"] = {"console_scripts": find_entry_points()}
    setup_args["extras_require"] = extras_require
    requires = setup_args["install_requires"] = install_requires

    # Script to be run by the windows binary installer after the default setup
    # routine, to add shortcuts and similar windows-only things.  Windows
    # post-install scripts MUST reside in the scripts/ dir, otherwise distutils
    # doesn't find them.
    if "bdist_wininst" in sys.argv:
        if len(sys.argv) > 2 and ("sdist" in sys.argv or "bdist_rpm" in sys.argv):
            print >>sys.stderr, "ERROR: bdist_wininst must be run alone. Exiting."
            sys.exit(1)
        setup_args["data_files"].append(["Scripts", ("scripts/ipython.ico", "scripts/ipython_nb.ico")])
        setup_args["scripts"] = [pjoin("scripts", "ipython_win_post_install.py")]
        setup_args["options"] = {"bdist_wininst": {"install_script": "ipython_win_post_install.py"}}