forked from vega/altair
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build_docs.sh
41 lines (35 loc) · 1.47 KB
/
build_docs.sh
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
#---------------------------------------------------------------------------
# bash script to build Altair's docs
#
# we run this first with Python 2.7 to correctly create image thumbnails
# (this relies on nodejs tools that fail in Python 3.5)
# and then run again in Python 3.5 to get the final doc build.
#
# Usage: bash ./build_docs.sh # must run from altair root directory
#---------------------------------------------------------------------------
# first build docs using 2.7; this is required for nodejs tools
conda create --yes -n altair-docs-27 python=2.7 || echo "conda 2.7 env exists"
source activate altair-docs-27
conda install --yes --file requirements.txt --channel conda-forge
conda install --yes --file doc/requirements.txt
# nodejs (vega-lite & canvas) & cairo are required for building thumbnails:
conda install --yes cairo nodejs --channel conda-forge
node -p "require('vega-lite/package.json').version" || npm install canvas vega-lite
# install altair & build docs
python setup.py install
cd doc
make clean
make html
cd ..
#------------------------------------------------------------------
# next re-build docs using 3.5; this will use thumbnails from above
conda create --yes -n altair-docs-35 python=3.5 || echo "conda 3.5 env exists"
source activate altair-docs-35
conda install --yes --file requirements.txt --channel conda-forge
conda install --yes --file doc/requirements.txt
# install altair & build docs
python setup.py install
cd doc
make clean
make html
cd ..