diff --git a/HISTORY.rst b/HISTORY.rst index 96deefd27..4472eaaff 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -3,6 +3,10 @@ Release History =============== +0.8.2 ++++++++++++++++ +* Resolve jsonschema dependency issue. + 0.8.1 +++++++++++++++ * PnP monitor events commands - Adds an option for filtering devices by twin query. diff --git a/azext_iot/_constants.py b/azext_iot/_constants.py index bde7d1583..6d6955722 100644 --- a/azext_iot/_constants.py +++ b/azext_iot/_constants.py @@ -6,7 +6,7 @@ import os -VERSION = "0.8.1" +VERSION = "0.8.2" EXTENSION_NAME = "azure-cli-iot-ext" EXTENSION_ROOT = os.path.dirname(os.path.abspath(__file__)) EXTENSION_CONFIG_ROOT_KEY = "iotext" diff --git a/azext_iot/azext_metadata.json b/azext_iot/azext_metadata.json index 4eaede17d..6b9d8d7ec 100644 --- a/azext_iot/azext_metadata.json +++ b/azext_iot/azext_metadata.json @@ -1,4 +1,4 @@ { "azext.minCliCoreVersion": "2.0.70", - "version": "0.8.1" + "version": "0.8.2" } \ No newline at end of file diff --git a/azext_iot/operations/hub.py b/azext_iot/operations/hub.py index 445e3efac..0bb81f6e9 100644 --- a/azext_iot/operations/hub.py +++ b/azext_iot/operations/hub.py @@ -623,6 +623,12 @@ def _process_config_content(content, content_type='module'): def _validate_payload_schema(content): + from azure.cli.core.extension import get_extension_path + from azext_iot._constants import EXTENSION_NAME + import pkg_resources + + pkg_resources.working_set.add_entry(get_extension_path(EXTENSION_NAME)) + from jsonschema import validate from jsonschema.exceptions import ValidationError, SchemaError from azext_iot._constants import EDGE_DEPLOYMENT_SCHEMA_2_PATH as schema_path diff --git a/setup.py b/setup.py index 7af54b782..e618d1b54 100644 --- a/setup.py +++ b/setup.py @@ -48,7 +48,7 @@ # though that is installed out of band (managed by the extension) # for compatibility reasons. -DEPENDENCIES = ["paho-mqtt==1.3.1", "jsonschema~=3.0.2"] +DEPENDENCIES = ["paho-mqtt==1.3.1", "jsonschema~=3.0.2", "setuptools"] setup(