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 run(npm, cwd=HERE) develop.run(self)
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)
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) return
"etc/jupyter/jupyter_notebook_config.d", "sagemaker_run_notebook/server_extension/jupyter-config/jupyter_notebook_config.d", "sagemaker_run_notebook.json", ), ] def runPackLabextension(): if (lab_path / "package.json").is_file(): try: run(["jlpm", "build:labextension"], cwd=str(lab_path)) except CalledProcessError: pass pack_labext = command_for_func(runPackLabextension) cmdclass = create_cmdclass("pack_labext", data_files_spec=data_files_spec) cmdclass["pack_labext"] = pack_labext cmdclass.pop("develop") with open("README.md", "r") as fh: long_description = fh.read() required_packages = ["boto3>=1.10.44"] setuptools.setup( name=name, version=version, author="Amazon Web Services", description="Schedule notebooks to run using SageMaker processing jobs",