From bdf9ec12e696bfd80e5db5d79404a61bc2add8de Mon Sep 17 00:00:00 2001 From: Chris Barnes Date: Wed, 16 Oct 2019 14:38:50 -0400 Subject: [PATCH] Version info: handle betas --- pipx/main.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pipx/main.py b/pipx/main.py index 81a5751f79..1f934e4bc4 100644 --- a/pipx/main.py +++ b/pipx/main.py @@ -6,6 +6,7 @@ import argparse import functools import logging +from pkg_resources import parse_version import shlex import sys import textwrap @@ -29,7 +30,11 @@ __version__ = "0.14.0.0" -__version_info__ = tuple(int(n) for n in __version__.split(".")) +_, __version_info__, subver, *_ = parse_version(__version__)._key # type: ignore +if subver: + while len(__version_info__) < 4: + __version_info__ += (0,) + __version_info__ += subver def print_version() -> None: