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, scripts=glob(pjoin("scripts", "*")),
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' ] }
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':
'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', platforms = "Linux, Mac OS X, Windows",
'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', platforms="Linux, Mac OS X, Windows",
'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', platforms="Linux, Mac OS X, Windows",
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
'js', data_files_spec=[ ('share/jupyter/nbextensions/jupyter-require', NAME + '/static', '*.js'), ('share/jupyter/nbextensions/jupyter-require', NAME + '/static', '*.js.map'), ('etc/jupyter/nbconfig', 'jupyter-config', '**/*.json'), ], ) cmdclass['js'] = combine_commands( # FIXME when migrated to node.js # install_npm( # path=Path(HERE, 'js'), # build_dir=Path(HERE, NAME, 'static'), # source_dir=Path(HERE, 'js'), # build_cmd='build:all' # ), ensure_targets([ NAME + '/static/core.js', # FIXME when migrated to nodes.js NAME + '/static/display.js', # FIXME when migrated to nodes.js NAME + '/static/extension.js', # NAME + '/static/index.js', # FIXME when migrated to nodes.js ]), ) setup(name=ABOUT['__title__'], version=ABOUT['__version__'], author=ABOUT['__author__'], author_email=ABOUT['__email__'], url=ABOUT['__uri__'], license=ABOUT['__license__'], description=ABOUT['__summary__'], long_description=README,
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)
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/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': ('Interactive 3D graphics for the Jupyter Notebook and JupyterLab, ' 'using Three.js and Jupyter Widgets.'), 'long_description': (HERE / "README.md").read_text(encoding="utf-8"),
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), package_data=package_data,
# 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/sanddance', nb_path, '*.js*'), ('share/jupyter/lab/extensions', lab_path, '*.tgz'), ('etc/jupyter/nbconfig/notebook.d', HERE, 'sanddance.json')] cmdclass = create_cmdclass('jsdeps', package_data_spec=package_data_spec, data_files_spec=data_files_spec) cmdclass['jsdeps'] = combine_commands(ensure_targets(jstargets), ) with open("README.md", "r") as fh: long_description = fh.read() setup_args = dict( name=name, description='SandDance data exploration Jupyter Widget', version=version, scripts=glob(pjoin('scripts', '*')), cmdclass=cmdclass, packages=find_packages(), url='https://github.com/microsoft/SandDance/python/jupyter-widget', license='MIT', platforms="Linux, Mac OS X, Windows", keywords=['Jupyter', 'Widgets', 'IPython'],
jstargets = [pjoin(js_path, "lib", "plugins.js")] package_data_spec = { name: ["staging/*.*", "templates/*.html"], } data_files_spec = [ ("", HERE, "etc/**/*"), ("share/jupyter/phoila/extensions", lab_path, "*.tgz"), ("", HERE, "share/**/*"), ] 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", keywords=["Jupyter", "Widgets", "IPython"], classifiers=[
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',
'*.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, 'license': 'BSD', 'include_package_data': True, 'install_requires': [
'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 with open("README.md", "r") as fh:
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", keywords=['Jupyter', 'Widgets', 'IPython'],
('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.', 'long_description': LONG_DESCRIPTION, 'license': 'BSD', 'include_package_data': True,
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.', 'long_description':
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", keywords=['Jupyter', 'Widgets', 'IPython'],
'*.schema.json', 'webapp/static/*.*', 'webapp/templates/*.*', 'webapp/testnotebooks/*.*', ] } 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(pjoin(here, 'nbdime-web')), install_npm(pjoin(here, name, 'webapp'), force=True), ensure_targets(jstargets), ) setup_args = dict( name = name, description = "Diff and merge of Jupyter Notebooks", version = version_ns['__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',