From a9b6488dacada2cd37329def9b448f09757424c7 Mon Sep 17 00:00:00 2001 From: Hugo Osvaldo Barrera Date: Sat, 20 Sep 2025 13:17:56 +0200 Subject: [PATCH] Merge docs-requirements.txt into pyproject.toml Keep requirements definitions all in one place. --- .readthedocs.yaml | 3 ++- Makefile | 4 ++-- docs-requirements.txt | 4 ---- docs/packaging.rst | 7 ++++--- pyproject.toml | 5 +++++ 5 files changed, 13 insertions(+), 10 deletions(-) delete mode 100644 docs-requirements.txt diff --git a/.readthedocs.yaml b/.readthedocs.yaml index 38c57d4..f7c15d2 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -12,4 +12,5 @@ python: install: - method: pip path: . - - requirements: docs-requirements.txt + extra_requirements: + - docs diff --git a/Makefile b/Makefile index 2ab8435..35f0ba9 100644 --- a/Makefile +++ b/Makefile @@ -49,8 +49,8 @@ release-deb: install-dev: pip install -U pip setuptools wheel - pip install -e '.[test]' - pip install -U -r docs-requirements.txt pre-commit + pip install -e '.[test,docs]' + pip install -U pre-commit set -xe && if [ "$(REQUIREMENTS)" = "minimal" ]; then \ pip install pyproject-dependencies && \ pip install -U --force-reinstall $$(pyproject-dependencies . | sed 's/>/=/'); \ diff --git a/docs-requirements.txt b/docs-requirements.txt deleted file mode 100644 index 72fad69..0000000 --- a/docs-requirements.txt +++ /dev/null @@ -1,4 +0,0 @@ -# This file is used by readthedocs.org -sphinx != 1.4.7 -sphinx_rtd_theme -setuptools_scm diff --git a/docs/packaging.rst b/docs/packaging.rst index 301d505..c8d7c8b 100644 --- a/docs/packaging.rst +++ b/docs/packaging.rst @@ -74,10 +74,11 @@ Using Sphinx_ you can generate the documentation you're reading right now in a variety of formats, such as HTML, PDF, or even as a manpage. That said, I only take care of the HTML docs' formatting. -You can find a list of dependencies in ``docs-requirements.txt``. Again, you -can install those using pip with:: +You can find a list of dependencies in ``pyproject.toml``, in the +``project.optional-dependencies`` section as ``docs``. Again, you can install +those using pip with:: - pip install -r docs-requirements.txt + pip install '.[docs]' Then change into the ``docs/`` directory and build whatever format you want using the ``Makefile`` in there (run ``make`` for the formats you can build). diff --git a/pyproject.toml b/pyproject.toml index e7caade..0345da4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -53,6 +53,11 @@ test = [ "pytest-asyncio", "aioresponses", ] +docs = [ + "sphinx!=1.4.7", + "sphinx_rtd_theme", + "setuptools_scm", +] [project.scripts] vdirsyncer = "vdirsyncer.cli:app"