From b529001bae3670ded1e8fb7c5824009c29b58a3b Mon Sep 17 00:00:00 2001 From: Abrar Rahman Protyasha Date: Mon, 4 Apr 2022 18:50:06 -0400 Subject: [PATCH] Remove mocking of package dependencies Package imports need not be mocked by autodoc because rosdoc2 expects that the package (and all its dependencies) will be built/installed before execution, which means all required modules will be accessible on the system path. Signed-off-by: Abrar Rahman Protyasha --- rosdoc2/verbs/build/builders/sphinx_builder.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/rosdoc2/verbs/build/builders/sphinx_builder.py b/rosdoc2/verbs/build/builders/sphinx_builder.py index c5ea381..c283f2b 100644 --- a/rosdoc2/verbs/build/builders/sphinx_builder.py +++ b/rosdoc2/verbs/build/builders/sphinx_builder.py @@ -71,9 +71,6 @@ def ensure_global(name, default): if rosdoc2_settings.get('enable_autodoc', True): print('[rosdoc2] enabling autodoc', file=sys.stderr) extensions.append('sphinx.ext.autodoc') - # Provide all runtime dependencies to be mocked up - # Note: `autodoc` only mocks up those modules that it actually cannot locate in PATH - autodoc_mock_imports = {exec_depends} # Add the package directory to PATH, so that `sphinx-autodoc` can import it sys.path.insert(0, os.path.dirname('{package_src_directory}/'))