diff --git a/Makefile b/Makefile index ddb610d..3f50942 100644 --- a/Makefile +++ b/Makefile @@ -7,5 +7,9 @@ clean: rm -rf dist rm -rf build -wheel: +wheel: clean + pip -q install build python -m build + +install: wheel + pip install dist/*.whl diff --git a/src/__init__.py b/src/__init__.py index e7aa8e9..ca09111 100644 --- a/src/__init__.py +++ b/src/__init__.py @@ -1,2 +1,9 @@ -from . import _version # NOQA +from importlib.metadata import version, PackageNotFoundError + +try: + __version__ = version("osparc_filecomms") +except PackageNotFoundError: + # package is not installed + pass + from . import handshakers # NOQA diff --git a/src/handshakers.py b/src/handshakers.py index f7a016a..abe43e3 100644 --- a/src/handshakers.py +++ b/src/handshakers.py @@ -25,7 +25,7 @@ def __init__( self.verbose_level = verbose_level logger.setLevel(self.verbose_level) - self.self_uuid = self_uuid + self.self_uuid = str(self_uuid) self.other_uuid = None self.is_initiator = is_initiator