Repository navigation
Expand file tree
/
Copy pathdev-install.sh
More file actions
executable file
·56 lines (45 loc) · 1.75 KB
/
Copy pathdev-install.sh
File metadata and controls
executable file
·56 lines (45 loc) · 1.75 KB
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
#!/usr/bin/env bash
# For a clean conda environment please read docs/source/dev_install.md
set -x
echo "Checking pip... "
pip --version
if [ $? -ne 0 ]; then
echo "'pip --version' failed, therefore pip is not installed. In order to perform
a developer install of ipywidgets you must have pip installed on
your machine! See https://packaging.python.org/installing/ for installation instructions."
exit 1
fi
echo "Checking JupyterLab (assuming JupyterLab >=4)... "
jupyter lab --version 2>/dev/null
if [ $? -ne 0 ]; then
echo "no, skipping installation of widgets for jupyterlab"
skip_jupyter_lab=yes
fi
# All following commands must run successfully
set -e
nbExtFlags="--sys-prefix $1"
echo "Installing and building all yarn packages"
jlpm
jlpm build
echo "widgetsnbextension"
pip install -v -e ./python/widgetsnbextension
if [[ "$OSTYPE" == "msys" ]]; then
jupyter nbextension install --overwrite --py $nbExtFlags widgetsnbextension || true
jupyter nbclassic-extension install --overwrite --py $nbExtFlags widgetsnbextension || true
else
jupyter nbextension install --overwrite --py --symlink $nbExtFlags widgetsnbextension || true
jupyter nbclassic-extension install --overwrite --py --symlink $nbExtFlags widgetsnbextension || true
fi
jupyter nbextension enable --py $nbExtFlags widgetsnbextension || true
jupyter nbclassic-extension enable --py $nbExtFlags widgetsnbextension || true
echo "ipywidgets"
pip install -v -e "./python/ipywidgets[test]"
if test "$skip_jupyter_lab" != yes; then
echo "jupyterlab_ipywidgets"
pip install jupyter_builder
pip install -ve ./python/jupyterlab_widgets
jupyter-builder develop ./python/jupyterlab_widgets --overwrite
fi
echo "pre-commit git hooks"
pip install pre-commit
pre-commit install