Skip to content

Commit 715f1ea

Browse files
authored
👷 Switch to dynamic versioning with pdm build system (#19)
1 parent bba5142 commit 715f1ea

File tree

2 files changed

+13
-12
lines changed

2 files changed

+13
-12
lines changed

pyproject.toml

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "annotated-doc"
3-
version = "0.0.3"
3+
dynamic = ["version"]
44
license = "MIT"
55
license-files = ["LICENSE"]
66
description = "Document parameters, class attributes, return types, and variables inline, with Annotated."
@@ -23,7 +23,6 @@ classifiers = [
2323
"Typing :: Typed",
2424
"Development Status :: 4 - Beta",
2525
"Intended Audience :: Developers",
26-
"License :: OSI Approved :: MIT License",
2726
"Programming Language :: Python :: 3 :: Only",
2827
"Programming Language :: Python :: 3.8",
2928
"Programming Language :: Python :: 3.9",
@@ -42,8 +41,8 @@ Issues = "https://github.com/fastapi/annotated-doc/issues"
4241
Changelog = "https://github.com/fastapi/annotated-doc/release-notes.md"
4342

4443
[build-system]
45-
requires = ["uv_build>=0.9.1,<0.10.0"]
46-
build-backend = "uv_build"
44+
requires = ["pdm-backend"]
45+
build-backend = "pdm.backend"
4746

4847
[tool.mypy]
4948
strict = true
@@ -95,9 +94,13 @@ ignore = [
9594
# Preserve types, even if a file imports `from __future__ import annotations`.
9695
keep-runtime-typing = true
9796

98-
[tool.uv.build-backend]
99-
source-include = [
100-
"tests/**",
97+
[tool.pdm]
98+
version = { source = "file", path = "src/annotated_doc/__init__.py" }
99+
distribution = true
100+
101+
[tool.pdm.build]
102+
source-includes = [
103+
"tests/",
101104
"requirements*.txt",
102-
"scripts/**",
103-
]
105+
"scripts/",
106+
]

src/annotated_doc/__init__.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
from importlib.metadata import version
2-
31
from .main import Doc as Doc
42

5-
__version__ = version("annotated-doc")
3+
__version__ = "0.0.3"

0 commit comments

Comments
 (0)