|
70 | 70 | # from arcade.version import VERSION
|
71 | 71 | # or read the docs build will fail.
|
72 | 72 | from version import VERSION # pyright: ignore [reportMissingImports]
|
73 |
| -log.info(f" Got raw version {VERSION=!r}") |
74 |
| - |
75 |
| - |
76 |
| -def nice_version(version_string: str) -> str: |
77 |
| - """Format raw VERSION by removing leading zeroes. |
78 |
| -
|
79 |
| - When importing VERSION, Python defaults to formatting it as |
80 |
| - 3.00 as of February 2025. |
81 |
| - """ |
82 |
| - out = [] |
83 |
| - for part in version_string.split('.'): |
84 |
| - try: |
85 |
| - out.append(str(int(part))) |
86 |
| - except ValueError as _: |
87 |
| - out.append(part) |
88 |
| - return '.'.join(out) |
89 |
| - |
90 |
| - |
91 |
| -# pending: 3.0.1 or 3.1 release? |
92 |
| -# Maintain title bar continuity for live doc showing 3.0 as the version |
93 |
| -VERSION_SPECIAL_CASES = {'3.0.0': '3.0'} |
94 |
| - |
95 |
| - |
96 |
| -def _specialcase_version(nice: str) -> str: |
97 |
| - if nice in VERSION_SPECIAL_CASES: |
98 |
| - new = VERSION_SPECIAL_CASES[nice] |
99 |
| - log.info(f" Special-casing version {nice!r} to {new!r}") |
100 |
| - else: |
101 |
| - new = nice |
102 |
| - return new |
103 |
| - |
104 |
| - |
105 |
| -NICE_VERSION = _specialcase_version(nice_version(VERSION)) |
106 |
| -# pending: end |
107 |
| - |
108 |
| -log.info(f" Got nice version {NICE_VERSION=!r}") |
| 73 | +log.info(f" Got version {VERSION=!r}") |
109 | 74 |
|
110 | 75 |
|
111 | 76 | print()
|
@@ -261,9 +226,9 @@ def run_util(filename, run_name="__main__", init_globals=None):
|
261 | 226 | # built documents.
|
262 | 227 | #
|
263 | 228 | # The short X.Y version.
|
264 |
| -version = NICE_VERSION |
| 229 | +version = VERSION |
265 | 230 | # The full version, including alpha/beta/rc tags.
|
266 |
| -release = NICE_VERSION |
| 231 | +release = VERSION |
267 | 232 |
|
268 | 233 | # The language for content autogenerated by Sphinx. Refer to documentation
|
269 | 234 | # for a list of supported languages.
|
|
0 commit comments