|
| 1 | +import json |
| 2 | + |
1 | 3 | extensions = [ |
2 | 4 | 'notfound.extension', |
3 | 5 | 'sphinx.ext.extlinks', |
|
109 | 111 | # Advanced Tools was renamed Development Tools in gh-1149 |
110 | 112 | "advanced-tools/clang.rst": "development-tools/clang.rst", |
111 | 113 | "advanced-tools/gdb.rst": "development-tools/gdb.rst", |
112 | | - # Core Developers |
113 | | - "coredev.rst": "core-developers/become-core-developer.rst", |
114 | | - "committing.rst": "core-developers/committing.rst", |
115 | | - "developers.rst": "core-developers/developer-log.rst", |
116 | | - "experts.rst": "core-developers/experts.rst", |
117 | | - "motivations.rst": "core-developers/motivations.rst", |
| 114 | + # Core team |
| 115 | + "coredev.rst": "core-team/join-team.rst", |
| 116 | + "committing.rst": "core-team/committing.rst", |
| 117 | + "developers.rst": "core-team/team-log.rst", |
| 118 | + "experts.rst": "core-team/experts.rst", |
| 119 | + "motivations.rst": "core-team/motivations.rst", |
| 120 | + # core-developers/ -> core-team/ |
| 121 | + "core-developers/become-core-developer.rst": "core-team/join-team.rst", |
| 122 | + "core-developers/committing.rst": "core-team/committing.rst", |
| 123 | + "core-developers/developer-log.rst": "core-team/team-log.rst", |
| 124 | + "core-developers/experts.rst": "core-team/experts.rst", |
| 125 | + "core-developers/index.rst": "core-team/index.rst", |
| 126 | + "core-developers/memorialization.rst": "core-team/memorialization.rst", |
| 127 | + "core-developers/motivations.rst": "core-team/motivations.rst", |
| 128 | + "core-developers/responsibilities.rst": "core-team/responsibilities.rst", |
118 | 129 | # Developer Workflow |
119 | 130 | "c-api.rst": "developer-workflow/c-api.rst", |
120 | 131 | "communication.rst": "developer-workflow/communication-channels.rst", |
|
165 | 176 | # sphinx-notfound-page |
166 | 177 | notfound_urls_prefix = "/" |
167 | 178 |
|
| 179 | +# Dynamically expose the Python version associated with the "main" branch. |
| 180 | +# Exactly one entry in ``release-cycle.json`` should have ``"branch": "main"``. |
| 181 | +with open("include/release-cycle.json", encoding="UTF-8") as _f: |
| 182 | + _cycle = json.load(_f) |
| 183 | + |
| 184 | +_main_version = next( |
| 185 | + version for version, data in _cycle.items() if data.get("branch") == "main" |
| 186 | +) |
| 187 | + |
168 | 188 | # prolog and epilogs |
169 | | -rst_prolog = """ |
| 189 | +rst_prolog = f""" |
170 | 190 | .. |draft| replace:: |
171 | 191 | This is part of a **Draft** of the Python Contributor's Guide. |
172 | 192 | Text in square brackets are notes about content to fill in. |
|
183 | 203 |
|
184 | 204 | .. _Refactoring the DevGuide: https://discuss.python.org/t/refactoring-the-devguide-into-a-contribution-guide/63409 |
185 | 205 |
|
| 206 | +.. |main_version| replace:: {_main_version} |
| 207 | +
|
186 | 208 | """ |
187 | 209 |
|
188 | 210 | # sphinx.ext.extlinks |
|
0 commit comments