From b6fdc17125c3a838b4a45163e8939234e027a1c6 Mon Sep 17 00:00:00 2001 From: lipanpan03 <656461146@qq.com> Date: Wed, 13 Nov 2024 10:51:00 +0800 Subject: [PATCH 1/5] add_doc_in_centos7 --- cpplint/doc_gen.sh | 6 ++++-- docs/en-US/Makefile | 2 +- docs/en-US/source/conf.py | 14 ++++++++++++-- docs/zh-CN/source/conf.py | 14 ++++++++++++-- 4 files changed, 29 insertions(+), 7 deletions(-) diff --git a/cpplint/doc_gen.sh b/cpplint/doc_gen.sh index d359b50c02..da2fa8ae11 100755 --- a/cpplint/doc_gen.sh +++ b/cpplint/doc_gen.sh @@ -1,6 +1,8 @@ #! /bin/bash set -e 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..a4ab82776d 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() == '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..c3fb4c41ac 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() == '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"): From 77d99a535d9a72b3c6ca0cf066b13ee73d567d7e Mon Sep 17 00:00:00 2001 From: lipanpan03 <656461146@qq.com> Date: Wed, 13 Nov 2024 10:56:13 +0800 Subject: [PATCH 2/5] add_doc_in_centos7 --- docs/en-US/source/conf.py | 2 ++ docs/zh-CN/source/conf.py | 2 ++ 2 files changed, 4 insertions(+) diff --git a/docs/en-US/source/conf.py b/docs/en-US/source/conf.py index a4ab82776d..47ed7daad5 100644 --- a/docs/en-US/source/conf.py +++ b/docs/en-US/source/conf.py @@ -42,6 +42,8 @@ breathe_projects = {"cpp_procedure": "9.olap&procedure/1.procedure/build/xml"} breathe_default_project = "cpp_procedure" else: + print(platform.linux_distribution()[0].lower() + "-" * 70) + print(platform.linux_distribution()[1] + "-" * 70) if platform.linux_distribution()[0].lower() == '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")) diff --git a/docs/zh-CN/source/conf.py b/docs/zh-CN/source/conf.py index c3fb4c41ac..86b882c163 100644 --- a/docs/zh-CN/source/conf.py +++ b/docs/zh-CN/source/conf.py @@ -42,6 +42,8 @@ breathe_projects = {"cpp_procedure": "9.olap&procedure/1.procedure/build/xml"} breathe_default_project = "cpp_procedure" else: + print(platform.linux_distribution()[0].lower() + "-" * 70) + print(platform.linux_distribution()[1] + "-" * 70) if platform.linux_distribution()[0].lower() == '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")) From 3ead139418cbea4c489940f26c7b9d8dd6c31edc Mon Sep 17 00:00:00 2001 From: lipanpan03 <656461146@qq.com> Date: Wed, 13 Nov 2024 11:00:21 +0800 Subject: [PATCH 3/5] add_doc_in_centos7 --- docs/en-US/source/conf.py | 4 +--- docs/zh-CN/source/conf.py | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/docs/en-US/source/conf.py b/docs/en-US/source/conf.py index 47ed7daad5..62466299ae 100644 --- a/docs/en-US/source/conf.py +++ b/docs/en-US/source/conf.py @@ -42,9 +42,7 @@ breathe_projects = {"cpp_procedure": "9.olap&procedure/1.procedure/build/xml"} breathe_default_project = "cpp_procedure" else: - print(platform.linux_distribution()[0].lower() + "-" * 70) - print(platform.linux_distribution()[1] + "-" * 70) - if platform.linux_distribution()[0].lower() == 'centos' and platform.linux_distribution()[1].startswith('7'): + 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")) diff --git a/docs/zh-CN/source/conf.py b/docs/zh-CN/source/conf.py index 86b882c163..cf16894de1 100644 --- a/docs/zh-CN/source/conf.py +++ b/docs/zh-CN/source/conf.py @@ -42,9 +42,7 @@ breathe_projects = {"cpp_procedure": "9.olap&procedure/1.procedure/build/xml"} breathe_default_project = "cpp_procedure" else: - print(platform.linux_distribution()[0].lower() + "-" * 70) - print(platform.linux_distribution()[1] + "-" * 70) - if platform.linux_distribution()[0].lower() == 'centos' and platform.linux_distribution()[1].startswith('7'): + 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")) From 94601f3f2b4e82d91f5ac55946cd091a39093e5e Mon Sep 17 00:00:00 2001 From: lipanpan03 <656461146@qq.com> Date: Wed, 13 Nov 2024 11:10:02 +0800 Subject: [PATCH 4/5] add_doc_in_centos7 --- cpplint/doc_gen.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cpplint/doc_gen.sh b/cpplint/doc_gen.sh index da2fa8ae11..ecb5408dbf 100755 --- a/cpplint/doc_gen.sh +++ b/cpplint/doc_gen.sh @@ -1,5 +1,7 @@ #! /bin/bash set -e +yum install doxygen -y +python -m pip install --exists-action=w --no-cache-dir -r docs/requirements.txt cd docs/zh-CN #make html SPHINXOPTS=-W make html From 88f393ccf8f255a41ec85112afa830f3306d4d87 Mon Sep 17 00:00:00 2001 From: lipanpan03 <656461146@qq.com> Date: Wed, 13 Nov 2024 11:13:49 +0800 Subject: [PATCH 5/5] add_doc_in_centos7 --- cpplint/doc_gen.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cpplint/doc_gen.sh b/cpplint/doc_gen.sh index ecb5408dbf..427fc34d85 100755 --- a/cpplint/doc_gen.sh +++ b/cpplint/doc_gen.sh @@ -1,7 +1,7 @@ #! /bin/bash set -e yum install doxygen -y -python -m pip install --exists-action=w --no-cache-dir -r docs/requirements.txt +pip install --exists-action=w --no-cache-dir -r docs/requirements.txt cd docs/zh-CN #make html SPHINXOPTS=-W make html