From 2865d0bfae80936b86bd75931b8f482a08cd3e03 Mon Sep 17 00:00:00 2001 From: Florian Rau Date: Thu, 14 Sep 2023 18:30:00 +0100 Subject: [PATCH] Update __init__.py --- iblrig/__init__.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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')