diff --git a/iblrig/__init__.py b/iblrig/__init__.py index 181d4a5d4..751b1ba4d 100644 --- a/iblrig/__init__.py +++ b/iblrig/__init__.py @@ -1,3 +1,8 @@ +from pathlib import Path from setuptools_scm import get_version +from importlib.metadata import version -__version__ = get_version(version_scheme='post-release', local_scheme='dirty-tag', root='../..') +if Path('.github').exists(): + __version__ = get_version(version_scheme='post-release', local_scheme='dirty-tag') +else: + __version__ = version('iblrig')