2020-04-30 23:48:29 +03:00
|
|
|
#!/bin/bash
|
|
|
|
# Copyright (c) Microsoft Corporation. All rights reserved.
|
|
|
|
# Licensed under the Apache 2.0 License.
|
|
|
|
|
2020-11-17 20:34:21 +03:00
|
|
|
set -e
|
|
|
|
|
2022-06-29 21:23:43 +03:00
|
|
|
echo "Generate version.py if it doesn't already exist"
|
|
|
|
if [ ! -f "python/version.py" ]
|
|
|
|
then
|
2022-11-18 14:08:22 +03:00
|
|
|
mkdir -p tmp_build
|
2022-06-29 21:23:43 +03:00
|
|
|
cd tmp_build
|
2022-11-18 14:08:22 +03:00
|
|
|
cmake -L -GNinja -DCOMPILE_TARGET=virtual ..
|
2022-06-29 21:23:43 +03:00
|
|
|
cd ..
|
|
|
|
rm -rf tmp_build
|
|
|
|
fi
|
|
|
|
|
2020-11-17 20:34:21 +03:00
|
|
|
echo "Setting up Python environment..."
|
|
|
|
if [ ! -f "env/bin/activate" ]
|
|
|
|
then
|
|
|
|
python3.8 -m venv env
|
|
|
|
fi
|
|
|
|
|
|
|
|
source env/bin/activate
|
2021-09-02 17:35:27 +03:00
|
|
|
pip install -U pip
|
|
|
|
pip install -q -U -e ./python/
|
|
|
|
pip install -q -U -r ./doc/requirements.txt
|
2020-11-17 20:34:21 +03:00
|
|
|
echo "Python environment successfully setup"
|
|
|
|
|
2020-11-03 20:24:39 +03:00
|
|
|
sphinx-autobuild -b html doc doc/html --host localhost --port 8080
|