return target = pjoin(HERE, NAME, 'static', 'package.json') with open(target) as fid: version = json.load(fid)['jupyterlab']['version'] if Version(version) != Version(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
version = get_version(str(pkg/'_version.py')) with open('README.md', encoding='utf-8') as f: long_description = f.read() data_files_spec = [ # lab extension installed by default: ('share/jupyter/lab/extensions', str(pkg/'labdist'), '*.tgz'), # config to enable server extension by default: ('etc/jupyter', 'jupyter-config', '**/*.json'), ] cmdclass = create_cmdclass('pack_labext', data_files_spec=data_files_spec) cmdclass['pack_labext'] = combine_commands( command_for_func(run_pack_labextension), ensure_targets([ 'lib/index.js', 'style/index.css' ]), ) cmdclass.pop('develop') requires = [ 'fs>=2.4.11', 'fs-s3fs>=1.1.1', 'fs.smbfs @ git+https://github.com/telamonian/fs.smbfs.git@dont_assume_everyone_ace_exists#egg=fs.smbfs', 'jupyterlab>=2.0.0', 'notebook>=5.7.0', ]
version = json.load(fid)['jupyterlab']['version'] if Version(version) != Version(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 run(npm, cwd=HERE) develop.run(self)
'jupyter-config', '**/*.json'), ] def runPackLabextension(): if Path('package.json').is_file(): try: run(['jlpm', 'build:all']) except CalledProcessError: pass cmdclass = create_cmdclass('pack_labext', data_files_spec=data_files_spec) cmdclass['pack_labext'] = combine_commands( command_for_func(runPackLabextension), ensure_targets([ path.join(here, 'lib', 'index.js'), path.join(here, 'style', 'index.css') ]), ) cmdclass.pop('develop') setup( name=name, version=version, description='A Filesystem-like mult-contents manager backend for Jupyter', long_description=long_description, long_description_content_type='text/markdown', url='https://github.com/jpmorganchase/jupyter-fs', author='jupyter-fs authors',