Skip to content

Commit

Permalink
Switch from versioneer to setuptools-scm
Browse files Browse the repository at this point in the history
Closes OGGM#727
  • Loading branch information
TimoRoth committed Apr 2, 2019
1 parent 0179210 commit b361915
Show file tree
Hide file tree
Showing 8 changed files with 13 additions and 2,358 deletions.
1 change: 1 addition & 0 deletions .git_archival.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ref-names: $Format:%D$
2 changes: 1 addition & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
oggm/tests/funcs.py ident
deployment/docker/Dockerfile ident
oggm/_version.py export-subst
.git_archival.txt export-subst
2 changes: 0 additions & 2 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
include versioneer.py
include oggm/_version.py
include oggm/params.cfg
include oggm/data/demo_glaciers.csv
include oggm/utils/_downloads.crc32.xz
11 changes: 8 additions & 3 deletions oggm/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,14 @@
License: GPLv3+
"""
# flake8: noqa
from ._version import get_versions
__version__ = get_versions()['version']
del get_versions
from pkg_resources import get_distribution, DistributionNotFound
try:
__version__ = get_distribution(__name__).version
except DistributionNotFound:
# package is not installed
pass
finally:
del get_distribution, DistributionNotFound


try:
Expand Down
Loading

0 comments on commit b361915

Please sign in to comment.