Replies: 3 comments 6 replies
-
Dynamic versions: https://pdm.fming.dev/latest/pyproject/pep621/#determine-the-package-version-dynamically You can inspect the version in Python via: import importlib.metadata
version = importlib.metadata.version(package_name) |
Beta Was this translation helpful? Give feedback.
-
It would be helpful to have the |
Beta Was this translation helpful? Give feedback.
-
hey there @frostming - that link above returns a really odd redirect issue that never resolves - if there a new working link? ![]() Many thanks, |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
I am new to pdm. I am trying to convert a distutils/setup.py based project to pdm.
I would like to be able to specify the version (e.g.
1.0
) manually in the pyproject.toml file and when I build the project usingpdm build
aversion.py
should be generated/packaged that also includes the commit hash, similar to whatsetuptools_scm
is doing, e.g.During application runtime I want to read the version.py file and be able to display/log/evaluate the version.
How can I achieve this with pdm?
Beta Was this translation helpful? Give feedback.
All reactions