easyblock = 'Bundle'

name = 'Spyder'
version = '3.1.4'
versionsuffix = '-Python-%(pyver)s'

homepage = 'https://github.com/spyder-ide/spyder'
description = """Spyder is an interactive Python development environment providing MATLAB-like features in a simple
 and light-weighted software."""

toolchain = {'name': 'intel', 'version': '2017a'}

dependencies = [
    ('Python', '2.7.13'),
    ('PyQt5', '5.8.2', versionsuffix),
    ('PyZMQ', '16.0.2', versionsuffix + '-zmq4'),
]

exts_defaultclass = 'PythonPackage'
exts_filter = ("python -c 'import %(ext_name)s'", '')

exts_list = [
    ('qtconsole', '4.3.0', {
        'source_urls': ['https://pypi.python.org/packages/source/q/qtconsole'],
    }),
    ('rope', '0.10.5', {
        'source_urls': ['https://pypi.python.org/packages/source/r/rope'],
    }),
    ('jedi', '0.10.2', {
        'source_urls': ['https://pypi.python.org/packages/source/j/jedi'],
    }),
    ('pyflakes', '1.5.0', {
        'source_urls': ['https://pypi.python.org/packages/source/p/pyflakes'],
    }),
    ('Sphinx', '1.6.1', {
        'source_urls': ['https://pypi.python.org/packages/source/s/Sphinx'],
    }),
    ('Pygments', '2.2.0', {
        'source_urls': ['https://pypi.python.org/packages/source/P/Pygments'],
    }),
    ('pylint', '1.7.1', {
        'source_urls': ['https://pypi.python.org/packages/source/p/pylint'],
    }),
    ('pep8', '1.7.0', {
        'source_urls': ['https://pypi.python.org/packages/source/p/pep8'],
    }),
    ('psutil', '5.2.2', {
        'source_urls': ['https://pypi.python.org/packages/source/p/psutil'],
    }),
    ('ipython_genutils', '0.2.0', {
        'source_urls': ['https://pypi.python.org/packages/source/i/ipython_genutils/'],
    }),
    ('traitlets', '4.3.2', {
        'source_urls': ['https://pypi.python.org/packages/source/t/traitlets/'],
    }),
    ('jsonschema', '2.6.0', {
        'source_urls': ['https://pypi.python.org/packages/source/j/jsonschema/'],
    }),
    ('nbformat', '4.3.0', {
        'source_urls': ['https://pypi.python.org/packages/source/n/nbformat/'],
    }),
    ('configparser', '3.5.0', {
        'source_urls': ['https://pypi.python.org/packages/source/c/configparser/'],
        'patches': ['configparser-3.5.0_no-backports-namespace.patch'],
        'use_pip': True,
    }),
    ('entrypoints', '0.2.2', {
        'source_urls': ['https://pypi.python.org/packages/source/e/entrypoints/'],
        'source_tmpl': 'entrypoints-%(version)s-py2.py3-none-any.whl',
        'unpack_sources': False,
        'use_pip': True,
    }),
    ('pandocfilters', '1.4.1', {
        'source_urls': ['https://pypi.python.org/packages/source/p/pandocfilters/'],
    }),
    ('testpath', '0.3', {
        'source_urls': ['https://pypi.python.org/packages/py2.py3/t/testpath/'],
        'source_tmpl': 'testpath-%(version)s-py2.py3-none-any.whl',
        'unpack_sources': False,
        'use_pip': True,
    }),
    ('nbconvert', '5.1.1', {
        'source_urls': ['https://pypi.python.org/packages/source/n/nbconvert'],
        'use_pip': True,
    }),
    ('QtAwesome', '0.4.4', {
        'source_urls': ['https://pypi.python.org/packages/source/Q/QtAwesome'],
        'prebuildopts': "rm -r qtawesome/tests/__pycache__ && ",
    }),
    ('pickleshare', '0.7.4', {
        'source_urls': ['https://pypi.python.org/packages/source/p/pickleshare'],
    }),
    ('QtPy', '1.2.1', {
        'source_urls': ['https://pypi.python.org/packages/source/Q/QtPy'],
    }),
    ('chardet', '3.0.3', {
        'source_urls': ['https://pypi.python.org/packages/source/c/chardet'],
    }),
    ('numpydoc', '0.6.0', {
        'source_urls': ['https://pypi.python.org/packages/source/n/numpydoc'],
    }),
    (name.lower(), version, {
        'source_urls': ['https://pypi.python.org/packages/source/s/spyder'],
    }),
]

# 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/spyder'],
    'dirs': ['lib/python%(pyshortver)s/site-packages'],
}

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

moduleclass = 'tools'
