jsonpickle: allow importing from the source tree
Allow jsonpickle to import without any external dependencies.
+try:
import importlib_metadata as metadata
+except ImportError:
+ metadata = None
-__version__ = metadata.version('jsonpickle')
+def _get_version():
+ try:
+ version = metadata.version('jsonpickle')
+ except (AttributeError, ImportError):
+ version = __default_version__
+ return version
+
+
+__default_version__ = '0.0.0-alpha'
+__version__ = _get_version()
