Open
Description
First of all currently it is not possible to use straight sphinx-build
command to build documentation out of source tree
+ /usr/bin/sphinx-build -n -T -b man doc build/sphinx/man
Running Sphinx v7.2.6
Traceback (most recent call last):
File "/usr/lib/python3.9/site-packages/sphinx/config.py", line 358, in eval_config_file
exec(code, namespace) # NoQA: S102
File "/home/tkloczko/rpmbuild/BUILD/astroid-3.1.0/doc/conf.py", line 41, in <module>
from astroid.__pkginfo__ import __version__ # noqa
ModuleNotFoundError: No module named 'astroid'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/lib/python3.9/site-packages/sphinx/cmd/build.py", line 293, in build_main
app = Sphinx(args.sourcedir, args.confdir, args.outputdir,
File "/usr/lib/python3.9/site-packages/sphinx/application.py", line 211, in __init__
self.config = Config.read(self.confdir, confoverrides or {}, self.tags)
File "/usr/lib/python3.9/site-packages/sphinx/config.py", line 181, in read
namespace = eval_config_file(filename, tags)
File "/usr/lib/python3.9/site-packages/sphinx/config.py", line 371, in eval_config_file
raise ConfigError(msg % traceback.format_exc()) from exc
sphinx.errors.ConfigError: There is a programmable error in your configuration file:
Traceback (most recent call last):
File "/usr/lib/python3.9/site-packages/sphinx/config.py", line 358, in eval_config_file
exec(code, namespace) # NoQA: S102
File "/home/tkloczko/rpmbuild/BUILD/astroid-3.1.0/doc/conf.py", line 41, in <module>
from astroid.__pkginfo__ import __version__ # noqa
ModuleNotFoundError: No module named 'astroid'
+ /usr/bin/sphinx-build -n -T -b man doc build/sphinx/man
Running Sphinx v7.2.6
Traceback (most recent call last):
File "/usr/lib/python3.9/site-packages/sphinx/config.py", line 358, in eval_config_file
exec(code, namespace) # NoQA: S102
File "/home/tkloczko/rpmbuild/BUILD/astroid-3.1.0/doc/conf.py", line 41, in <module>
from astroid.__pkginfo__ import __version__ # noqa
ModuleNotFoundError: No module named 'astroid'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/lib/python3.9/site-packages/sphinx/cmd/build.py", line 293, in build_main
app = Sphinx(args.sourcedir, args.confdir, args.outputdir,
File "/usr/lib/python3.9/site-packages/sphinx/application.py", line 211, in __init__
self.config = Config.read(self.confdir, confoverrides or {}, self.tags)
File "/usr/lib/python3.9/site-packages/sphinx/config.py", line 181, in read
namespace = eval_config_file(filename, tags)
File "/usr/lib/python3.9/site-packages/sphinx/config.py", line 371, in eval_config_file
raise ConfigError(msg % traceback.format_exc()) from exc
sphinx.errors.ConfigError: There is a programmable error in your configuration file:
Traceback (most recent call last):
File "/usr/lib/python3.9/site-packages/sphinx/config.py", line 358, in eval_config_file
exec(code, namespace) # NoQA: S102
File "/home/tkloczko/rpmbuild/BUILD/astroid-3.1.0/doc/conf.py", line 41, in <module>
from astroid.__pkginfo__ import __version__ # noqa
ModuleNotFoundError: No module named 'astroid'
This can be fixed by patch like below:
--- a/doc/conf.py
+++ b/doc/conf.py
@@ -21,7 +21,7 @@
# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
-sys.path.insert(0, os.path.abspath("../../"))
+sys.path.insert(0, os.path.abspath(".."))
# -- General configuration -----------------------------------------------------
Please let me know if you want that patch as PR.