Skip to content

Commit 89f36c5

Browse files
WasabiFandwalton76
authored andcommitted
Expose ev3dev2.version.__version__ as ev3dev2.__version__ (#581)
1 parent 055ba0d commit 89f36c5

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

ev3dev2/__init__.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,13 @@ def chain_exception(exception, cause):
3737
else:
3838
raise exception from cause
3939

40+
try:
41+
# if we are in a released build, there will be an auto-generated "version"
42+
# module
43+
from .version import __version__
44+
except ImportError:
45+
__version__ = "<unknown>"
46+
4047
import os
4148
import io
4249
import fnmatch

0 commit comments

Comments
 (0)