Skip to content

Commit

Permalink
Fix version detection.
Browse files Browse the repository at this point in the history
  • Loading branch information
jenskeiner committed Aug 17, 2023
1 parent 9432453 commit a2c863f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
6 changes: 3 additions & 3 deletions exchange_calendars_extensions/api/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@
from importlib.metadata import version
# get version from installed package
__version__ = version("exchange_calendars_extensions")
del version
except ImportError:
pass

if __version__ is None:
try:
# if package not installed, get version as set when package built.
from ._version import version
from .version import version
except Exception:
# If package not installed and not built, leave __version__ as None
pass
else:
__version__ = version

del version
del version
1 change: 1 addition & 0 deletions exchange_calendars_extensions/api/version.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
version = 0

0 comments on commit a2c863f

Please sign in to comment.