1
1
# SPDX-License-Identifier: MIT
2
2
3
3
[build-system ]
4
- requires = [" hatchling" , " versioningit>=3.3.0" ]
4
+ requires = [" hatchling" , " versioningit>=3.3.0,<4.0 " , " packaging " ]
5
5
build-backend = " hatchling.build"
6
6
7
7
[project ]
@@ -127,6 +127,11 @@ include = [
127
127
]
128
128
artifacts = [" disnake/_version.py" ]
129
129
130
+ [tool .hatch .build .targets .sdist ]
131
+ include = [
132
+ " scripts/versioning.py"
133
+ ]
134
+
130
135
[tool .hatch .version ]
131
136
source = " versioningit"
132
137
@@ -142,9 +147,8 @@ distance = "{base_version}+{distance}.{vcs}{rev}"
142
147
dirty = " {base_version}+d{build_date:%Y%m%d}"
143
148
distance-dirty = " {base_version}.a{distance}+{vcs}{rev}.d{build_date:%Y%m%d}"
144
149
145
- [tool .versioningit .template-fields .version-tuple ]
146
- split-on = ' ^(\d+)\.(\d+)\.(\d+)\.([a-zA-Z])(\d+)(?:.\d+)?'
147
-
150
+ [tool .versioningit .template-fields ]
151
+ method = { module = " scripts.versioning" , value = " template_fields" }
148
152
149
153
[tool .versioningit .write ]
150
154
file = " disnake/_version.py"
@@ -163,11 +167,7 @@ class VersionInfo(NamedTuple):
163
167
releaselevel: Literal["alpha", "beta", "candidate", "final"]
164
168
serial: int
165
169
166
-
167
- # fmt: off
168
- version_info: VersionInfo = VersionInfo(*{version_tuple}[:5])
169
- # fmt: on
170
-
170
+ version_info: VersionInfo = VersionInfo{version_tuple}
171
171
"""
172
172
173
173
[tool .ruff ]
@@ -441,24 +441,3 @@ exclude_lines = [
441
441
" ^\\ s*raise NotImplementedError$" ,
442
442
" ^\\ s*\\ .\\ .\\ .$" ,
443
443
]
444
-
445
-
446
- [tool .check-manifest ]
447
- ignore = [
448
- # CI
449
- " .pre-commit-config.yaml" ,
450
- " .readthedocs.yml" ,
451
- " .libcst.codemod.yaml" ,
452
- " noxfile.py" ,
453
- # docs
454
- " CONTRIBUTING.md" ,
455
- " RELEASE.md" ,
456
- " assets/**" ,
457
- " changelog/**" ,
458
- " docs/**" ,
459
- " examples/**" ,
460
- # tests
461
- " test_bot/**" ,
462
- " tests/**" ,
463
- " scripts/**" ,
464
- ]
0 commit comments