]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
doc: fixes for local dev builds
authorLeonid Usov <leonid.usov@ibm.com>
Mon, 8 Jan 2024 15:37:20 +0000 (17:37 +0200)
committerLeonid Usov <leonid.usov@ibm.com>
Thu, 14 Mar 2024 19:07:52 +0000 (15:07 -0400)
Signed-off-by: Leonid Usov <leonid.usov@ibm.com>
(cherry picked from commit 88fb668938f051b723c518a7faa6aa759bc39829)

doc/.gitignore
doc/_ext/ceph_commands.py
doc/conf.py

index 0c7c74746ae9461d84dd5ee3cd84fbc1e46cb881..9ee3c337d0ab5b97d98cc61de6c8dcc7bf7127d6 100644 (file)
@@ -1,2 +1,3 @@
 /overview.png
 /object_store.png
+_build/
index 861a013ea5a48d3e1cf8dfe172e0085d4f40591a..3822a879293877f635671b34d9a4bf83bcb51057 100644 (file)
@@ -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 []
 
index 2a083fae0e84e9f380ecd18b0bcfb07f88b5051c..4fdc9a53b757f56d717ab40c11212d26474f0d56 100644 (file)
@@ -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: