In GitLab by @je-cook on Jul 29, 2021, 09:20
Summary
It isn't possible (as far as I can work out) to extract process version information using the python API.
Currently at compile time version info is stored in the preprocessor variable tagno.
At the moment __version__ isn't defined in the python API (my first port of call) and it is possible to get version info out of pip with pip show process but not in just python.
A possible option is to use something like versioneer which could be very much overkill with the suggested snippit in __init__.py:
from ._version import get_versions
__version__ = get_versions()["version"]
__all__ = ["__version__"]
del get_versions
The only issue I forsee with versioneer is possibly the git tag as process when run is no longer in the git directory but in pythons site_packages so the git tag may have to be (as it is now) fed in at compile time.
In GitLab by @je-cook on Jul 29, 2021, 09:20
Summary
It isn't possible (as far as I can work out) to extract process version information using the python API.
Currently at compile time version info is stored in the preprocessor variable
tagno.At the moment
__version__isn't defined in the python API (my first port of call) and it is possible to get version info out of pip withpip show processbut not in just python.A possible option is to use something like
versioneerwhich could be very much overkill with the suggested snippit in__init__.py:The only issue I forsee with versioneer is possibly the git tag as process when run is no longer in the git directory but in pythons
site_packagesso the git tag may have to be (as it is now) fed in at compile time.