Skip to content

Commit

Permalink
Use importlib_metadata to retrieve the version. Reference 'scrunch' e…
Browse files Browse the repository at this point in the history
…xplicitly.
  • Loading branch information
Jason R. Coombs committed May 23, 2019
1 parent f9e7b21 commit ddda349
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
6 changes: 3 additions & 3 deletions scrunch/version.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
from pkg_resources import get_distribution, DistributionNotFound
from importlib_metadata import version


try:
__version__ = get_distribution(__name__).version
except DistributionNotFound:
__version__ = version('scrunch')
except Exception:
# Package is installed from source. It's at least this version
__version__ = '0.6.3-uninstalled'
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
'requests',
'six',
'cr.cube',
'importlib_metadata',
],
extras_require={
'testing': [
Expand Down

0 comments on commit ddda349

Please sign in to comment.