Add functionality to retrieve the "version" for the installed package.
Add this to the PACKAGE-level __init__.py
import importlib.metadata
try:
__version__ = importlib.metadata.version("PACKAGE")
except importlib.metadata.PackageNotFoundError:
__version__ = "0.0.0"
This pulls the version number from the pyproject.toml, so it's consistent with that used for a given release. If it's read from source (e.g. in development state), it falls back to "0.0.0"
Add functionality to retrieve the "version" for the installed package.
Add this to the PACKAGE-level
__init__.pyThis pulls the
versionnumber from thepyproject.toml, so it's consistent with that used for a given release. If it's read from source (e.g. in development state), it falls back to "0.0.0"