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