Skip to content
This repository has been archived by the owner on Mar 20, 2020. It is now read-only.

Commit

Permalink
Provide fallback for version
Browse files Browse the repository at this point in the history
  • Loading branch information
fenhl authored Nov 30, 2016
1 parent 497526e commit 1f8b009
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions api/version.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import contextlib

__version__ = None
try:
from api._version import version as __version__
except ImportError:
from setuptools_scm import get_version
__version__ = get_version(root='..', relative_to=__file__)

with contextlib.suppress(ImportError, LookupError):
from setuptools_scm import get_version
__version__ = get_version(root='..', relative_to=__file__)

0 comments on commit 1f8b009

Please sign in to comment.