easyblock = 'Bundle'

name = 'jupyter'
version = '1.0.0'
versionsuffix = '-Python-%(pyver)s'

homepage = 'http://jupyter.org'
description = """JupyterHub is a multiuser version of the Jupyter (IPython) notebook designed
 for centralized deployments in companies, university classrooms and research labs."""

toolchain = {'name': 'foss', 'version': '2019a'}

dependencies = [
    ('Python', '3.7.2'),
    ('ELIC_Python', '1', versionsuffix),
    ('MUMPS', '5.2.1', '-parmetis'),
    ('configurable-http-proxy', '3.1.1', '-nodejs-8.9.4'),
    ('PyZMQ', '18.0.1', '%s-zmq4' % versionsuffix),
]

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

exts_list = [
    ('pamela', '0.3.0', {
        'source_urls': ['https://pypi.python.org/packages/source/p/pamela/'],
        'checksums': [
            '1e198446a6cdd87704aa0def7621d62e7c20b0e6068e2788b9a866a8355e5d6b',  # pamela-0.3.0.tar.gz
        ],
    }),
    ('SQLAlchemy', '1.1.15', {
        'source_urls': ['https://pypi.python.org/packages/source/s/SQLAlchemy/'],
        'checksums': [
            '8b79a5ed91cdcb5abe97b0045664c55c140aec09e5dd5c01303e23de5fe7a95a',  # SQLAlchemy-1.1.15.tar.gz
        ],
    }),
    ('alembic', '0.9.7', {
        'source_urls': ['https://pypi.python.org/packages/source/a/alembic/'],
        'checksums': [
            '46f4849c6dce69f54dd5001b3215b6a983dee6b17512efee10e237fa11f20cfa',  # alembic-0.9.7.tar.gz
        ],
    }),
    ('python-oauth2', '1.0.1', {
        'source_urls': ['https://pypi.python.org/packages/source/p/python-oauth2/'],
        'modulename': 'oauth2',
        'checksums': [
            '5583b5cea3e6cc154800f7a04a061fc7673cb12c75ad9413e607d4472d062d28',  # python-oauth2-1.0.1.tar.gz
        ],
    }),
    ('python-editor', '1.0.3', {
        'source_urls': ['https://pypi.python.org/packages/source/p/python_editor/'],
        'modulename': 'editor',
        'checksums': [
            'a3c066acee22a1c94f63938341d4fb374e3fdd69366ed6603d7b24bed1efc565',  # python-editor-1.0.3.tar.gz
        ],
    }),
    ('async_generator', '1.10', {
        'source_urls': ['https://pypi.python.org/packages/source/a/async_generator/'],
        'modulename': 'async_generator',
    }),
    ('entrypoints', '0.3', {
        'source_urls': ['https://pypi.python.org/packages/source/e/entrypoints/'],
        'modulename': 'entrypoints',
    }),
    ('Jinja2', '2.10.1', {
        'source_urls': ['https://pypi.python.org/packages/source/j/Jinja2/'],
        'modulename': 'jinja2',
    }),
    ('oauthlib', '3.0.1', {
        'source_urls': ['https://pypi.python.org/packages/source/o/oauthlib/'],
        'modulename': 'oauthlib',
    }),
    ('python-dateutil', '2.8.0', {
        'source_urls': ['https://pypi.python.org/packages/source/p/python-dateutil/'],
        'modulename': 'dateutil',
    }),
    ('prometheus_client', '0.7.0', {
        'source_urls': ['https://pypi.python.org/packages/source/p/prometheus_client/'],
        'modulename': 'prometheus_client',
    }),
    ('certipy', '0.1.3', {
        'source_urls': ['https://pypi.python.org/packages/source/c/certipy/'],
        'modulename': 'certipy',
    }),
    ('wheel', '0.33.4', {
        'source_urls': ['https://pypi.python.org/packages/source/w/wheel/'],
        'modulename': 'wheel',
    }),
    ('ipython_genutils', '0.2.0', {
        'modulename': 'ipython_genutils',
        'source_urls': ['https://pypi.python.org/packages/source/i/ipython_genutils/'],
    }),
    ('traitlets', '4.3.2', {
        'modulename': 'traitlets',
        'source_urls': ['https://pypi.python.org/packages/source/t/traitlets/'],
    }),
    ('jupyter_core', '4.4.0', {
        'source_urls': ['https://pypi.python.org/packages/source/j/jupyter_core/'],
    }),
    ('nbformat', '4.4.0', {
        'modulename': 'nbformat',
        'source_urls': ['https://pypi.python.org/packages/source/n/nbformat/'],
    }),
    ('plotly', '3.10.0', {
        'modulename': 'plotly',
        'source_urls': ['https://pypi.python.org/packages/source/p/plotly/'],
    }),
    ('ipython', '7.5.0', {
        'modulename': 'IPython',
        'source_urls': ['https://pypi.python.org/packages/source/i/ipython/'],
    }),
    ('pyzmq', '18.0.1', {
        'source_urls': ['https://pypi.python.org/packages/source/p/pyzmq/'],
        'modulename': 'zmq',
    }),
    #('zmq', '0.0.0', {
    #    'source_urls': ['https://pypi.python.org/packages/source/z/zmq/'],
    #    'modulename': 'zmq',
    #}),
    ('setuptools', '41.0.1', {
        'source_tmpl': '%(name)s-%(version)s.zip',
        'source_urls': ['https://pypi.python.org/packages/source/s/setuptools/'],
        'modulename': 'setuptools',
    }),
    ('tini', '3.0.1', {
        'source_urls': ['https://pypi.python.org/packages/source/t/tini/'],
        'modulename': 'tini',
    }),
    ('sudospawner', '0.5.2', {
        'source_urls': ['https://pypi.python.org/packages/source/s/sudospawner/'],
        'modulename': 'sudospawner',
    }),
    ('Send2Trash', '1.5.0', {
        'source_urls': ['https://pypi.python.org/packages/source/s/Send2Trash/'],
        'modulename': 'send2trash',
    }),
    ('JSAnimation', '0.1', {
        'source_urls': ['https://pypi.python.org/packages/source/j/JSAnimation/'],
        'modulename': 'JSAnimation',
    }),
    ('jupyter_client', '5.2.4', {
        'modulename': 'jupyter_client',
        'source_urls': ['https://pypi.python.org/packages/source/j/jupyter_client/'],
        'use_pip': True,
    }),
    ('ipykernel', '5.1.1', {
        'modulename': 'ipykernel',
        'source_urls': ['https://pypi.python.org/packages/source/i/ipykernel/'],
        'use_pip': True,
    }),
    ('jupyterhub', version, {
        'source_urls': ['https://pypi.python.org/packages/source/j/jupyterhub/'],
        'use_pip': True,
    }),
    ('notebook', '5.7.8', {
        'source_urls': ['https://pypi.python.org/packages/source/n/notebook/'],
        'use_pip': True,
    }),
    ('jupyterlab', '0.35.6', {
        'source_urls': ['https://pypi.python.org/packages/source/j/jupyterlab/'],
        'use_pip': True,
    }),
    ('ipyparallel', '6.2.4', {
        'source_urls': ['https://pypi.python.org/packages/source/i/ipyparallel/'],
        'use_pip': True,
    }),
    ('jupyterhub-ldapauthenticator', '1.2.2', {
        'modulename': 'ldapauthenticator',
        'source_urls': ['https://pypi.python.org/packages/source/j/jupyterhub-ldapauthenticator/'],
        'use_pip': True,
    }),
    ('ipywidgets', '7.4.2', {
        'source_urls': ['https://pypi.python.org/packages/source/i/ipywidgets/'],
        'use_pip': True,
    }),
    ('bash_kernel', '0.7.1', {
        'source_urls': ['https://pypi.python.org/packages/source/b/bash_kernel/'],
        'use_pip': True,
    }),
    ('jupyter-fortran-kernel', '0.1.0', {
        'source_tmpl': 'ZedThree-jupyter-fortran-kernel-%(version)s-0-g557603b.tar.gz',
        'source_urls': ['https://github.com/ZedThree/jupyter-fortran-kernel/tarball/%(version)s'],
        'use_pip': True,
    }),
    ('jupyter_console', '6.0.0', {
        'source_urls': ['https://pypi.python.org/packages/source/j/jupyter_console/'],
        'use_pip': True,
    }),
    ('jupyterlab_server', '0.3.4', {
        'source_urls': ['https://pypi.python.org/packages/source/j/jupyterlab_server/'],
        'use_pip': True,
    }),
    ('widgetsnbextension', '3.4.2', {
        'source_urls': ['https://pypi.python.org/packages/source/w/widgetsnbextension/'],
        'use_pip': True,
    }),
    ('tinyarray', '1.2.1', {
        'source_urls': ['https://pypi.python.org/packages/source/t/tinyarray/'],
        'use_pip': True,
    }),
    ('PyMUMPS', '0.3.2', {
        'source_urls': ['https://pypi.python.org/packages/source/p/pymumps/'],
        'use_pip': True,
    }),
    ('qsymm', '1.2.1', {
        'source_urls': ['https://pypi.python.org/packages/source/q/qsymm/'],
        'use_pip': True,
    }),
    ('PyMUMPS', '1.4', {
        'source_urls': ['https://pypi.python.org/packages/source/s/sympy/'],
        'use_pip': True,
    }),
    ('kwant', '1.4.1', {
        'modulename': 'kwant',
        'source_tmpl': 'v%(version)s.tar.gz',
        'source_urls': ['https://github.com/kwant-project/kwant/archive/'],
    }),
]

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

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

sanity_check_commands = ['jupyterhub --help']

moduleclass = 'tools'
