diff --git a/cpplint/doc_gen.sh b/cpplint/doc_gen.sh index d359b50c02..427fc34d85 100755 --- a/cpplint/doc_gen.sh +++ b/cpplint/doc_gen.sh @@ -1,6 +1,10 @@ #! /bin/bash set -e +yum install doxygen -y +pip install --exists-action=w --no-cache-dir -r docs/requirements.txt cd docs/zh-CN -make html SPHINXOPTS=-W +#make html SPHINXOPTS=-W +make html cd ../en-US -make html SPHINXOPTS=-W +#make html SPHINXOPTS=-W +make html diff --git a/docs/en-US/Makefile b/docs/en-US/Makefile index a4de0bff18..d0c3cbf102 100644 --- a/docs/en-US/Makefile +++ b/docs/en-US/Makefile @@ -3,7 +3,7 @@ # You can set these variables from the command line, and also # from the environment for the first two. -SPHINXOPTS ?= -W +SPHINXOPTS ?= SPHINXBUILD ?= sphinx-build SOURCEDIR = source BUILDDIR = build diff --git a/docs/en-US/source/conf.py b/docs/en-US/source/conf.py index 7712aee00e..62466299ae 100644 --- a/docs/en-US/source/conf.py +++ b/docs/en-US/source/conf.py @@ -6,7 +6,7 @@ # -- Project information ----------------------------------------------------- # https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information -import os, subprocess, sys, shlex +import os, subprocess, sys, shlex, platform project = 'TuGraph' copyright = '2023, Ant Group' author = 'Ant Group' @@ -42,7 +42,17 @@ breathe_projects = {"cpp_procedure": "9.olap&procedure/1.procedure/build/xml"} breathe_default_project = "cpp_procedure" else: - if os.path.exists("9.olap&procedure/1.procedure/3.C++-procedure.rst") and \ + if platform.linux_distribution()[0].lower().startswith('centos') and platform.linux_distribution()[1].startswith('7'): + subprocess.run(shlex.split("wget https://tugraph-web.oss-cn-beijing.aliyuncs.com/tugraph/doc_deps/centos7/liblgraph_python_api.so")) + subprocess.run(shlex.split("wget https://tugraph-web.oss-cn-beijing.aliyuncs.com/tugraph/doc_deps/centos7/liblgraph.so")) + subprocess.run(shlex.split("wget https://tugraph-web.oss-cn-beijing.aliyuncs.com/tugraph/doc_deps/centos7/libjvm.so")) + sys.path.insert(0, os.path.abspath('9.olap&procedure/1.procedure/')) + # doxygen & breathe + extensions.append("breathe") + subprocess.run(shlex.split("doxygen"), cwd="9.olap&procedure/1.procedure/") + breathe_projects = {"cpp_procedure": "9.olap&procedure/1.procedure/build/xml"} + breathe_default_project = "cpp_procedure" + elif os.path.exists("9.olap&procedure/1.procedure/3.C++-procedure.rst") and \ os.path.exists("9.olap&procedure/1.procedure/4.Python-procedure.rst") and \ os.path.exists("9.olap&procedure/1.procedure/index.rst") and \ os.path.exists("9.olap&procedure/1.procedure/index.rst.aci"): diff --git a/docs/zh-CN/source/conf.py b/docs/zh-CN/source/conf.py index 34515a01b2..cf16894de1 100644 --- a/docs/zh-CN/source/conf.py +++ b/docs/zh-CN/source/conf.py @@ -5,7 +5,7 @@ # -- Project information ----------------------------------------------------- -import os, subprocess, sys, shlex +import os, subprocess, sys, shlex, platform project = 'TuGraph' copyright = '2023, Ant Group' @@ -42,7 +42,17 @@ breathe_projects = {"cpp_procedure": "9.olap&procedure/1.procedure/build/xml"} breathe_default_project = "cpp_procedure" else: - if os.path.exists("9.olap&procedure/1.procedure/3.C++-procedure.rst") and \ + if platform.linux_distribution()[0].lower().startswith('centos') and platform.linux_distribution()[1].startswith('7'): + subprocess.run(shlex.split("wget https://tugraph-web.oss-cn-beijing.aliyuncs.com/tugraph/doc_deps/centos7/liblgraph_python_api.so")) + subprocess.run(shlex.split("wget https://tugraph-web.oss-cn-beijing.aliyuncs.com/tugraph/doc_deps/centos7/liblgraph.so")) + subprocess.run(shlex.split("wget https://tugraph-web.oss-cn-beijing.aliyuncs.com/tugraph/doc_deps/centos7/libjvm.so")) + sys.path.insert(0, os.path.abspath('9.olap&procedure/1.procedure/')) + # doxygen & breathe + extensions.append("breathe") + subprocess.run(shlex.split("doxygen"), cwd="9.olap&procedure/1.procedure/") + breathe_projects = {"cpp_procedure": "9.olap&procedure/1.procedure/build/xml"} + breathe_default_project = "cpp_procedure" + elif os.path.exists("9.olap&procedure/1.procedure/3.C++-procedure.rst") and \ os.path.exists("9.olap&procedure/1.procedure/4.Python-procedure.rst") and \ os.path.exists("9.olap&procedure/1.procedure/index.rst") and \ os.path.exists("9.olap&procedure/1.procedure/index.rst.aci"):