From: Leonid Usov Date: Mon, 8 Jan 2024 15:37:20 +0000 (+0200) Subject: doc: fixes for local dev builds X-Git-Tag: v19.1.0~203^2~13 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=2c22b441013975dc4f76b2095ced024382693022;p=ceph.git doc: fixes for local dev builds Signed-off-by: Leonid Usov (cherry picked from commit 88fb668938f051b723c518a7faa6aa759bc39829) --- diff --git a/doc/.gitignore b/doc/.gitignore index 0c7c74746ae9..9ee3c337d0ab 100644 --- a/doc/.gitignore +++ b/doc/.gitignore @@ -1,2 +1,3 @@ /overview.png /object_store.png +_build/ diff --git a/doc/_ext/ceph_commands.py b/doc/_ext/ceph_commands.py index 861a013ea5a4..3822a8792938 100644 --- a/doc/_ext/ceph_commands.py +++ b/doc/_ext/ceph_commands.py @@ -177,7 +177,7 @@ class Sig: @staticmethod def parse_args(args): - return [Sig._parse_arg_desc(arg) for arg in args.split()] + return [Sig._parse_arg_desc(arg) for arg in args] TEMPLATE = ''' @@ -358,8 +358,9 @@ class CephMgrCommands(Directive): cmds = sorted(cmds, key=lambda cmd: cmd.prefix) self._render_cmds(cmds) - orig_rgw_mod = sys.modules['pybind_rgw_mod'] - sys.modules['rgw'] = orig_rgw_mod + if 'pybind_rgw_mod' in sys.modules: + orig_rgw_mod = sys.modules['pybind_rgw_mod'] + sys.modules['rgw'] = orig_rgw_mod return [] diff --git a/doc/conf.py b/doc/conf.py index 2a083fae0e84..4fdc9a53b757 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -13,9 +13,13 @@ top_level = \ os.path.dirname( os.path.abspath(__file__))) -pybind_rgw_mod = __import__('rgw', globals(), locals(), [], 0) -sys.modules['pybind_rgw_mod'] = pybind_rgw_mod - +# it could be that ceph was built without RGW support +# e.g. in a local development environment +try: + pybind_rgw_mod = __import__('rgw', globals(), locals(), [], 0) + sys.modules['pybind_rgw_mod'] = pybind_rgw_mod +except Exception: + pass def parse_ceph_release(): with open(os.path.join(top_level, 'src/ceph_release')) as f: