mirror of https://github.com/pypa/pip
Enable parallelism in Sphinx
This commit is contained in:
parent
88eb4f092e
commit
92862e28ec
|
@ -5,7 +5,7 @@ import pathlib
|
||||||
import re
|
import re
|
||||||
import sys
|
import sys
|
||||||
from textwrap import dedent
|
from textwrap import dedent
|
||||||
from typing import Iterable, Iterator, List, Optional
|
from typing import Dict, Iterable, Iterator, List, Optional, Union
|
||||||
|
|
||||||
from docutils import nodes, statemachine
|
from docutils import nodes, statemachine
|
||||||
from docutils.parsers import rst
|
from docutils.parsers import rst
|
||||||
|
@ -293,7 +293,7 @@ class PipCLIDirective(rst.Directive):
|
||||||
return [node]
|
return [node]
|
||||||
|
|
||||||
|
|
||||||
def setup(app: Sphinx) -> None:
|
def setup(app: Sphinx) -> Dict[str, Union[bool, str]]:
|
||||||
app.add_directive("pip-command-usage", PipCommandUsage)
|
app.add_directive("pip-command-usage", PipCommandUsage)
|
||||||
app.add_directive("pip-command-description", PipCommandDescription)
|
app.add_directive("pip-command-description", PipCommandDescription)
|
||||||
app.add_directive("pip-command-options", PipCommandOptions)
|
app.add_directive("pip-command-options", PipCommandOptions)
|
||||||
|
@ -304,3 +304,7 @@ def setup(app: Sphinx) -> None:
|
||||||
)
|
)
|
||||||
app.add_directive("pip-news-include", PipNewsInclude)
|
app.add_directive("pip-news-include", PipNewsInclude)
|
||||||
app.add_directive("pip-cli", PipCLIDirective)
|
app.add_directive("pip-cli", PipCLIDirective)
|
||||||
|
return {
|
||||||
|
"parallel_read_safe": True,
|
||||||
|
"parallel_write_safe": True,
|
||||||
|
}
|
||||||
|
|
4
tox.ini
4
tox.ini
|
@ -51,12 +51,12 @@ setenv =
|
||||||
deps = -r{toxinidir}/tools/requirements/docs.txt
|
deps = -r{toxinidir}/tools/requirements/docs.txt
|
||||||
basepython = python3
|
basepython = python3
|
||||||
commands =
|
commands =
|
||||||
sphinx-build -W -d {envtmpdir}/doctrees/html -b html docs/html docs/build/html
|
sphinx-build -W -j auto -d {envtmpdir}/doctrees/html -b html docs/html docs/build/html
|
||||||
# Having the conf.py in the docs/html is weird but needed because we
|
# Having the conf.py in the docs/html is weird but needed because we
|
||||||
# can not use a different configuration directory vs source directory on RTD
|
# can not use a different configuration directory vs source directory on RTD
|
||||||
# currently -- https://github.com/rtfd/readthedocs.org/issues/1543.
|
# currently -- https://github.com/rtfd/readthedocs.org/issues/1543.
|
||||||
# That is why we have a "-c docs/html" in the next line.
|
# That is why we have a "-c docs/html" in the next line.
|
||||||
sphinx-build -W -d {envtmpdir}/doctrees/man -b man docs/man docs/build/man -c docs/html
|
sphinx-build -W -j auto -d {envtmpdir}/doctrees/man -b man docs/man docs/build/man -c docs/html
|
||||||
|
|
||||||
[testenv:lint]
|
[testenv:lint]
|
||||||
skip_install = True
|
skip_install = True
|
||||||
|
|
Loading…
Reference in New Issue