easyblock = 'Bundle'

name = 'IPython'
version = '4.0.0'
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': '2015a'}

dependencies = [
    ('Python', '2.7.10'),
    ('testpath', '0.2', versionsuffix),
]

# this is a bundle of Python packages
# override extensions sanity check for IPython, importing a Python module doesn't work there
exts_defaultclass = 'PythonPackage'
exts_filter = ("python -c 'import %(ext_name)s'", '')

exts_list = [
    ('traitlets', '4.0.0', {
        'source_urls': ['https://pypi.python.org/packages/source/t/traitlets/'],
    }),
    ('ipython_genutils', '0.1.0', {
        'source_urls': ['https://pypi.python.org/packages/source/i/ipython_genutils/'],
    }),
    ('pexpect', '3.3', {
        'source_urls': ['https://pypi.python.org/packages/source/p/pexpect/'],
    }),
    ('path.py', '7.6', {
        'source_urls': ['https://pypi.python.org/packages/source/p/path.py/'],
        'modulename': 'path',
    }),
    ('pickleshare', '0.5', {
        'source_urls': ['https://pypi.python.org/packages/source/p/pickleshare/'],
    }),
    ('simplegeneric', '0.8.1', {
        'source_urls': ['https://pypi.python.org/packages/source/s/simplegeneric/'],
        'source_tmpl': '%(name)s-%(version)s.zip',
    }),
    ('requests', '2.7.0', {
        'source_urls': ['https://pypi.python.org/packages/source/r/requests/'],
    }),
    ('ipython', version, {
        'source_urls': ['https://pypi.python.org/packages/source/i/ipython/'],
        'modulename': 'IPython',
    }),
]

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

# specify that Bundle easyblock should run a full sanity check, rather than just trying to load the module
full_sanity_check = True

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

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

moduleclass = 'tools'
