blob: a2bdd57a4dc45b31f5bec227af78303e1fbf873c (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
try:
from importlib import metadata
except ImportError:
import importlib_metadata as metadata
try:
__version__ = metadata.version('cmake_common')
except Exception:
__version__ = 'unknown'
def add_to_arg_parser(parser):
parser.add_argument('--version', '-V', action='version',
version=f'%(prog)s {__version__}')
|