From 9c934ec0f32487ce7f4a85315ef0cf42ad35d2d6 Mon Sep 17 00:00:00 2001 From: ThomasLecocq Date: Wed, 7 Feb 2024 14:28:48 +0100 Subject: [PATCH] version should work even if installed from master.zip --- msnoise/_version.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/msnoise/_version.py b/msnoise/_version.py index 2e62b4ab..1b16236f 100644 --- a/msnoise/_version.py +++ b/msnoise/_version.py @@ -149,8 +149,11 @@ def get_git_version(abbrev=10, dirty=True, append_remote_tracking_branch=True): version = release_version if version is None: - import pkg_resources - version = pkg_resources.get_distribution("msnoise").version + try: + import pkg_resources + version = pkg_resources.get_distribution("msnoise").version + except: + pass # If we still don't have anything, that's an error. if version is None: