From efe0c6963b915dd05c039184df014ecfc2d18646 Mon Sep 17 00:00:00 2001 From: Ariel Rin Date: Sat, 7 Oct 2023 20:45:39 +1000 Subject: [PATCH] move doc dependencies to pyproject --- .readthedocs.yml | 5 ++++- docs/requirements.txt | 20 -------------------- pyproject.toml | 9 +++++++++ tox.ini | 2 +- 4 files changed, 14 insertions(+), 22 deletions(-) delete mode 100644 docs/requirements.txt diff --git a/.readthedocs.yml b/.readthedocs.yml index 936dbfe8..b43ec923 100644 --- a/.readthedocs.yml +++ b/.readthedocs.yml @@ -23,4 +23,7 @@ formats: all # Optionally set the version of Python and requirements required to build your docs python: install: - - requirements: docs/requirements.txt + - method: pip + path: . + extra_requirements: + - docs diff --git a/docs/requirements.txt b/docs/requirements.txt deleted file mode 100644 index fc8d395c..00000000 --- a/docs/requirements.txt +++ /dev/null @@ -1,20 +0,0 @@ -# Docs Specific Packages -sphinx>=4.4.0,<5.0.0 -sphinx_rtd_theme>=1.0.0,<2.0.0 -recommonmark==0.7.1 -Jinja2<3.1 -docutils==0.16 -sphinxcontrib-django2 -sphinx-copybutton - -# Autodoc dependencies -celery>=5.2.0,<6.0.0 -celery_once>=3.0.1 -django>=4.0.6,<4.1.0 -django-bootstrap-form -django-celery-beat>=2.3.0 -django-esi>=4.0.1 -django-redis>=5.2.0,<6.0.0 -django-sortedm2m -passlib -redis>=4.0.0,<5.0.0 diff --git a/pyproject.toml b/pyproject.toml index db5b176f..8297248c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -62,6 +62,15 @@ test = [ "django-webtest", "requests-mock>=1.2.0", ] +docs = [ + "sphinx>=4.4.0,<5.0.0", + "sphinx_rtd_theme>=1.0.0,<2.0.0", + "recommonmark==0.7.1", + "Jinja2<3.1", + "docutils==0.16", + "sphinxcontrib-django2", + "sphinx-copybutton" +] [project.scripts] allianceauth = "allianceauth.bin.allianceauth:main" diff --git a/tox.ini b/tox.ini index ffa34e52..512345d1 100644 --- a/tox.ini +++ b/tox.ini @@ -28,7 +28,7 @@ commands = description = invoke sphinx-build to build the HTML docs basepython = python3.11 skip_install = True -deps = -r{toxinidir}/docs/requirements.txt +deps = .[docs] install_command = python -I -m pip install {opts} {packages} commands = sphinx-build -T -E -b html -d "{toxworkdir}/docs_doctree" -D language=en docs "{toxworkdir}/docs_out" {posargs}