1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37
|
# Copyright (c) Jupyter Development Team.
# Distributed under the terms of the Modified BSD License.
"""
jupyterlab_widgets setup
"""
from jupyter_packaging import (
wrap_installers,
npm_builder,
get_data_files
)
from pathlib import Path
from setuptools import setup
HERE = Path(__file__).parent.resolve()
LAB_PATH = HERE / "labextension"
# The name of the project
name = "jupyterlab_widgets"
labext_name = "@jupyter-widgets/jupyterlab-manager"
data_files_spec = [
(f"share/jupyter/labextensions/{labext_name}", LAB_PATH, "**"),
(f"share/jupyter/labextensions/{labext_name}", HERE, "install.json"),
]
post_develop = npm_builder(
build_cmd="install:extension", source_dir="src", build_dir=LAB_PATH
)
cmdclass = wrap_installers(post_develop=post_develop)
if __name__ == "__main__":
setup(
cmdclass=cmdclass,
data_files=get_data_files(data_files_spec),
)
|