Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Add a "doc" extra for documentation build dependencies
And use it in:

- GitHub Actions CI checks
- Read the Docs configuration
- tox (for the "html" environment)

(The tox "html" environment was not previously overriding "extras"
to empty it out of dependencies needed only for linting or testing,
so this happens to make `tox -e html` faster.)
  • Loading branch information
EliahKagan committed Mar 13, 2024
commit 74df5a8995b6f4e9ed053e126dda1cb6cfc465f5
2 changes: 1 addition & 1 deletion .github/workflows/pythonpackage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -100,5 +100,5 @@ jobs:

- name: Documentation
run: |
pip install -r doc/requirements.txt
pip install ".[doc]"
make -C doc html
3 changes: 2 additions & 1 deletion .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,5 @@ python:
install:
- method: pip
path: .
- requirements: doc/requirements.txt
extra_requirements:
- doc
6 changes: 5 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ def _read_content(path: str) -> str:
version = _read_content("VERSION").strip()
requirements = _read_content("requirements.txt").splitlines()
test_requirements = _read_content("test-requirements.txt").splitlines()
doc_requirements = _read_content("doc/requirements.txt").splitlines()
long_description = _read_content("README.md")


Expand Down Expand Up @@ -75,7 +76,10 @@ def _stamp_version(filename: str) -> None:
package_dir={"git": "git"},
python_requires=">=3.7",
install_requires=requirements,
extras_require={"test": test_requirements},
extras_require={
"test": test_requirements,
"doc": doc_requirements,
},
zip_safe=False,
long_description=long_description,
long_description_content_type="text/markdown",
Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ ignore_outcome = true
[testenv:html]
description = Build HTML documentation
base_python = py{39,310,311,312,38,37}
deps = -r doc/requirements.txt
extras = doc
allowlist_externals = make
commands =
make BUILDDIR={env_tmp_dir}/doc/build -C doc clean
Expand Down