Open kloczek opened 2 years ago
Here is build-shonx output where that module is required
+ /usr/bin/sphinx-build -n -T -b man doc-source build/sphinx/man
Running Sphinx v4.5.0
loading translations [en]... done
Traceback (most recent call last):
File "/usr/lib/python3.8/site-packages/sphinx/registry.py", line 425, in load_extension
mod = import_module(extname)
File "/usr/lib64/python3.8/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
File "<frozen importlib._bootstrap>", line 991, in _find_and_load
File "<frozen importlib._bootstrap>", line 961, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
File "<frozen importlib._bootstrap>", line 991, in _find_and_load
File "<frozen importlib._bootstrap>", line 973, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'sphinx_toolbox_experimental'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/lib/python3.8/site-packages/sphinx/cmd/build.py", line 272, in build_main
app = Sphinx(args.sourcedir, args.confdir, args.outputdir,
File "/usr/lib/python3.8/site-packages/sphinx/application.py", line 223, in __init__
self.setup_extension(extension)
File "/usr/lib/python3.8/site-packages/sphinx/application.py", line 380, in setup_extension
self.registry.load_extension(self, extname)
File "/usr/lib/python3.8/site-packages/sphinx/registry.py", line 428, in load_extension
raise ExtensionError(__('Could not import extension %s') % extname,
sphinx.errors.ExtensionError: Could not import extension sphinx_toolbox_experimental.needspace (exception: No module named 'sphinx_toolbox_experimental')
As I don't see thet sphinx_toolbox_experimental
I've decided to remove that module from pyproject.toml by:
--- a/pyproject.toml~ 2022-02-09 10:10:44.000000000 +0000
+++ b/pyproject.toml 2022-04-19 18:04:39.589471298 +0000
@@ -79,9 +79,6 @@
"sphinx_licenseinfo",
"seed_intersphinx_mapping",
"html_section",
- "sphinx_toolbox_experimental.needspace",
- "sphinx_toolbox_experimental.succinct_seealso",
- "sphinx_toolbox_experimental.autosummary_widths",
]
sphinxemoji_style = "twemoji"
gitstamp_fmt = "%d %b %Y"
Than on building documentation I've hit two issues.
First one that buid-shinx is not able to locate sphinxcontrib.extras_require
module
[tkloczko@devel-g2v extras_require-0.4.1.post1]$ /usr/bin/sphinx-build -n -T -b man doc-source build/sphinx/man
Running Sphinx v4.5.0
loading translations [en]... done
Traceback (most recent call last):
File "/usr/lib/python3.8/site-packages/sphinx/registry.py", line 425, in load_extension
mod = import_module(extname)
File "/usr/lib64/python3.8/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
File "<frozen importlib._bootstrap>", line 991, in _find_and_load
File "<frozen importlib._bootstrap>", line 973, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'sphinxcontrib.extras_require'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/lib/python3.8/site-packages/sphinx/cmd/build.py", line 272, in build_main
app = Sphinx(args.sourcedir, args.confdir, args.outputdir,
File "/usr/lib/python3.8/site-packages/sphinx/application.py", line 223, in __init__
self.setup_extension(extension)
File "/usr/lib/python3.8/site-packages/sphinx/application.py", line 380, in setup_extension
self.registry.load_extension(self, extname)
File "/usr/lib/python3.8/site-packages/sphinx/registry.py", line 428, in load_extension
raise ExtensionError(__('Could not import extension %s') % extname,
sphinx.errors.ExtensionError: Could not import extension sphinxcontrib.extras_require (exception: No module named 'sphinxcontrib.extras_require')
Extension error:
Could not import extension sphinxcontrib.extras_require (exception: No module named 'sphinxcontrib.extras_require')
Thios can be fixed using patch:
--- a/doc-source/conf.py~ 2022-02-09 10:10:44.000000000 +0000
+++ b/doc-source/conf.py 2022-04-19 18:08:45.742565003 +0000
@@ -10,7 +10,7 @@
# 3rd party
from sphinx_pyproject import SphinxConfig
-sys.path.append('.')
+sys.path.append(os.path.abspath('..'))
config = SphinxConfig(globalns=globals())
project = config["project"]
Than after that yet another issue
[tkloczko@devel-g2v extras_require-0.4.1.post1]$ /usr/bin/sphinx-build -n -T -b man doc-source build/sphinx/man
Running Sphinx v4.5.0
loading translations [en]... done
WARNING: Unable to determine documentation url for project docutils
WARNING: Unable to determine documentation url for project sphinx-prompt
[autosummary] generating autosummary for: 404.rst, Source.rst, api/directive.rst, api/extras_require.rst, api/sources.rst, index.rst, license.rst, usage/configuration.rst, usage/directive.rst, usage/installation.rst
loading intersphinx inventory from https://docs.python.org/3/objects.inv...
loading intersphinx inventory from https://www.sphinx-doc.org/en/stable/objects.inv...
loading intersphinx inventory from https://domdf-python-tools.readthedocs.io/en/latest/objects.inv...
loading intersphinx inventory from https://packaging.pypa.io/en/latest/objects.inv...
loading intersphinx inventory from https://setuptools.pypa.io/en/latest/objects.inv...
loading intersphinx inventory from https://shippinglabel.readthedocs.io/en/latest/objects.inv...
loading intersphinx inventory from https://sphinx-toolbox.readthedocs.io/en/latest/objects.inv...
intersphinx inventory has moved: https://www.sphinx-doc.org/en/stable/objects.inv -> https://www.sphinx-doc.org/en/master/objects.inv
building [mo]: targets for 0 po files that are out of date
building [man]: all manpages
updating environment: [new config] 10 added, 1 changed, 0 removed
reading sources... [ 70%] license
Traceback (most recent call last):
File "/usr/lib/python3.8/site-packages/sphinx/cmd/build.py", line 276, in build_main
app.build(args.force_all, filenames)
File "/usr/lib/python3.8/site-packages/sphinx/application.py", line 330, in build
self.builder.build_update()
File "/usr/lib/python3.8/site-packages/sphinx/builders/__init__.py", line 283, in build_update
self.build(['__all__'], to_build)
File "/usr/lib/python3.8/site-packages/sphinx/builders/__init__.py", line 300, in build
updated_docnames = set(self.read())
File "/usr/lib/python3.8/site-packages/sphinx/builders/__init__.py", line 407, in read
self._read_serial(docnames)
File "/usr/lib/python3.8/site-packages/sphinx/builders/__init__.py", line 428, in _read_serial
self.read_doc(docname)
File "/usr/lib/python3.8/site-packages/sphinx/builders/__init__.py", line 468, in read_doc
doctree = read_doc(self.app, self.env, self.env.doc2path(docname))
File "/usr/lib/python3.8/site-packages/sphinx/io.py", line 181, in read_doc
pub.publish()
File "/usr/lib/python3.8/site-packages/docutils/core.py", line 217, in publish
self.document = self.reader.read(self.source, self.parser,
File "/usr/lib/python3.8/site-packages/sphinx/io.py", line 101, in read
self.parse()
File "/usr/lib/python3.8/site-packages/docutils/readers/__init__.py", line 78, in parse
self.parser.parse(self.input, document)
File "/usr/lib/python3.8/site-packages/sphinxcontrib/default_values/__init__.py", line 340, in parse
super().parse(inputstring, document)
File "/usr/lib/python3.8/site-packages/sphinx/parsers.py", line 89, in parse
self.statemachine.run(inputlines, document, inliner=self.inliner)
File "/usr/lib/python3.8/site-packages/docutils/parsers/rst/states.py", line 170, in run
results = StateMachineWS.run(self, input_lines, input_offset,
File "/usr/lib/python3.8/site-packages/docutils/statemachine.py", line 239, in run
context, next_state, result = self.check_line(
File "/usr/lib/python3.8/site-packages/docutils/statemachine.py", line 451, in check_line
return method(match, context, next_state)
File "/usr/lib/python3.8/site-packages/docutils/parsers/rst/states.py", line 3008, in text
self.section(title.lstrip(), source, style, lineno + 1, messages)
File "/usr/lib/python3.8/site-packages/docutils/parsers/rst/states.py", line 327, in section
self.new_subsection(title, lineno, messages)
File "/usr/lib/python3.8/site-packages/docutils/parsers/rst/states.py", line 393, in new_subsection
newabsoffset = self.nested_parse(
File "/usr/lib/python3.8/site-packages/docutils/parsers/rst/states.py", line 281, in nested_parse
state_machine.run(block, input_offset, memo=self.memo,
File "/usr/lib/python3.8/site-packages/docutils/parsers/rst/states.py", line 196, in run
results = StateMachineWS.run(self, input_lines, input_offset)
File "/usr/lib/python3.8/site-packages/docutils/statemachine.py", line 239, in run
context, next_state, result = self.check_line(
File "/usr/lib/python3.8/site-packages/docutils/statemachine.py", line 451, in check_line
return method(match, context, next_state)
File "/usr/lib/python3.8/site-packages/docutils/parsers/rst/states.py", line 2344, in explicit_markup
self.explicit_list(blank_finish)
File "/usr/lib/python3.8/site-packages/docutils/parsers/rst/states.py", line 2369, in explicit_list
newline_offset, blank_finish = self.nested_list_parse(
File "/usr/lib/python3.8/site-packages/docutils/parsers/rst/states.py", line 318, in nested_list_parse
state_machine.run(block, input_offset, memo=self.memo,
File "/usr/lib/python3.8/site-packages/docutils/parsers/rst/states.py", line 196, in run
results = StateMachineWS.run(self, input_lines, input_offset)
File "/usr/lib/python3.8/site-packages/docutils/statemachine.py", line 239, in run
context, next_state, result = self.check_line(
File "/usr/lib/python3.8/site-packages/docutils/statemachine.py", line 451, in check_line
return method(match, context, next_state)
File "/usr/lib/python3.8/site-packages/docutils/parsers/rst/states.py", line 2647, in explicit_markup
nodelist, blank_finish = self.explicit_construct(match)
File "/usr/lib/python3.8/site-packages/docutils/parsers/rst/states.py", line 2354, in explicit_construct
return method(self, expmatch)
File "/usr/lib/python3.8/site-packages/docutils/parsers/rst/states.py", line 2096, in directive
return self.run_directive(
File "/usr/lib/python3.8/site-packages/docutils/parsers/rst/states.py", line 2146, in run_directive
result = directive_instance.run()
File "/usr/lib/python3.8/site-packages/sphinx_licenseinfo/__init__.py", line 99, in run
distro = get_distribution(self.options["py"])
File "/usr/lib/python3.8/site-packages/dist_meta/distributions.py", line 581, in get_distribution
raise DistributionNotFoundError(name)
dist_meta.distributions.DistributionNotFoundError: extras_require
Exception occurred:
File "/usr/lib/python3.8/site-packages/dist_meta/distributions.py", line 581, in get_distribution
raise DistributionNotFoundError(name)
dist_meta.distributions.DistributionNotFoundError: extras_require
The full traceback has been saved in /tmp/sphinx-err-6fln0ov6.log, if you want to report the issue to the developers.
Please also report this if it was a user error, so that a better error message can be provided next time.
A bug report can be filed in the tracker at <https://github.com/sphinx-doc/sphinx/issues>. Thanks!
Looks like here is wrong module name because it should be sphinxcontrib.extras_require
I'm not sure where that should be fixed 🤔
And at the end looks like pytest is failing
Gentle ping .. 🤔 Just retested 0.5.0 and looks like documentation build still fails.
https://github.com/sphinx-toolbox/sphinx-toolbox-experimental there is no yet first release and
sphinx-toolbox-experimental
is not refistered on pypi. It is a bit odd that released module is using another nit released yet module 😄Is that modulerelally needed to build
extras-require
documentation? If yes: are you going to make first release of thesphinx-toolbox-experimental
and register it on pypi?