From 25f92182ca839ddb62d93638f5b8a6f358a9f0dc Mon Sep 17 00:00:00 2001 From: phlax Date: Sat, 13 Jan 2024 02:35:12 +0000 Subject: [PATCH] Remove Sphinx as a required dependency (#18) Signed-off-by: Ryan Northey Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com> --- .github/workflows/test.yml | 2 +- CHANGES | 7 +++++++ pyproject.toml | 7 ++++--- sphinxcontrib/htmlhelp/__init__.py | 1 + 4 files changed, 13 insertions(+), 4 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 794d170..8cd7db1 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -44,7 +44,7 @@ jobs: - name: Install dependencies run: | python -m pip install --upgrade pip - python -m pip install .[test] + python -m pip install .[test,standalone] - name: Test with pytest run: python -m pytest -vv --durations 25 diff --git a/CHANGES b/CHANGES index 5067364..2b24350 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,10 @@ +Release 2.0.5 (unreleased) +========================== + +* Remove Sphinx as a required dependency, as circular dependencies may cause + failure with package managers that expect a directed acyclic graph (DAG) + of dependencies. + Release 2.0.4 (2023-08-14) ========================== diff --git a/pyproject.toml b/pyproject.toml index d704e4e..fb933af 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -39,9 +39,7 @@ classifiers = [ "Topic :: Text Processing", "Topic :: Utilities", ] -dependencies = [ - "Sphinx>=5", -] +dependencies = [] dynamic = ["version"] [project.optional-dependencies] @@ -54,6 +52,9 @@ lint = [ "mypy", "docutils-stubs", ] +standalone = [ + "Sphinx>=5", +] [[project.authors]] name = "Georg Brandl" diff --git a/sphinxcontrib/htmlhelp/__init__.py b/sphinxcontrib/htmlhelp/__init__.py index 837e5ed..8c20239 100644 --- a/sphinxcontrib/htmlhelp/__init__.py +++ b/sphinxcontrib/htmlhelp/__init__.py @@ -296,6 +296,7 @@ def default_htmlhelp_basename(config: Config) -> str: def setup(app: Sphinx) -> dict[str, Any]: + app.require_sphinx('5.0') app.setup_extension('sphinx.builders.html') app.add_builder(HTMLHelpBuilder) app.add_message_catalog(__name__, path.join(package_dir, 'locales'))