Skip to content

Commit b179f73

Browse files
committed
Switch docs dependencies to a dependency group
1 parent a2ec40d commit b179f73

File tree

3 files changed

+16
-20
lines changed

3 files changed

+16
-20
lines changed

docs/requirements.txt

Lines changed: 0 additions & 14 deletions
This file was deleted.

noxfile.py

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,6 @@
2424
"common-wheels": "tests/data/common_wheels",
2525
"protected-pip": "tools/protected_pip.py",
2626
}
27-
REQUIREMENTS = {
28-
"docs": "docs/requirements.txt",
29-
}
3027

3128
AUTHORS_FILE = "AUTHORS.txt"
3229
VERSION_FILE = "src/pip/__init__.py"
@@ -132,7 +129,7 @@ def test(session: nox.Session) -> None:
132129

133130
@nox.session
134131
def docs(session: nox.Session) -> None:
135-
session.install("-r", REQUIREMENTS["docs"])
132+
session.install("--group", "docs")
136133

137134
def get_sphinx_build_command(kind: str) -> list[str]:
138135
# Having the conf.py in the docs/html is weird but needed because we
@@ -161,7 +158,7 @@ def get_sphinx_build_command(kind: str) -> list[str]:
161158

162159
@nox.session(name="docs-live")
163160
def docs_live(session: nox.Session) -> None:
164-
session.install("-r", REQUIREMENTS["docs"], "sphinx-autobuild")
161+
session.install("--group", "docs", "sphinx-autobuild")
165162

166163
session.run(
167164
"sphinx-autobuild",
@@ -267,7 +264,7 @@ def coverage(session: nox.Session) -> None:
267264
run_with_protected_pip(session, "install", ".")
268265

269266
# Install test dependencies
270-
run_with_protected_pip(session, "install", "-r", REQUIREMENTS["tests"])
267+
run_with_protected_pip(session, "install", "--group", "tests")
271268

272269
if not os.path.exists(".coverage-output"):
273270
os.mkdir(".coverage-output")

pyproject.toml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,19 @@ test-common-wheels = [
8383
"pytest-subket >= 0.8.1",
8484
]
8585

86+
docs = [
87+
"sphinx ~= 7.0",
88+
# currently incompatible with sphinxcontrib-towncrier
89+
# https://github.com/sphinx-contrib/sphinxcontrib-towncrier/issues/92
90+
"towncrier < 24",
91+
"furo",
92+
"myst_parser",
93+
"sphinx-copybutton",
94+
"sphinx-inline-tabs",
95+
"sphinxcontrib-towncrier >= 0.2.0a0",
96+
"sphinx-issues",
97+
]
98+
8699
[tool.flit.sdist]
87100
include = [
88101
"NEWS.rst",

0 commit comments

Comments
 (0)