24
24
"common-wheels" : "tests/data/common_wheels" ,
25
25
"protected-pip" : "tools/protected_pip.py" ,
26
26
}
27
- REQUIREMENTS = {
28
- "docs" : "docs/requirements.txt" ,
29
- }
30
27
31
28
AUTHORS_FILE = "AUTHORS.txt"
32
29
VERSION_FILE = "src/pip/__init__.py"
@@ -132,7 +129,7 @@ def test(session: nox.Session) -> None:
132
129
133
130
@nox .session
134
131
def docs (session : nox .Session ) -> None :
135
- session .install ("-r " , REQUIREMENTS [ "docs" ] )
132
+ session .install ("--group " , "docs" )
136
133
137
134
def get_sphinx_build_command (kind : str ) -> list [str ]:
138
135
# 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]:
161
158
162
159
@nox .session (name = "docs-live" )
163
160
def docs_live (session : nox .Session ) -> None :
164
- session .install ("-r " , REQUIREMENTS [ "docs" ] , "sphinx-autobuild" )
161
+ session .install ("--group " , "docs" , "sphinx-autobuild" )
165
162
166
163
session .run (
167
164
"sphinx-autobuild" ,
@@ -176,15 +173,12 @@ def docs_live(session: nox.Session) -> None:
176
173
177
174
@nox .session
178
175
def typecheck (session : nox .Session ) -> None :
179
- session .install (
180
- "mypy" ,
181
- "keyring" ,
182
- "nox" ,
183
- "pytest" ,
184
- "types-docutils" ,
185
- "types-setuptools" ,
186
- "types-freezegun" ,
187
- "types-pyyaml" ,
176
+ # Install test and test-types dependency groups
177
+ run_with_protected_pip (
178
+ session ,
179
+ "install" ,
180
+ "--group" ,
181
+ "type-check" ,
188
182
)
189
183
190
184
session .run (
@@ -290,7 +284,7 @@ def coverage(session: nox.Session) -> None:
290
284
run_with_protected_pip (session , "install" , "." )
291
285
292
286
# Install test dependencies
293
- run_with_protected_pip (session , "install" , "-r " , REQUIREMENTS [ "tests" ] )
287
+ run_with_protected_pip (session , "install" , "--group " , "docs" )
294
288
295
289
if not os .path .exists (".coverage-output" ):
296
290
os .mkdir (".coverage-output" )
0 commit comments