doc: fixes for local dev builds

Signed-off-by: Leonid Usov <leonid.usov@ibm.com>
This commit is contained in:
Leonid Usov 2024-01-08 17:37:20 +02:00
parent d151876d5b
commit 88fb668938
3 changed files with 12 additions and 6 deletions

1
doc/.gitignore vendored
View File

@ -1,2 +1,3 @@
/overview.png
/object_store.png
_build/

View 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 []

View 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: