easyblock = 'Bundle'

name = 'IPython'
version = '5.2.2'
versionsuffix = '-Python-%(pyver)s'

homepage = 'http://ipython.org/index.html'
description = """IPython provides a rich architecture for interactive computing with:
 Powerful interactive shells (terminal and Qt-based).
 A browser-based notebook with support for code, text, mathematical expressions, inline plots and other rich media.
 Support for interactive data visualization and use of GUI toolkits.
 Flexible, embeddable interpreters to load into your own projects.
 Easy to use, high performance tools for parallel computing."""

toolchain = {'name': 'intel', 'version': '2016b'}

dependencies = [
    ('Python', '2.7.12'),
    ('PyZMQ', '16.0.2', '%s-zmq4' % versionsuffix),
    ('testpath', '0.3', versionsuffix),
    ('entrypoints', '0.2.2', versionsuffix),
    ('path.py', '10.1', versionsuffix),
    ('prompt-toolkit', '1.0.13', versionsuffix),
]

# this is a bundle of Python packages
# XXX: the wheel packages (testpath, entrypoints, path.py, prompt-toolkit) have
# to be included as dependencies because bundling wheels does not work
exts_defaultclass = 'PythonPackage'
exts_filter = ("python -c 'import %(ext_name)s'", '')

exts_list = [
    ('nose', '1.3.7', {
        'source_urls': ['https://pypi.python.org/packages/source/n/nose/'],
    }),
    ('requests', '2.13.0', {
        'source_urls': ['https://pypi.python.org/packages/source/r/requests/'],
    }),
    ('nbformat', '4.3.0', {
        'source_urls': ['https://pypi.python.org/packages/source/n/nbformat/'],
    }),
    ('Pygments', '2.2.0', {
        'source_urls': ['https://pypi.python.org/packages/source/P/Pygments/'],
        'modulename': 'pygments',
    }),
    ('singledispatch', '3.4.0.3', {
        'source_urls': ['https://pypi.python.org/packages/source/s/singledispatch/'],
    }),
    ('certifi', '2017.1.23', {
        'source_urls': ['https://pypi.python.org/packages/source/c/certifi/'],
    }),
    ('backports_abc', '0.5', {
        'source_urls': ['https://pypi.python.org/packages/source/b/backports_abc/'],
    }),
    ('tornado', '4.4.2', {
        'source_urls': ['https://pypi.python.org/packages/source/t/tornado/'],
    }),
    ('MarkupSafe', '0.23', {
        'source_urls': ['https://pypi.python.org/packages/source/M/MarkupSafe/'],
        'modulename': 'markupsafe',
    }),
    ('Jinja2', '2.9.5', {
        'source_urls': ['https://pypi.python.org/packages/source/J/Jinja2/'],
        'modulename': 'jinja2',
    }),
    ('jupyter_client', '5.0.0', {
        'source_urls': ['https://pypi.python.org/packages/source/j/jupyter_client/'],
    }),
    ('functools32', '3.2.3-2', {
        'source_urls': ['https://pypi.python.org/packages/source/f/functools32/'],
    }),
    ('jsonschema', '2.6.0', {
        'source_urls': ['https://pypi.python.org/packages/source/j/jsonschema/'],
    }),
    ('mistune', '0.7.3', {
        'source_urls': ['https://pypi.python.org/packages/source/m/mistune/'],
    }),
    ('ptyprocess', '0.5.1', {
        'source_urls': ['https://pypi.python.org/packages/source/p/ptyprocess/'],
    }),
    ('terminado', '0.6', {
        'source_urls': ['https://pypi.python.org/packages/source/t/terminado/'],
    }),
    ('simplegeneric', '0.8.1', {
        'source_urls': ['https://pypi.python.org/packages/source/s/simplegeneric/'],
        'source_tmpl': 'simplegeneric-%(version)s.zip',
    }),
    ('ipython_genutils', '0.1.0', {
        'source_urls': ['https://pypi.python.org/packages/source/i/ipython_genutils/'],
    }),
    ('pathlib2', '2.2.1', {
        'source_urls': ['https://pypi.python.org/packages/source/p/pathlib2/'],
    }),
    ('pickleshare', '0.7.4', {
        'source_urls': ['https://pypi.python.org/packages/source/p/pickleshare/'],
    }),
    ('traitlets', '4.3.1', {
        'source_urls': ['https://pypi.python.org/packages/source/t/traitlets/'],
    }),
    ('notebook', '4.4.1', {
        'source_urls': ['https://pypi.python.org/packages/source/n/notebook/'],
    }),
    ('jupyter_core', '4.3.0', {
        'source_urls': ['https://pypi.python.org/packages/source/j/jupyter_core/'],
    }),
    ('ipykernel', '4.5.2', {
        'source_urls': ['https://pypi.python.org/packages/source/i/ipykernel/'],
    }),
    ('pexpect', '4.2.1', {
        'source_urls': ['https://pypi.python.org/packages/source/p/pexpect/'],
    }),
    ('pandocfilters', '1.4.1', {
        'source_urls': ['https://pypi.python.org/packages/source/p/pandocfilters/'],
    }),
    ('nbconvert', '5.1.1', {
        'source_urls': ['https://pypi.python.org/packages/source/n/nbconvert/'],
        'use_pip': True,
    }),
    ('backports.shutil_get_terminal_size', '1.0.0', {
        'source_urls': ['https://pypi.python.org/packages/source/b/backports.shutil_get_terminal_size/'],
    }),
    ('decorator', '4.0.11', {
        'source_urls': ['https://pypi.python.org/packages/source/d/decorator/'],
    }),
    ('ipython', version, {
        'source_urls': ['https://pypi.python.org/packages/source/i/ipython/'],
        'modulename': 'IPython',
    }),
    ('ipywidgets', '5.2.2', {
        'source_urls': ['https://pypi.python.org/packages/source/i/ipywidgets/'],
    }),
    ('widgetsnbextension', '1.2.6', {
        'source_urls': ['https://pypi.python.org/packages/source/w/widgetsnbextension/'],
    }),
]

modextrapaths = {'PYTHONPATH': ['lib/python%(pyshortver)s/site-packages']}

sanity_check_paths = {
    'files': ['bin/ipython'],
    'dirs': ['lib/python%(pyshortver)s/site-packages/IPython'],
}

sanity_check_commands = [
    ('ipython -h', ''),
    ('ipython notebook --help', ''),
    ('iptest', ''),
    ('iptest2', ''),
]

moduleclass = 'tools'
