Skip to content

Commit

Permalink
Skip pycolmap version check if dev (#286)
Browse files Browse the repository at this point in the history
  • Loading branch information
skydes authored Jul 20, 2023
1 parent 6d29bf3 commit cdd7fb0
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions hloc/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,10 @@
logger.warning('pycolmap is not installed, some features may not work.')
else:
minimal_version = version.parse('0.3.0')
found_version = version.parse(getattr(pycolmap, '__version__'))
if found_version < minimal_version:
logger.warning(
'hloc now requires pycolmap>=%s but found pycolmap==%s, '
'please upgrade with `pip install --upgrade pycolmap`',
minimal_version, found_version)
found_version = pycolmap.__version__
if found_version != 'dev':
if version.parse(found_version) < minimal_version:
logger.warning(
'hloc now requires pycolmap>=%s but found pycolmap==%s, '
'please upgrade with `pip install --upgrade pycolmap`',
minimal_version, found_version)

0 comments on commit cdd7fb0

Please sign in to comment.