From 03b0f338eb18f73acaa354e5f55f5b07121ab43c Mon Sep 17 00:00:00 2001 From: disconnect3d Date: Tue, 18 Dec 2018 01:38:03 +0100 Subject: [PATCH] __main__.py: fetch manticore version from installed module --- manticore/__main__.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/manticore/__main__.py b/manticore/__main__.py index 980ed6c71..3f1e3228f 100644 --- a/manticore/__main__.py +++ b/manticore/__main__.py @@ -5,8 +5,10 @@ import logging import sys -from .utils import config, log +import pkg_resources + from .core.manticore import ManticoreBase +from .utils import config, log consts = config.get_group('main') consts.add('recursionlimit', default=10000, @@ -78,7 +80,9 @@ def positive(value): parser.add_argument('--workspace', type=str, default=None, help=("A folder name for temporaries and results." "(default mcore_?????)")) - parser.add_argument('--version', action='version', version='Manticore 0.2.3', + + current_version = pkg_resources.get_distribution("manticore").version + parser.add_argument('--version', action='version', version=f'Manticore {current_version}', help='Show program version information') parser.add_argument('--config', type=str, help='Manticore config file (.yml) to use. (default config file pattern is: ./[.]m[anti]core.yml)')