@@ -41,14 +41,25 @@ homepage = "https://github.com/elapouya/python-docx-template"
4141repository = " https://github.com/elapouya/python-docx-template.git"
4242document = " https://docxtpl.readthedocs.org"
4343
44- [tool .pdm ]
45- version = {source =" file" , path =" docxtpl/__init__.py" }
46-
4744[tool .poetry ]
4845version = ' 0.0.0'
4946
50- [tool .poetry-plugin-version ]
47+ [tool .poetry .requires-plugins ]
48+ poetry-dynamic-versioning = { version = " >=1.0.0,<2.0.0" , extras = [" plugin" ] }
49+
50+ [tool .poetry-dynamic-versioning ]
51+ enable = true
52+
53+ [tool .poetry-dynamic-versioning .from-file ]
5154source = " docxtpl/__init__.py"
55+ pattern = ' __version__ = "(.+)"'
56+
57+ [tool .pdm .version ]
58+ source = " file"
59+ path = " docxtpl/__init__.py"
60+
61+ [tool .pdm .scripts ]
62+ style = " flake8 . --count --max-line-length=127 --show-source --statistics --exclude .venv,__pycache__"
5263
5364[tool .mypy ]
5465pretty = true
@@ -62,10 +73,5 @@ module = ["docxcompose.*"]
6273ignore_missing_imports = true
6374
6475[build-system ]
65- requires = [" pdm-backend" ]
66- build-backend = " pdm.backend"
67-
68- [tool .pdm .scripts ]
69- style = " flake8 . --count --max-line-length=127 --show-source --statistics --exclude .venv,__pycache__"
70- type = " mypy ."
71- check = {composite = [" style" , " type {args}" ]}
76+ requires = [" poetry-core" , " poetry-dynamic-versioning >=1.0.0,<2.0.0" ]
77+ build-backend = " poetry_dynamic_versioning.backend"
0 commit comments