Skip to content

Commit f305ba1

Browse files
committed
get version from param
1 parent 0bb23ce commit f305ba1

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

xrspatial/__init__.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,14 @@
4141

4242
from xrspatial.pathfinding import a_star_search # noqa
4343

44-
try:
45-
from .version import __version__
46-
except ImportError:
47-
__version__ = "unknown"
44+
import param
45+
__version__ = str(
46+
param.version.Version(
47+
fpath=__file__,
48+
archive_commit='$Format:%h$',
49+
reponame='xrspatial',
50+
)
51+
)
4852

4953

5054
def test():

0 commit comments

Comments
 (0)