2021-01-07 18:23:59 +00:00
|
|
|
# This script must be executed from this folder.
|
2021-03-22 17:20:33 +00:00
|
|
|
|
2021-03-12 03:02:45 +00:00
|
|
|
# $1 python path
|
|
|
|
|
# $2 source folder
|
|
|
|
|
# $3 build folder
|
2021-03-22 17:20:33 +00:00
|
|
|
# $4 build config
|
|
|
|
|
|
2021-06-02 23:12:54 +00:00
|
|
|
# Fail the document generation if anything goes wrong in the process
|
|
|
|
|
set -e -x
|
|
|
|
|
|
2021-03-22 17:20:33 +00:00
|
|
|
# Install doc generation tools
|
2021-03-12 03:02:45 +00:00
|
|
|
$1/python -m pip install -r $2/docs/python/requirements.txt
|
2021-03-22 17:20:33 +00:00
|
|
|
|
|
|
|
|
# Fake onnxruntime installation
|
|
|
|
|
export PYTHONPATH=$3/$4:$PYTHONPATH
|
|
|
|
|
|
|
|
|
|
# Remove old docs
|
|
|
|
|
rm -rf $3/docs/
|
|
|
|
|
|
2023-05-02 23:58:16 +00:00
|
|
|
$1/python -m sphinx -v -T -b html -d $3/docs/_doctrees/html $2/docs/python/ $3/docs/html
|
|
|
|
|
$1/python -u $2/tools/doc/rename_folders.py $3/docs/html
|