Skip to content

Commit 574d282

Browse files
Merge pull request #1257 from VWS-Python/sphinx-pyproject-toml-2
Use sphinx-pyproject to remove duplication
2 parents f501ebe + 12d7251 commit 574d282

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

docs/source/conf.py

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,19 @@
44
"""
55

66
import importlib.metadata
7+
from pathlib import Path
78

89
from packaging.specifiers import SpecifierSet
10+
from sphinx_pyproject import SphinxConfig
911

10-
project = "VWS-Auth-Tools"
11-
author = "Adam Dangoor"
12+
_pyproject_file = Path(__file__).parent.parent.parent / "pyproject.toml"
13+
_pyproject_config = SphinxConfig(
14+
pyproject_file=_pyproject_file,
15+
config_overrides={"version": None},
16+
)
17+
18+
project = _pyproject_config.name
19+
author = _pyproject_config.author
1220

1321
extensions = [
1422
"sphinx_copybutton",

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ optional-dependencies.dev = [
6464
"sphinx==8.2.0",
6565
"sphinx-copybutton==0.5.2",
6666
"sphinx-lint==1.0.0",
67+
"sphinx-pyproject==0.3.0",
6768
"sphinx-substitution-extensions==2025.2.19",
6869
"sphinxcontrib-spelling==8.0.1",
6970
"sybil==9.1.0",

0 commit comments

Comments
 (0)