1
1
Fork 0
mirror of https://github.com/pypa/pip synced 2023-12-13 21:30:23 +01:00

Merge pull request #9820 from webknjaz/docs/sphinx-parallelism

Enable parallelism in Sphinx
This commit is contained in:
Pradyun Gedam 2021-04-20 21:38:26 +01:00 committed by GitHub
commit 9ae842b0dc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 4 deletions

View file

@ -5,7 +5,7 @@ import pathlib
import re
import sys
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.parsers import rst
@ -293,7 +293,7 @@ class PipCLIDirective(rst.Directive):
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-description", PipCommandDescription)
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-cli", PipCLIDirective)
return {
"parallel_read_safe": True,
"parallel_write_safe": True,
}

View file

@ -51,12 +51,12 @@ setenv =
deps = -r{toxinidir}/tools/requirements/docs.txt
basepython = python3
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
# can not use a different configuration directory vs source directory on RTD
# currently -- https://github.com/rtfd/readthedocs.org/issues/1543.
# 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]
skip_install = True