Skip to content

Commit 05f562e

Browse files
committed
workaround pdm bug with dynamic versions
1 parent 6014bc7 commit 05f562e

3 files changed

Lines changed: 14 additions & 23 deletions

File tree

__version__.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
from __future__ import annotations
2+
3+
from json import loads
4+
from pathlib import Path
5+
6+
__version__ = loads((Path(__file__).parent / "lerna.json").read_text())["version"]

dynamic_info.py

Lines changed: 0 additions & 14 deletions
This file was deleted.

pyproject.toml

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,22 @@
11
[tool.pyprojectx]
2-
main = ["pdm"]
2+
main = ["pdm==2.11.2"]
33

44
[tool.pdm]
55
package-type = "library"
66

77
[tool.pdm.dev-dependencies]
88
dev = ["black>=23", "pylint>=3.0.0a7", "ruff>=0.0.290"]
99

10-
[tool.pdm.version]
11-
source = "call"
12-
getter = "dynamic_info:get_version"
13-
14-
[tool.pdm.description]
15-
source = "call"
16-
getter = "dynamic_info:get_description"
10+
# https://github.com/pdm-project/pdm/issues/2561
11+
# [tool.pdm.version]
12+
# source = "file"
13+
# path = "__version__.py"
1714

1815
[project]
1916
name = "basedpyright"
20-
dynamic = ["version", "description"]
17+
description = "static type checking for Python (but based)"
18+
version = "0.2.2"
19+
# dynamic = ["version"]
2120
authors = [
2221
{ name = "detachhead", email = "detachhead@users.noreply.github.com" },
2322
]

0 commit comments

Comments
 (0)