From 6fcf7def659d85ec19020c2a161516e9b00babb7 Mon Sep 17 00:00:00 2001 From: zbeacon Date: Wed, 6 May 2020 16:24:35 +0300 Subject: [PATCH] ~Fix for pyrsistent module installation --- setup.py | 3 +-- thingsboard_gateway/gateway/tb_gateway_service.py | 8 +++++++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/setup.py b/setup.py index 77fa5fca..db9f194c 100644 --- a/setup.py +++ b/setup.py @@ -21,7 +21,7 @@ this_directory = path.abspath(path.dirname(__file__)) with open(path.join(this_directory, 'README.md'), encoding='utf-8') as f: long_description = f.read() -VERSION = "2.3.0" +VERSION = "2.3.0.1" setup( version=VERSION, @@ -57,7 +57,6 @@ setup( 'pytz', 'PyYAML', 'simplejson', - 'pyrsistent', 'requests' ], download_url='https://github.com/thingsboard/thingsboard-gateway/archive/%s.tar.gz' % VERSION, diff --git a/thingsboard_gateway/gateway/tb_gateway_service.py b/thingsboard_gateway/gateway/tb_gateway_service.py index 43262f21..b6ef411a 100644 --- a/thingsboard_gateway/gateway/tb_gateway_service.py +++ b/thingsboard_gateway/gateway/tb_gateway_service.py @@ -27,9 +27,15 @@ from threading import Thread, RLock from yaml import safe_load from simplejson import load, dumps, loads +from thingsboard_gateway.tb_utility.tb_utility import TBUtility + +try: + import pyrsistent +except ImportError: + TBUtility.install_package("pyrsistent") + from thingsboard_gateway.gateway.tb_client import TBClient from thingsboard_gateway.gateway.tb_logger import TBLoggerHandler -from thingsboard_gateway.tb_utility.tb_utility import TBUtility from thingsboard_gateway.storage.memory_event_storage import MemoryEventStorage from thingsboard_gateway.storage.file_event_storage import FileEventStorage from thingsboard_gateway.gateway.tb_gateway_remote_configurator import RemoteConfigurator