# This file is an EasyBuild reciPY as per https://github.com/hpcugent/easybuild
# Author: Pablo Escobar Lopez
# sciCORE - University of Basel
# SIB Swiss Institute of Bioinformatics 

easyblock = 'Bundle'

name = 'IPython'
version = '4.2.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': '2016a'}

dependencies = [
    ('Python', '2.7.11'),
    ('PyZMQ', '15.2.0', '%s-zmq4' % versionsuffix),
    ('testpath', '0.3', versionsuffix),
]

# this is a bundle of Python packages
exts_defaultclass = 'PythonPackage'
exts_filter = ("python -c 'import %(ext_name)s'", '')

exts_list = [
    ('pysqlite', '2.8.2', {
        'modulename': 'pysqlite2',
        'source_urls': ['https://pypi.python.org/packages/source/p/pysqlite/'],
    }),
    ('requests', '2.10.0', {
        'source_urls': ['https://pypi.python.org/packages/source/r/requests/'],
    }),
    ('nbformat', '4.0.1', {
        'source_urls': ['https://pypi.python.org/packages/source/n/nbformat/'],
    }),
    ('Pygments', '2.1.3', {
        'source_urls': ['https://pypi.python.org/packages/source/P/Pygments/'],
    }),
    ('singledispatch', '3.4.0.3', {
        'source_urls': ['https://pypi.python.org/packages/source/s/singledispatch/'],
    }),
    ('backports.ssl_match_hostname', '3.5.0.1', {
        'source_urls': ['https://pypi.python.org/packages/source/b/backports.ssl_match_hostname/'],
    }),
    ('certifi', '2016.2.28', {
        'source_urls': ['https://pypi.python.org/packages/source/c/certifi/'],
    }),
    ('backports_abc', '0.4', {
        'source_urls': ['https://pypi.python.org/packages/source/b/backports_abc/'],
    }),
    ('tornado', '4.3', {
        'source_urls': ['https://pypi.python.org/packages/source/t/tornado/'],
    }),
    ('MarkupSafe', '0.23', {
        'source_urls': ['https://pypi.io/packages/source/M/MarkupSafe/'],
	'modulename': 'markupsafe',
    }),
    ('Jinja2', '2.8', {
        'source_urls': ['https://pypi.python.org/packages/source/J/Jinja2/'],
    }),
    ('vcversioner', '2.16.0.0', {
        'source_urls': ['https://pypi.python.org/packages/source/v/vcversioner/'],
    }),
    ('jupyter_client', '4.2.2', {
        '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.5.1', {
        'source_urls': ['https://pypi.python.org/packages/source/j/jsonschema/'],
    }),
    ('mistune', '0.7.2', {
        '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/'],
    }),
    ('setuptools_scm', '1.11.0', {
        'source_urls': ['https://pypi.python.org/packages/source/s/setuptools_scm/'],
        'source_tmpl': 'setuptools_scm-%(version)s.tar.gz',
    }),
    ('simplegeneric', '0.8.1', {
        'source_urls': ['https://pypi.python.org/packages/source/s/simplegeneric/'],
        'source_tmpl': 'simplegeneric-%(version)s.zip',
    }),
    ('path.py', '8.1.2', {
        'source_urls': ['https://pypi.python.org/packages/source/p/path.py/'],
        'modulename': 'path',
    }),
    ('ipython_genutils', '0.1.0', {
        'source_urls': ['https://pypi.python.org/packages/source/i/ipython_genutils/'],
    }),
    ('pathlib2', '2.1.0', {
        'source_urls': ['https://pypi.python.org/packages/source/p/pathlib2/'],
    }),
    ('pickleshare', '0.7.2', {
        'source_urls': ['https://pypi.python.org/packages/source/p/pickleshare/'],
    }),
    ('traitlets', '4.2.1', {
        'source_urls': ['https://pypi.python.org/packages/source/t/traitlets/'],
    }),
    ('notebook', '4.2.0', {
        'source_urls': ['https://pypi.python.org/packages/source/n/notebook/'],
    }),
    ('jupyter_core', '4.1.0', {
        'source_urls': ['https://pypi.python.org/packages/source/j/jupyter_core/'],
    }),
    ('ipykernel', '4.3.1', {
        'source_urls': ['https://pypi.python.org/packages/source/i/ipykernel/'],
    }),
    ('pexpect', '4.0.1', {
        'source_urls': ['https://pypi.python.org/packages/source/p/pexpect/'],
    }),
    ('backports.shutil_get_terminal_size', '1.0.0', {
        'source_urls': ['https://pypi.python.org/packages/source/b/backports.shutil_get_terminal_size/'],
    }),
    ('ipython', version, {
        'source_urls': ['https://pypi.python.org/packages/source/i/ipython/'],
        'modulename': 'IPython',
    }),
]

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'
