File tree Expand file tree Collapse file tree 2 files changed +8
-20
lines changed
Expand file tree Collapse file tree 2 files changed +8
-20
lines changed Original file line number Diff line number Diff line change 44https://www.sphinx-doc.org/en/master/usage/configuration.html
55"""
66
7- from pathlib import Path
8-
9- try :
10- from tomllib import loads as toml_loads
11- except ImportError :
12- from toml import loads as toml_loads
13-
14- from api import __version__
15-
16- project_config = toml_loads (Path ("../../pyproject.toml" ).read_text ())
17- project : str = project_config ["project" ]["name" ]
18- release : str = __version__
19- REPO_LINK : str = project_config ["project" ]["urls" ]["repository" ]
20- copyright : str = project_config ["tool" ]["sphinx" ]["copyright" ] # noqa: A001
21- author : str = project_config ["tool" ]["sphinx" ]["author" ]
7+ from importlib .metadata import metadata
8+
9+ project_metadata = metadata ("api.letsbuilda.dev" )
10+ project : str = project_metadata ["Name" ]
11+ release : str = project_metadata ["Version" ]
12+ REPO_LINK : str = project_metadata ["Project-URL" ].replace ("repository, " , "" )
13+ copyright : str = "Let's build a ..." # noqa: A001
14+ author : str = "Let's build a ... community"
2215
2316# Add any Sphinx extension module names here, as strings. They can be
2417# extensions coming with Sphinx (named "sphinx.ext.*") or your custom
Original file line number Diff line number Diff line change @@ -35,7 +35,6 @@ docs = [
3535 " furo" ,
3636 " sphinx-autoapi" ,
3737 " releases" ,
38- " toml" ,
3938]
4039
4140[build-system ]
@@ -45,10 +44,6 @@ build-backend = "setuptools.build_meta"
4544[tool .setuptools .dynamic ]
4645version = { attr = " api.__version__" }
4746
48- [tool .sphinx ]
49- copyright = " Let's build a ..."
50- author = " Bradley Reynolds"
51-
5247[tool .black ]
5348target-version = [" py310" ]
5449line-length = 120
You can’t perform that action at this time.
0 commit comments