diff --git a/doc/python_api/sphinx_doc_gen.py b/doc/python_api/sphinx_doc_gen.py index a4fa27fd90d..d8407121ae1 100644 --- a/doc/python_api/sphinx_doc_gen.py +++ b/doc/python_api/sphinx_doc_gen.py @@ -77,7 +77,7 @@ import shutil from platform import platform PLATFORM = platform().split('-')[0].lower() # 'linux', 'darwin', 'windows' -SCRIPT_DIR = os.path.dirname(__file__) +SCRIPT_DIR = os.path.abspath(os.path.dirname(__file__)) def handle_args(): @@ -88,7 +88,7 @@ def handle_args(): # When --help is given, print the usage text parser = argparse.ArgumentParser( - formatter_class=argparse.RawDescriptionHelpFormatter, + formatter_class=argparse.RawTextHelpFormatter, usage=SCRIPT_HELP_MSG ) @@ -100,11 +100,36 @@ def handle_args(): help="Path of the API docs (default=