提交 ead36e47 编写于 作者: M Megvii Engine Team

fix(scripts): fix some typo

GitOrigin-RevId: fe3b6b3ceb6ecd2f861329f5b5c75589f206b36f
上级 82738b71
......@@ -29,7 +29,7 @@
The script accepts the MegEngine installation and MegBrain clone path as the argument.
```bash
./gen_python_docs/gen_html.sh $MGE_ROOT $MEB_ROOT
./gen_python_docs/gen_html.sh $MGB_ROOT $MGE_ROOT(optional)
```
Note that the RST files generated from python docstring are put under `source/autogen`.
......@@ -55,7 +55,7 @@
API docstring also contains examples written by [doctest](https://docs.python.org/3/library/doctest.html). Run the tests by
```bash
gen_python_docs/gen_html.sh ~/.local/lib/python3.6/site-packages $MEB_ROOT
gen_python_docs/gen_html.sh $MGB_ROOT ~/.local/lib/python3.6/site-packages/megengine
sphinx-build -b doctest source build/doctest
```
......@@ -87,4 +87,4 @@ find the class rst file and copy its name and replace the doc with
find the file and copy its name and replace the doc with
```
:ref:`file_file_<filename>`
```
\ No newline at end of file
```
......@@ -8,10 +8,12 @@ rm -rf source/cpp_api
set -e
if [ ! -n "$2" ]
if [ ! -n "$1" ]
then
echo "MegBrain directory not provided"
exit 1
else
MGB_ROOT=$1
fi
exec 3<"source/include/h_file.txt"
......@@ -20,15 +22,15 @@ exec 4<"source/include/h_location.txt"
while read line1<&3 && read line2<&4
do
mkdir -p "source/include/file${line2%/*}"
cp ${2}${line1} "source/include/file${line2%/*}"
cp ${MGB_ROOT}${line1} "source/include/file${line2%/*}"
done
if [ ! -n "$1" ]; then
if [ ! -n "$2" ]; then
MGE_ROOT=`python3 -c "import os; \
import megengine; \
print(os.path.dirname(megengine.__file__))"`
else
MGE_ROOT=$1
MGE_ROOT=$2
fi
./gen_python_docs/gendoc.sh $MGE_ROOT
......@@ -45,4 +47,4 @@ export API_DIR="api_zh"
rm -rf build/html/api
mkdir build/html/api
cp .tmp/* build/html/api
rm -rf .tmp
\ No newline at end of file
rm -rf .tmp
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册