Skip to content

Commit 775a08b

Browse files
committed
Add a "doc" extra for documentation build dependencies
And use it in CI checks and in the Read the Docs configuration.
1 parent 26dccd7 commit 775a08b

File tree

3 files changed

+8
-3
lines changed

3 files changed

+8
-3
lines changed

.github/workflows/pythonpackage.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -100,5 +100,5 @@ jobs:
100100

101101
- name: Documentation
102102
run: |
103-
pip install -r doc/requirements.txt
103+
pip install ".[doc]"
104104
make -C doc html

.readthedocs.yaml

+2-1
Original file line numberDiff line numberDiff line change
@@ -32,4 +32,5 @@ python:
3232
install:
3333
- method: pip
3434
path: .
35-
- requirements: doc/requirements.txt
35+
extra-requirements:
36+
- doc

setup.py

+5-1
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ def _read_content(path: str) -> str:
1717
version = _read_content("VERSION").strip()
1818
requirements = _read_content("requirements.txt").splitlines()
1919
test_requirements = _read_content("test-requirements.txt").splitlines()
20+
doc_requirements = _read_content("doc/requirements.txt").splitlines()
2021
long_description = _read_content("README.md")
2122

2223

@@ -75,7 +76,10 @@ def _stamp_version(filename: str) -> None:
7576
package_dir={"git": "git"},
7677
python_requires=">=3.7",
7778
install_requires=requirements,
78-
extras_require={"test": test_requirements},
79+
extras_require={
80+
"test": test_requirements,
81+
"doc": doc_requirements,
82+
},
7983
zip_safe=False,
8084
long_description=long_description,
8185
long_description_content_type="text/markdown",

0 commit comments

Comments
 (0)