diff --git a/hloc/__init__.py b/hloc/__init__.py index 4685a287..53832f8b 100644 --- a/hloc/__init__.py +++ b/hloc/__init__.py @@ -1,6 +1,8 @@ import logging import sys +__version__ = '1.1' + logging.basicConfig(stream=sys.stdout, format='[%(asctime)s %(levelname)s] %(message)s', datefmt='%m/%d/%Y %H:%M:%S', diff --git a/setup.py b/setup.py index 7b24d5e5..fd789530 100644 --- a/setup.py +++ b/setup.py @@ -3,8 +3,11 @@ description = ['Tools and baselines for visual localization and mapping'] -with open(str(Path(__file__).parent / 'README.md'), 'r', encoding='utf-8') as f: +root = Path(__file__).parent +with open(str(root / 'README.md'), 'r', encoding='utf-8') as f: readme = f.read() +with open(str(root / 'hloc/__init__.py'), 'r') as f: + version = eval(f.read().split('__version__ = ')[1].split()[0]) dependencies = [ 'torch>=1.1', @@ -20,7 +23,7 @@ setup( name='hloc', - version='1.1', + version=version, packages=['hloc'], python_requires='>=3.6', install_requires=dependencies,