Use poetry-dynamic-versioning instead of pdm

This commit is contained in:
Waket Zheng 2025-09-24 12:25:32 +08:00
parent e77cbf8c7b
commit 560b4b3311

View File

@ -44,8 +44,15 @@ document = "https://docxtpl.readthedocs.org"
[tool.poetry] [tool.poetry]
version = "0.0.0" version = "0.0.0"
[tool.poetry-plugin-version] [tool.poetry.requires-plugins]
poetry-dynamic-versioning = { version = ">=1.0.0,<2.0.0", extras = ["plugin"] }
[tool.poetry-dynamic-versioning]
enable = true
[tool.poetry-dynamic-versioning.from-file]
source = "docxtpl/__init__.py" source = "docxtpl/__init__.py"
pattern = '__version__ = "(.+)"'
[tool.mypy] [tool.mypy]
pretty = true pretty = true
@ -58,9 +65,6 @@ exclude = ["docs", "build", "setup.py"]
module = ["docxcompose.*"] module = ["docxcompose.*"]
ignore_missing_imports = true ignore_missing_imports = true
[tool.pdm]
version = {source="file", path="docxtpl/__init__.py"}
[build-system] [build-system]
requires = ["pdm-backend"] requires = ["poetry-core", "poetry-dynamic-versioning >=1.0.0,<2.0.0"]
build-backend = "pdm.backend" build-backend = "poetry_dynamic_versioning.backend"