File tree Expand file tree Collapse file tree 5 files changed +32
-12
lines changed
Expand file tree Collapse file tree 5 files changed +32
-12
lines changed Original file line number Diff line number Diff line change @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
55The format is based on [ Keep a Changelog] ( https://keepachangelog.com/en/1.0.0/ ) ,
66and this project adheres to [ Semantic Versioning] ( https://semver.org/spec/v2.0.0.html ) .
77
8+ ## [ Unreleased]
9+
10+ ### Changed
11+
12+ - Version and description of generated project is dynamic field of pyproject.toml
13+
814## [ 0.2.0] - 2025-03-26
915
1016### Added
Original file line number Diff line number Diff line change 11[project]
22name = "{{ project_slug }}"
3- version = "0.1.0"
43readme = "README.md"
5- description = "{{ description }}"
4+ dynamic = ["version", " description"]
65dependencies = [
76 "beautifulsoup4>=4.13.3",
87 "sphinx>=8.0",
@@ -36,5 +35,5 @@ dev = [
3635sample-docs = { path = "{{ sample_docs_slug }}", editable = true }
3736
3837[build-system]
39- requires = ["flit_core >=3.2 ,<4"]
38+ requires = ["flit_core >=3.12 ,<4"]
4039build-backend = "flit_core.buildapi"
Original file line number Diff line number Diff line change 11"""
2- Register theme with Sphinx.
2+ {{ description }}
33"""
44
5+ __version__ = "0.1.0"
6+
7+
58from pathlib import Path
69
710from sphinx.application import Sphinx
11+ from sphinx.util.typing import ExtensionMetadata
812
913THEME_NAME = "{{ project_slug }}"
1014
1115
12- def setup(app: Sphinx) -> dict[str, bool] :
16+ def setup(app: Sphinx) -> ExtensionMetadata :
1317 """Setup the Sphinx application."""
1418 theme_path = str(Path(__file__).parent.resolve())
1519 app.add_html_theme(THEME_NAME, theme_path)
1620
17- return {"parallel_read_safe": True, "parallel_write_safe": True}
21+ return {
22+ "parallel_read_safe": True,
23+ "parallel_write_safe": True,
24+ "version": __version__,
25+ }
Original file line number Diff line number Diff line change 11[project ]
22name = " sphinx_foo_theme"
3- version = " 0.1.0"
43readme = " README.md"
5- description = " Foo but full-bar theme. "
4+ dynamic = [ " version " , " description " ]
65dependencies = [
76 " beautifulsoup4>=4.13.3" ,
87 " sphinx>=8.0" ,
@@ -36,5 +35,5 @@ dev = [
3635sample-docs = { path = " sample_docs" , editable = true }
3736
3837[build-system ]
39- requires = [" flit_core >=3.2 ,<4" ]
38+ requires = [" flit_core >=3.12 ,<4" ]
4039build-backend = " flit_core.buildapi"
Original file line number Diff line number Diff line change 11"""
2- Register theme with Sphinx .
2+ Foo but full-bar theme .
33"""
44
5+ __version__ = "0.1.0"
6+
7+
58from pathlib import Path
69
710from sphinx .application import Sphinx
11+ from sphinx .util .typing import ExtensionMetadata
812
913THEME_NAME = "sphinx_foo_theme"
1014
1115
12- def setup (app : Sphinx ) -> dict [ str , bool ] :
16+ def setup (app : Sphinx ) -> ExtensionMetadata :
1317 """Setup the Sphinx application."""
1418 theme_path = str (Path (__file__ ).parent .resolve ())
1519 app .add_html_theme (THEME_NAME , theme_path )
1620
17- return {"parallel_read_safe" : True , "parallel_write_safe" : True }
21+ return {
22+ "parallel_read_safe" : True ,
23+ "parallel_write_safe" : True ,
24+ "version" : __version__ ,
25+ }
You can’t perform that action at this time.
0 commit comments