-
Notifications
You must be signed in to change notification settings - Fork 6
/
setup.py
30 lines (24 loc) · 933 Bytes
/
setup.py
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
from setuptools import setup
from pathlib import Path
from jupyter_packaging import (
create_cmdclass,
install_npm,
ensure_targets,
combine_commands,
)
JS_DIR = Path(__file__).resolve().parent / 'js'
# Representative files that should exist after a successful build
jstargets = [JS_DIR / 'dist' / 'index.js']
data_files_spec = [
('share/jupyter/nbextensions/lineup_widget', 'lineup_widget/nbextension', '*.*'),
('share/jupyter/labextensions/lineup_widget', 'lineup_widget/labextension', '**'),
('share/jupyter/labextensions/lineup_widget', '.', 'install.json'),
('etc/jupyter/nbconfig/notebook.d', '.', 'lineup_widget.json'),
]
cmdclass = create_cmdclass('jsdeps', data_files_spec=data_files_spec)
cmdclass['jsdeps'] = combine_commands(
install_npm(JS_DIR, npm=['yarn'], build_cmd='build:prod'),
ensure_targets(jstargets),
)
# See setup.cfg for other parameters
setup(cmdclass=cmdclass)