diff --git a/.github/workflows/pythonpackage.yml b/.github/workflows/pythonpackage.yml index 6b89530c3..4ef741c36 100644 --- a/.github/workflows/pythonpackage.yml +++ b/.github/workflows/pythonpackage.yml @@ -100,5 +100,5 @@ jobs: - name: Documentation run: | - pip install -r doc/requirements.txt + pip install ".[doc]" make -C doc html diff --git a/.readthedocs.yaml b/.readthedocs.yaml index 0b83e20ea..9bce80fd2 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -32,4 +32,5 @@ python: install: - method: pip path: . - - requirements: doc/requirements.txt + extra_requirements: + - doc diff --git a/setup.py b/setup.py index 3f57e3327..143206653 100755 --- a/setup.py +++ b/setup.py @@ -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") @@ -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", diff --git a/tox.ini b/tox.ini index 6e02e5aee..dfcb5ed8f 100644 --- a/tox.ini +++ b/tox.ini @@ -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