File tree Expand file tree Collapse file tree 2 files changed +11
-2
lines changed Expand file tree Collapse file tree 2 files changed +11
-2
lines changed Original file line number Diff line number Diff line change 40
40
# Use ``importlib.metadata.version`` as per
41
41
# https://setuptools-scm.readthedocs.io/en/latest/usage/#usage-from-sphinx.
42
42
version = importlib .metadata .version (distribution_name = project )
43
- _month , _day , _year , * _ = version .split (sep = "." )
44
- release = f"{ _month } .{ _day } .{ _year } "
43
+ # This method of getting the release from the version goes hand in hand with
44
+ # the ``post-release`` versioning scheme chosen in the ``setuptools-scm``
45
+ # configuration.
46
+ release = version .split (".post" )[0 ]
45
47
46
48
47
49
project_metadata = importlib .metadata .metadata (distribution_name = project )
Original file line number Diff line number Diff line change @@ -137,6 +137,13 @@ universal = true
137
137
# This must be a PEP 440 compliant version.
138
138
fallback_version = " 0.0.0"
139
139
140
+ # This keeps the start of the version the same as the last release.
141
+ # This is useful for our documentation to include e.g. binary links
142
+ # to the latest released binary.
143
+ #
144
+ # Code to match this is in ``conf.py``.
145
+ version_scheme = " post-release"
146
+
140
147
[tool .ruff ]
141
148
target-version = " py311"
142
149
You can’t perform that action at this time.
0 commit comments