diff --git a/kubespawner/__init__.py b/kubespawner/__init__.py index 89b7541d..9443a475 100644 --- a/kubespawner/__init__.py +++ b/kubespawner/__init__.py @@ -11,5 +11,5 @@ # We export KubeSpawner specifically here. This simplifies import for users. # Users can simply import kubespawner.KubeSpawner in their applications # instead of the more verbose import kubespawner.spawner.KubeSpawner. -from ._version import __version__ +from ._version import __version__, version_info from .spawner import KubeSpawner diff --git a/kubespawner/_version.py b/kubespawner/_version.py index a602d581..1d9d048d 100644 --- a/kubespawner/_version.py +++ b/kubespawner/_version.py @@ -2,3 +2,6 @@ # pyproject.toml, according to instructions in RELEASE.md. # __version__ = "6.2.1.dev" + +# version_info looks like (1, 2, 3, "dev") if __version__ is 1.2.3.dev +version_info = tuple(int(p) if p.isdigit() else p for p in __version__.split("."))