Example #1
0
         '*.js'),
        ('share/jupyter/nbextensions/jupyter-threejs',
         name + '/static',
         '*.js.map'),
        ('share/jupyter/lab/extensions',
         'js/lab-dist',
         'jupyter-threejs-*.tgz'),
        ('etc/jupyter/nbconfig',
         'jupyter-config',
         '**/*.json'),
    ],
)
cmdclass['js'] = combine_commands(
    install_npm(
        path=os.path.join(here, 'js'),
        build_dir=os.path.join(here, name, 'static'),
        source_dir=os.path.join(here, 'js'),
        build_cmd='build:all'
    ),
    ensure_targets([
        name + '/static/extension.js',
        name + '/static/index.js',
        'js/src/core/BufferAttribute.autogen.js',
        name + '/core/BufferAttribute_autogen.py',
        'docs/source/_static/jupyter-threejs.js',
    ]),
)

setup_args = {
    'name': name,
    'version': version,
    'description': 'Interactive 3d graphics for the Jupyter notebook, using Three.js from Jupyter interactive widgets.',
Example #2
0
package_data_spec = {
    name: ['nbextension/static/*.js*', 'labextension/*.tgz', 'server/*.html']
}

data_files_spec = [('share/jupyter/nbextensions/algorithmx-jupyter', nb_path,
                    '*.js*'),
                   ('share/jupyter/lab/extensions', lab_path, '*.tgz'),
                   ('etc/jupyter/nbconfig/notebook.d', HERE,
                    'algorithmx-jupyter -config.json')]

cmdclass = create_cmdclass('js' if js_exists else None,
                           package_data_spec=package_data_spec,
                           data_files_spec=data_files_spec)
cmdclass['js'] = combine_commands(
    install_npm(path=js_path,
                build_dir=nb_path,
                source_dir=js_path,
                build_cmd='build'), ensure_targets(jstargets))

setup_args = dict(
    name=name,
    description='A library for network visualization and algorithm simulation.',
    version=version,
    scripts=glob(pjoin('scripts', '*')),
    cmdclass=cmdclass,
    packages=find_packages(),
    author='Alex Socha',
    author_email='*****@*****.**',
    long_description=long_description,
    long_description_content_type='text/markdown',
    url='https://github.com/algrx/algorithmx-python',
    license='MIT',
Example #3
0
    'graph_notebook_widgets': [
        'nbextension/static/*.*js*',
        'labextension/*.tgz'
    ]
}

data_files_spec = [
    ('share/jupyter/nbextensions/graph_notebook_widgets',
     nb_path, '*.js*'),
    ('share/jupyter/lab/extensions', lab_path, '*.tgz'),
    ('etc/jupyter/nbconfig/notebook.d', HERE, 'graph_notebook_widgets.json')
]

cmd_class = create_cmdclass('jsdeps', package_data_spec=package_data_spec, data_files_spec=data_files_spec)
cmd_class['jsdeps'] = combine_commands(
    install_npm(widgets_root, build_cmd='build:all'),
    ensure_targets(js_targets),
)


def get_version():
    with open('src/graph_notebook/__init__.py') as f:
        for line in f:
            if line.startswith('__version__'):
                _, _, version = line.replace("'", '').split()
                break
    if version == '':
        raise ValueError('no version found')
    return version

Example #4
0
]

package_data_spec = {name: ["*"]}

data_files_spec = [
    ("share/jupyter/lab/extensions", lab_path, "*.tgz"),
    ("etc/jupyter/jupyter_notebook_config.d", "jupyter-config",
     "jupyterlab-snippets.json"),
]

cmdclass = create_cmdclass("jsdeps",
                           package_data_spec=package_data_spec,
                           data_files_spec=data_files_spec)

cmdclass["jsdeps"] = combine_commands(
    install_npm(HERE, build_cmd="build:all", npm=["jlpm"]),
    ensure_targets(jstargets),
)

with open("README.md", "r") as fh:
    long_description = fh.read()

setup_args = dict(
    name=name,
    version=version,
    url="https://github.com/QuantStack/jupyterlab-snippets",
    author="QuantStack",
    description="Code Snippets Extension for JupyterLab",
    long_description=long_description,
    long_description_content_type="text/markdown",
    cmdclass=cmdclass,
package_data_spec = {
    name: [
        'static/*.*js*',
    ]
}

data_files_spec = [('share/jupyter/nbextensions/' + name, nb_path, '*.js*'),
                   ('etc/jupyter', pjoin(HERE, 'jupyter-config'), '**/*.json')]

cmdclass = create_cmdclass('js',
                           package_data_spec=package_data_spec,
                           data_files_spec=data_files_spec)
cmdclass['js'] = combine_commands(
    install_npm(
        path=pjoin(HERE, 'js'),
        build_cmd='build:all',
        build_dir=nb_path,
        source_dir=pjoin(HERE, 'js'),
    ),
    ensure_targets(targets),
)

setup_args = {
    'name':
    name,
    'version':
    version,
    'description':
    'Jupyter Widget for Volume Rendering of Unstructured Tetrahedral Mesh Data',
    'long_description':
    LONG_DESCRIPTION,
    'include_package_data':
Example #6
0
]

package_data_spec = {name: ["*"]}

data_files_spec = [
    ("share/jupyter/lab/extensions", lab_path, "*.tgz"),
    (
        "etc/jupyter/jupyter_notebook_config.d",
        "jupyter-config/jupyter_notebook_config.d",
        "jupyter_archive.json",
    ),
]

cmdclass = create_cmdclass("jsdeps", package_data_spec=package_data_spec, data_files_spec=data_files_spec)

cmdclass["jsdeps"] = combine_commands(install_npm(HERE, build_cmd="build:all"), ensure_targets(jstargets),)

setup(
    name=name.replace("_", "-"),
    version=version,
    author="Hadrien Mary",
    author_email="*****@*****.**",
    url="https://github.com/hadim/jupyter-archive/",
    description="A Jupyter/Jupyterlab extension to make, download and extract archive files.",
    long_description_content_type="text/markdown",
    cmdclass=cmdclass,
    packages=find_packages(),
    classifiers=[
        "Development Status :: 5 - Production/Stable",
        "Intended Audience :: Developers",
        "Natural Language :: English",
Example #7
0
        'webapp/templates/*.*',
        'webapp/testnotebooks/*.*',
        'notebook_ext/*.*',
    ]
}

data_spec = [
    ('share/jupyter/nbextensions/nbdime', name + '/notebook_ext', '*.js'),
    ('share/jupyter/lab/extensions', 'packages/labextension/dist',
     'nbdime-jupyterlab-*.tgz'),
    ('etc/jupyter', 'jupyter-config', '**/*.json'),
]

cmdclass = create_cmdclass('js', data_files_spec=data_spec)
cmdclass['js'] = combine_commands(
    install_npm(here, build_targets=jstargets, sources=packages_dir),
    ensure_targets(jstargets),
)

setup_args = dict(
    name=name,
    description="Diff and merge of Jupyter Notebooks",
    version=version,
    scripts=glob(pjoin('scripts', '*')),
    cmdclass=cmdclass,
    packages=find_packages(here),
    package_data=package_data,
    author='Jupyter Development Team',
    author_email='*****@*****.**',
    url='http://jupyter.org',
    license='BSD',
        ("share/jupyter/labextensions/jupyter-threejs", str(HERE),
         "install.json"),
        # Support JupyterLab 2.x
        ('share/jupyter/lab/extensions', str(js_path / 'lab-dist'),
         'jupyter-threejs-*.tgz'),
        # Support Jupyter Notebook
        ('etc/jupyter/nbconfig', str(HERE / 'jupyter-config'), '**/*.json'),
        ('share/jupyter/nbextensions/jupyter-threejs', str(py_path / 'static'),
         '**/*.js'),
        ('share/jupyter/nbextensions/jupyter-threejs', str(py_path / 'static'),
         '**/*.js.map')
    ],
)
cmdclass['js'] = combine_commands(
    install_npm(path=str(js_path),
                build_dir=str(py_path / 'static'),
                source_dir=str(js_path),
                build_cmd='build:all'),
    ensure_targets([
        str(py_path / 'static' / 'extension.js'),
        str(py_path / 'static' / 'index.js'),
        str(js_path / 'src' / 'core' / 'BufferAttribute.autogen.js'),
        str(py_path / 'core' / 'BufferAttribute_autogen.py'),
    ]),
)

setup_args = {
    'name':
    name,
    'version':
    version,
    'description':
Example #9
0
here = os.path.abspath(os.path.dirname(__file__))
nbextension = pjoin(here, name, 'nbextension')
labextension = pjoin(here, name, 'labextension')

# Representative files that should exist after a successful build
jstargets = [
    pjoin(nbextension, 'extension.js'),
    pjoin(here, 'lib', 'lab_extension.js'),
]

version_ns = {}
with io.open(pjoin(here, name, '_version.py'), encoding='utf8') as f:
    exec(f.read(), {}, version_ns)

cmdclass = create_cmdclass(('jsdeps', ))
cmdclass['jsdeps'] = combine_commands(install_npm(here, build_cmd='build:all'),
                                      ensure_targets(jstargets))

package_data = {name: ['nbextension/*.*js*', 'labextension/*.tgz']}

data_files = expand_data_files([('share/jupyter/nbextensions/jupyter_francy',
                                 [pjoin(nbextension, '*.js*')]),
                                ('share/jupyter/lab/extensions',
                                 [pjoin(labextension, '*.tgz')])])

setup_args = dict(
    name=name,
    version=version_ns['__version__'],
    scripts=glob(pjoin('scripts', '*')),
    cmdclass=cmdclass,
    packages=find_packages(here),
Example #10
0
]

package_data_spec = {name: ['*']}

data_files_spec = [
    ('share/jupyter/lab/extensions', lab_path, '*.tgz'),
    ('etc/jupyter/jupyter_notebook_config.d',
     'jupyter-config/jupyter_notebook_config.d', 'jupyterlab_git.json'),
]

cmdclass = create_cmdclass('jsdeps',
                           package_data_spec=package_data_spec,
                           data_files_spec=data_files_spec)

cmdclass['jsdeps'] = combine_commands(
    install_npm(HERE, build_cmd='build:all', npm='jlpm'),
    ensure_targets(jstargets),
)

with open("README.md", "r") as fh:
    long_description = fh.read()

setup_args = dict(
    name=name,
    description="A server extension for JupyterLab's git extension",
    long_description=long_description,
    long_description_content_type="text/markdown",
    version=version,
    cmdclass=cmdclass,
    packages=setuptools.find_packages(),
    author='Jupyter Development Team',
Example #11
0
from setuptools import setup, find_packages
from setupbase import create_cmdclass, install_npm

root = os.path.abspath(os.path.dirname(__file__))

js_path = os.path.join(root, 'js')
nb_path = os.path.join(root, 'jupyter_jsmol', 'nbextension', 'static')
lab_path = os.path.join(root, 'jupyter_jsmol', 'labextension')

data_files_spec = [('share/jupyter/nbextensions/jupyter_jsmol', nb_path, '**'),
                   ('share/jupyter/lab/extensions', lab_path, '*.tgz'),
                   ('etc/jupyter/nbconfig/notebook.d', root,
                    'jupyter_jsmol.json')]

cmdclass = create_cmdclass('jsdeps', data_files_spec=data_files_spec)
cmdclass['jsdeps'] = install_npm(js_path, build_cmd='build:all')

with open("README.md", "r") as fh:
    long_description = fh.read()

setup_args = dict(
    name='jupyter_jsmol',
    description='JSmol viewer widget for Jupyter',
    long_description=long_description,
    long_description_content_type="text/markdown",
    version='0.2.4',
    author='Adam Fekete',
    author_email='*****@*****.**',
    url='https://github.com/fekad/jupyter-jsmol',
    license='BSD',
    platforms="Linux, Mac OS X, Windows",
Example #12
0
# Representative files that should exist after a successful build
jstargets = [pjoin(nb_path, "index.js"), pjoin(HERE, "lib", "plugin.js")]

package_data_spec = {name: ["nbextension/static/*.*js*", "labextension/*.tgz"]}

data_files_spec = [
    ("share/jupyter/nbextensions/jupyter-p5", nb_path, "*.js*"),
    ("share/jupyter/lab/extensions", lab_path, "*.tgz"),
    ("etc/jupyter/nbconfig/notebook.d", HERE, "jupyter-p5.json"),
]

cmdclass = create_cmdclass("jsdeps",
                           package_data_spec=package_data_spec,
                           data_files_spec=data_files_spec)
cmdclass["jsdeps"] = combine_commands(install_npm(HERE, build_cmd="build:all"),
                                      ensure_targets(jstargets))

setup_args = dict(
    name=name,
    description="p5.js Jupyter Widget",
    version=version,
    scripts=glob(pjoin("scripts", "*")),
    cmdclass=cmdclass,
    packages=find_packages(),
    author="Jeremy Tuloup",
    author_email="",
    url="https://github.com/jtpio/ipyp5",
    license="BSD",
    platforms="Linux, Mac OS X, Windows",
    keywords=["Jupyter", "Widgets", "IPython", "p5js"],
Example #13
0
        'labextension/*.tgz'
    ]
}

data_files_spec = [
    ('share/jupyter/nbextensions/vgrid_jupyter', nb_path, '*.js*'),
    ('share/jupyter/nbextensions/vgrid_jupyter', nb_path, '*.css*'),
    ('share/jupyter/lab/extensions', lab_path, '*.tgz'),
    ('etc/jupyter/nbconfig/notebook.d', HERE, 'vgrid_jupyter.json')
]

cmdclass = create_cmdclass('jsdeps',
                           package_data_spec=package_data_spec,
                           data_files_spec=data_files_spec)
cmdclass['jsdeps'] = combine_commands(
    install_npm(HERE, build_cmd='build:all', force=True),
    ensure_targets(jstargets),
)

setup_args = dict(
    name=name,
    description='Jupyter integration for vgrid',
    version=version,
    scripts=glob(pjoin('scripts', '*')),
    cmdclass=cmdclass,
    packages=find_packages(),
    author='Will Crichton',
    author_email='*****@*****.**',
    url='https://github.com/scanner-research/vgrid_jupyter',
    license='BSD',
    platforms="Linux, Mac OS X, Windows",
Example #14
0
data_spec = [
    ('share/jupyter/nbextensions/nbdime',
     name + '/notebook_ext',
     '*.js'),
    ('share/jupyter/lab/extensions',
     'packages/labextension/dist',
     'nbdime-jupyterlab-*.tgz'),
    ('etc/jupyter',
     'jupyter-config',
     '**/*.json'),
]


cmdclass = create_cmdclass('js', data_files_spec=data_spec)
cmdclass['js'] = combine_commands(
    install_npm(here, build_targets=jstargets, sources=packages_dir),
    ensure_targets(jstargets),
)


setup_args = dict(
    name            = name,
    description     = "Diff and merge of Jupyter Notebooks",
    version         = version,
    scripts         = glob(pjoin('scripts', '*')),
    cmdclass        = cmdclass,
    packages        = find_packages(here),
    package_data    = package_data,
    author          = 'Jupyter Development Team',
    author_email    = '*****@*****.**',
    url             = 'http://jupyter.org',
Example #15
0
}

data_files_spec = [
    ('share/jupyter/nbextensions/sage-combinat-widgets',
        nb_path, '*.js*'),
    ('share/jupyter/nbextensions/sage-combinat-widgets',
        nb_path, '*.css'),
    ('share/jupyter/lab/extensions', lab_path, '*.tgz'),
    ('etc/jupyter/nbconfig/notebook.d', HERE, 'sage-combinat-widgets.json')
]


cmdclass = create_cmdclass('jsdeps', package_data_spec=package_data_spec,
                           data_files_spec=data_files_spec)
cmdclass['jsdeps'] = combine_commands(
    install_npm(pjoin(HERE, 'js'), build_cmd='build:all'),
    ensure_targets(jstargets),
)
cmdclass['test'] = SageTest

setup_args = dict(
    name            = name,
    version         = readfile("VERSION"),
    description     = 'Jupyter widgets for SAGE Combinat',
    long_description = readfile("README.rst"),
    cmdclass        = cmdclass,
    packages        = find_packages(),
    url             = 'https://github.com/sagemath/sage-combinat-widgets',
    author          = 'Odile Bénassy, Henri Derycke, Nicolas M. Thiéry',
    author_email    = '*****@*****.**',
    license         = 'GPLv3+',
Example #16
0
log.set_verbosity(log.DEBUG)
log.info('setup.py entered')
log.info('$PATH=%s' % os.environ['PATH'])

LONG_DESCRIPTION = 'A Python/ThreeJS bridge utilizing the Jupyter widget infrastructure.'

here = os.path.abspath(os.path.dirname(sys.argv[0]))

version_ns = {}
with open(os.path.join(here, 'pythreejs', '_version.py')) as f:
    exec(f.read(), {}, version_ns)

cmdclass = create_cmdclass(['js'])
cmdclass['js'] = install_npm(
    path=os.path.join(here, 'js'),
    build_dir=os.path.join(here, 'pythreejs', 'static'),
    source_dir=os.path.join(here, 'js'),
)

setup_args = {
    'name':
    'pythreejs',
    'version':
    version_ns['__version__'],
    'description':
    'Interactive 3d graphics for the Jupyter notebook, using Three.js from Jupyter interactive widgets.',
    'long_description':
    LONG_DESCRIPTION,
    'License':
    'BSD',
    'include_package_data':
Example #17
0
version = get_version(pjoin(here, name, '_version.py'))

cmdclass = create_cmdclass(
    'js',
    data_files_spec=[
        ('share/jupyter/lab/extensions', 'lab-dist', '*.tgz'),
        ('etc/jupyter/jupyter_notebook_config.d',
         'jupyter-config/jupyter_notebook_config.d',
         'jupyterlab-discovery.json'),
    ],
)
cmdclass['js'] = combine_commands(
    install_npm(
        path=here,
        build_dir=os.path.join(here, 'lib'),
        source_dir=os.path.join(here, 'src'),
        build_cmd='build:labextension',
    ),
    ensure_targets([
        pjoin(here, 'lib', 'plugin.js'),
    ]),
)

setup_args = dict(
    name=name,
    description=
    "A JupyterLab extension to facilitate the discovery and installation of other extensions",
    version=version,
    scripts=glob(pjoin('scripts', '*')),
    cmdclass=cmdclass,
    packages=find_packages(here),
Example #18
0
log.set_verbosity(log.DEBUG)
log.info('setup.py entered')
log.info('$PATH=%s' % os.environ['PATH'])

LONG_DESCRIPTION = 'Jupyter notebook extension for 3D visualization.'

# Representative files that should exist after a successful build
targets = [
    os.path.join(here, 'k3d', 'static', 'extension.js'),
    os.path.join(here, 'k3d', 'static', 'index.js')
]

cmdclass = create_cmdclass(('jsdeps',))
cmdclass['jsdeps'] = combine_commands(
    install_npm(node_root),
    ensure_targets(targets),
)

version_ns = {}
with open(os.path.join(here, 'k3d', '_version.py')) as f:
    exec (f.read(), {}, version_ns)

setup_args = {
    'name': 'K3D',
    'version': version_ns['__version__'],
    'license': 'MIT',
    'description': 'Jupyter notebook extension for 3D visualization.',
    'long_description': LONG_DESCRIPTION,
    'include_package_data': True,
    'data_files': [
Example #19
0
from setuptools import setup
from setupbase import create_cmdclass, install_npm

cmdclass = create_cmdclass(['labextension', 'nbextension'])
cmdclass['labextension'] = install_npm('labextension')
cmdclass['nbextension'] = install_npm('nbextension')

setup_args = dict(
    name                 = 'jupyterlab_geojson',
    version              = '0.18.0',
    packages             = ['jupyterlab_geojson'],
    author               = 'Grant Nestor',
    author_email         = '*****@*****.**',
    url                  = 'http://jupyter.org',
    license              = 'BSD',
    platforms            = "Linux, Mac OS X, Windows",
    keywords             = [
        'ipython', 
        'jupyter', 
        'jupyterlab', 
        'extension', 
        'renderer',
        'geojson'
    ],
    classifiers          = [
        'Intended Audience :: Developers',
        'Intended Audience :: System Administrators',
        'Intended Audience :: Science/Research',
        'License :: OSI Approved :: BSD License',
        'Programming Language :: Python',
        'Programming Language :: Python :: 2.7',
Example #20
0
# Representative files that should exist after a successful build
jstargets = [
    pjoin(js_path, 'lib', 'labext.js'),
]

package_data_spec = {name: ['labextension/*.tgz']}

data_files_spec = [
    ('share/jupyter/lab/extensions', lab_path, '*.tgz'),
]

cmdclass = create_cmdclass('jsdeps',
                           package_data_spec=package_data_spec,
                           data_files_spec=data_files_spec)
cmdclass['jsdeps'] = combine_commands(install_npm(js_path, build_cmd='build'),
                                      # ensure_targets(jstargets),
                                      )

setup_args = dict(
    name=name,
    description='A sidecar output widget for JupyterLab',
    version=version,
    scripts=glob(pjoin('scripts', '*')),
    cmdclass=cmdclass,
    packages=find_packages(),
    author='Yarden Livnat',
    author_email='*****@*****.**',
    url='https://github.com/yarden-livnat/ipyregulus',
    license='BSD',
    platforms="Linux, Mac OS X, Windows",
Example #21
0
import pathlib
from setuptools import (
    find_packages,
    setup,
)
from setupbase import (get_version, create_cmdclass, install_npm)

here = pathlib.Path('.')
version_path = here.joinpath('jupyter_server', '_version.py')
VERSION = get_version(str(version_path))

readme_path = here.joinpath('README.md')
README = readme_path.read_text()

cmdclass = create_cmdclass('jsdeps')
cmdclass['jsdeps'] = install_npm()

setup_args = dict(
    name='jupyter_server',
    description=
    'The backend—i.e. core services, APIs, and REST endpoints—to Jupyter web applications.',
    long_description=README,
    long_description_content_type='text/markdown',
    version=VERSION,
    packages=find_packages('.', exclude=['tests*', 'docs*', 'examples*']),
    include_package_data=True,
    cmdclass=cmdclass,
    author='Jupyter Development Team',
    author_email='*****@*****.**',
    url='http://jupyter.org',
    license='BSD',
Example #22
0
jstargets = [
    pjoin(HERE, "lib", "plugin.js"),
]

package_data_spec = {name: ["labextension/*.tgz"]}

data_files_spec = [
    ("share/jupyter/lab/extensions", lab_path, "*.tgz"),
]


cmdclass = create_cmdclass(
    "jsdeps", package_data_spec=package_data_spec, data_files_spec=data_files_spec
)
cmdclass["jsdeps"] = combine_commands(
    install_npm(HERE, build_cmd="build"), ensure_targets(jstargets),
)


setup_args = dict(
    name=name,
    description="Control JupyterLab from Python notebooks",
    version=version,
    scripts=glob(pjoin("scripts", "*")),
    cmdclass=cmdclass,
    packages=find_packages(),
    author="Jeremy Tuloup",
    author_email="*****@*****.**",
    url="https://github.com/jtpio/ipylab",
    license="BSD",
    platforms="Linux, Mac OS X, Windows",
Example #23
0
with io.open('README.md', encoding='utf_8') as f:
    LONG_DESCRIPTION = f.read()

# Wire up the NPM build to the Python package build -- we generate JavaScript
# artifacts from the `frontend/` package and then include them as data assets in
# the pywwt Python package.

nb_path = pjoin(name, 'nbextension', 'static')

js_outputs = [
    pjoin(nb_path, 'index.js'),
]

js_content_command = combine_commands(
    install_npm('frontend', build_cmd='pywwt-export'),
    ensure_targets(js_outputs),
)

# Custom "command class" that (1) makes sure to create the JS content, (2)
# includes that content as extra "package data" in the Python package, and (3)
# can install special metadata files in the Python environment root.

package_data_spec = {
    name: [
        'nbextension/static/*.*js*', 'nbextension/static/*.html',
        'nbextension/static/interactive_figure/*.html',
        'nbextension/static/interactive_figure/*.js', 'labextension/*.tgz',
        'tests/data/*/*.png'
    ]
}
Example #24
0
    if 'sdist' not in sys.argv and 'bdist_wheel' not in sys.argv:
        return

    target = pjoin(HERE, NAME, 'static', 'package.json')
    with open(target) as fid:
        version = json.load(fid)['jupyterlab']['version']

    if LooseVersion(version) != LooseVersion(VERSION):
        raise ValueError('Version mismatch, please run `build:update`')


cmdclass = create_cmdclass('jsdeps', data_files_spec=data_files_spec,
    package_data_spec=package_data_spec)
cmdclass['jsdeps'] = combine_commands(
    install_npm(build_cmd='build:prod', path=staging, source_dir=staging,
                build_dir=pjoin(HERE, NAME, 'static'), npm=npm),
    command_for_func(check_assets)
)


class JupyterlabDevelop(develop):
    """A custom develop command that runs yarn"""

    def run(self):
        if not skip_npm:
            if not which('node'):
                log.error('Please install nodejs and npm before continuing installation. nodejs may be installed using conda or directly from the nodejs website.')
                return
            run(npm, cwd=HERE)
        develop.run(self)
Example #25
0
package_data_spec = {name: ["nbextension/static/*.*js*", "labextension/*.tgz"]}

data_files_spec = [
    ("share/jupyter/nbextensions/jupyter-graphin", nb_path, "*.js*"),
    ("share/jupyter/lab/extensions", lab_path, "*.tgz"),
    ("etc/jupyter/nbconfig/notebook.d", HERE, "jupyter-graphin.json"),
]

cmdclass = create_cmdclass(
    "jsdeps",
    package_data_spec=package_data_spec,
    data_files_spec=data_files_spec,  # noqa: E501
)
cmdclass["jsdeps"] = combine_commands(
    install_npm(HERE, build_cmd="build:all"),
    ensure_targets(jstargets),
)

# Read the contents of the README file on Pypi
this_directory = path.abspath(path.dirname(__file__))
with open(pjoin(this_directory, "README.md"), encoding="utf-8") as f:
    long_description = f.read()

setup_args = dict(
    name=name,
    description=
    "Python implementation of the graph visualization tool Graphin.",  # noqa: E501
    long_description=long_description,
    long_description_content_type="text/markdown",
    version=version,
Example #26
0
         '*.js'),
        ('share/jupyter/nbextensions/jupyter-threejs',
         name + '/static',
         '*.js.map'),
        ('share/jupyter/lab/extensions',
         'js/lab-dist',
         'jupyter-threejs-*.tgz'),
        ('etc/jupyter/nbconfig',
         'jupyter-config',
         '**/*.json'),
    ],
)
cmdclass['js'] = combine_commands(
    install_npm(
        path=os.path.join(here, 'js'),
        build_dir=os.path.join(here, name, 'static'),
        source_dir=os.path.join(here, 'js'),
        build_cmd='build:all'
    ),
    ensure_targets([
        name + '/static/extension.js',
        name + '/static/index.js',
        'js/src/core/BufferAttribute.autogen.js',
        name + '/core/BufferAttribute_autogen.py',
    ]),
)

setup_args = {
    'name': name,
    'version': version,
    'description': 'Interactive 3d graphics for the Jupyter notebook, using Three.js from Jupyter interactive widgets.',
    'long_description': LONG_DESCRIPTION,
Example #27
0
nbextension = pjoin(here, name, 'nbextension')
labextension = pjoin(here, name, 'labextension')

# Representative files that should exist after a successful build
jstargets = [
    pjoin(nbextension, 'extension.js'),
    pjoin(here, 'lib', 'lab_extension.js'),
]

version_ns = {}
with io.open(pjoin(here, name, '_version.py'), encoding="utf8") as f:
    exec(f.read(), {}, version_ns)

cmdclass = create_cmdclass(('jsdeps', ))
cmdclass['jsdeps'] = combine_commands(
    install_npm(here, build_cmd='build:all'),
    ensure_targets(jstargets),
)

package_data = {name: ['nbextension/*.*js*', 'labextension/*.tgz']}

data_files = expand_data_files([('share/jupyter/nbextensions/jupyter_francy',
                                 [pjoin(nbextension, '*.js*')]),
                                ('share/jupyter/lab/extensions',
                                 [pjoin(labextension, '*.tgz')])])

setup_args = dict(name=name,
                  version=version_ns['__version__'],
                  scripts=glob(pjoin('scripts', '*')),
                  cmdclass=cmdclass,
                  packages=find_packages(here),
Example #28
0
jstargets = [
    pjoin(nb_path, 'index.js'),
    pjoin(js_path, 'lib', 'plugin.js'),
]

package_data_spec = {name: ['nbextension/static/*.*js*', 'labextension/*.tgz']}

data_files_spec = [('share/jupyter/nbextensions/phoila', nb_path, '*.js*'),
                   ('share/jupyter/lab/extensions', lab_path, '*.tgz'),
                   ('etc/jupyter/nbconfig/notebook.d', HERE, 'phoila.json')]

cmdclass = create_cmdclass('jsdeps',
                           package_data_spec=package_data_spec,
                           data_files_spec=data_files_spec)
cmdclass['jsdeps'] = combine_commands(
    install_npm(js_path, build_cmd='build'),
    ensure_targets(jstargets),
)

setup_args = dict(
    name=name,
    description='A Phosphor wrapper for Voila',
    version=version,
    scripts=glob(pjoin('scripts', '*')),
    cmdclass=cmdclass,
    packages=find_packages(),
    author='Vidar Tonaas Fauske',
    author_email='*****@*****.**',
    url='https://github.com/vidartf/phoila',
    license='BSD',
    platforms="Linux, Mac OS X, Windows",
Example #29
0
        'tests/filters/*.py',
        '*.schema.json',
        'webapp/static/*.*',
        'webapp/templates/*.*',
        'webapp/testnotebooks/*.*',
        'notebook_ext/*.*',
    ]
}

data_spec = [
    ('share/jupyter/nbextensions/nbdime', name + '/notebook_ext', '*.js'),
]

cmdclass = create_cmdclass('js', data_files_spec=data_spec)
cmdclass['js'] = combine_commands(
    install_npm(here),
    ensure_targets(jstargets),
)

setup_args = dict(
    name=name,
    description="Diff and merge of Jupyter Notebooks",
    version=version,
    scripts=glob(pjoin('scripts', '*')),
    cmdclass=cmdclass,
    packages=find_packages(here),
    package_data=package_data,
    author='Jupyter Development Team',
    author_email='*****@*****.**',
    url='http://jupyter.org',
    license='BSD',
Example #30
0
    if 'sdist' not in sys.argv and 'bdist_wheel' not in sys.argv:
        return

    target = pjoin(HERE, NAME, 'static', 'package.json')
    with open(target) as fid:
        version = json.load(fid)['jupyterlab']['version']

    if LooseVersion(version) != LooseVersion(VERSION):
        raise ValueError('Version mismatch, please run `build:update`')


cmdclass = create_cmdclass('jsdeps', data_files_spec=data_files_spec,
                           package_data_spec=package_data_spec, exclude=exclude)
cmdclass['jsdeps'] = combine_commands(
    install_npm(build_cmd='build:prod', path=staging, source_dir=staging,
                build_dir=pjoin(HERE, NAME, 'static'), npm=npm),
    command_for_func(check_assets)
)


class JupyterlabDevelop(develop):
    """A custom develop command that runs yarn"""

    def run(self):
        if not skip_npm:
            if not which('node'):
                error_message = """
Please install nodejs and npm before continuing installation.
nodejs may be installed using conda or directly from: https://nodejs.org/
"""
                log.error(error_message)
Example #31
0
    target = pjoin(HERE, NAME, 'static', 'package.json')
    with open(target) as fid:
        version = json.load(fid)['jupyterlab']['version']

    if LooseVersion(version) != LooseVersion(VERSION):
        raise ValueError('Version mismatch, please run `build:update`')


cmdclass = create_cmdclass('jsdeps',
                           data_files_spec=data_files_spec,
                           package_data_spec=package_data_spec,
                           exclude=exclude)
cmdclass['jsdeps'] = combine_commands(
    install_npm(build_cmd='build:prod',
                path=staging,
                source_dir=staging,
                build_dir=pjoin(HERE, NAME, 'static'),
                npm=npm), command_for_func(check_assets))


class JupyterlabDevelop(develop):
    """A custom develop command that runs yarn"""
    def run(self):
        if not skip_npm:
            if not which('node'):
                error_message = """
Please install nodejs and npm before continuing installation.
nodejs may be installed using conda or directly from: https://nodejs.org/
"""
                log.error(error_message)
                return
Example #32
0
log.info('$PATH=%s' % os.environ['PATH'])

LONG_DESCRIPTION = 'Jupyter notebook extension for 3D visualization.'

# Representative files that should exist after a successful build
targets = [
    os.path.join(here, 'k3d', 'static', 'standalone.js'),
    os.path.join(here, 'k3d', 'static', 'snapshot_standalone.txt'),
    os.path.join(here, 'k3d', 'static', 'snapshot_online.txt'),
    os.path.join(here, 'k3d', 'static', 'extension.js'),
    os.path.join(here, 'k3d', 'static', 'index.js')
]

cmdclass = create_cmdclass(wrappers=[] if skip_npm else ['jsdeps'],
                           data_dirs=[])
cmdclass['jsdeps'] = combine_commands(install_npm(node_root),
                                      ensure_targets(targets))

version_ns = {}
with open(os.path.join(here, 'k3d', '_version.py')) as f:
    exec(f.read(), {}, version_ns)

setup_args = {
    'name':
    'K3D',
    'version':
    version_ns['__version__'],
    'license':
    'MIT',
    'description':
    'Jupyter notebook extension for 3D visualization.',
Example #33
0
    pjoin(nb_path, 'index.js'),
    pjoin(HERE, 'lib', 'plugin.js'),
]

package_data_spec = {name: ['nbextension/static/*.*js*', 'labextension/*.tgz']}

data_files_spec = [('share/jupyter/nbextensions/ipysegment', nb_path, '*.js*'),
                   ('share/jupyter/lab/extensions', lab_path, '*.tgz'),
                   ('etc/jupyter/nbconfig/notebook.d', HERE, 'ipysegment.json')
                   ]

cmdclass = create_cmdclass('jsdeps',
                           package_data_spec=package_data_spec,
                           data_files_spec=data_files_spec)
cmdclass['jsdeps'] = combine_commands(
    install_npm(HERE, build_cmd='build:all'),
    ensure_targets(jstargets),
)

setup_args = dict(
    name=name,
    description='manual image segmentation in jupyter',
    version=version,
    scripts=glob(pjoin('scripts', '*')),
    cmdclass=cmdclass,
    packages=find_packages(),
    author='Ian Hunt-Isaak',
    author_email='*****@*****.**',
    url='https://github.com//ipysegment',
    license='BSD',
    platforms="Linux, Mac OS X, Windows",
        'labextension/*.tgz'
    ]
}

data_files_spec = [
    ('share/jupyter/nbextensions/{{ cookiecutter.python_package_name}}',
        nb_path, '*.js*'),
    ('share/jupyter/lab/extensions', lab_path, '*.tgz'),
    ('etc/jupyter/nbconfig/notebook.d' , HERE, '{{ cookiecutter.python_package_name}}.json')
]


cmdclass = create_cmdclass('jsdeps', package_data_spec=package_data_spec,
    data_files_spec=data_files_spec)
cmdclass['jsdeps'] = combine_commands(
    install_npm(HERE, build_cmd='build:all'),
    ensure_targets(jstargets),
)


setup_args = dict(
    name            = name,
    description     = '{{ cookiecutter.project_short_description }}',
    version         = version,
    scripts         = glob(pjoin('scripts', '*')),
    cmdclass        = cmdclass,
    packages        = find_packages(),
    author          = '{{ cookiecutter.author_name }}',
    author_email    = '{{ cookiecutter.author_email }}',
    url             = 'https://github.com/{{ cookiecutter.github_organization_name }}/{{ cookiecutter.github_project_name }}',
    license         = 'BSD',