From d3f52cb5e13d0ed902edaa26cb5e2239f4b814e0 Mon Sep 17 00:00:00 2001 From: iabdalkader Date: Thu, 21 Dec 2023 12:23:45 +0100 Subject: [PATCH] micropython/senml: Rename senml module. MicroPython's senml module conflicts with https://pypi.org/project/senml/ when it's installed on PC (with pip) it overwrites/gets merged with pypi's senml module, so it needs to be renamed. Signed-off-by: iabdalkader --- micropython/senml/examples/actuator.py | 2 +- micropython/senml/examples/base.py | 2 +- micropython/senml/examples/basic.py | 2 +- micropython/senml/examples/basic2.py | 2 +- micropython/senml/examples/basic_cbor.py | 2 +- micropython/senml/examples/custom_record.py | 2 +- micropython/senml/examples/gateway.py | 2 +- micropython/senml/examples/gateway_actuators.py | 2 +- micropython/senml/examples/supported_data_types.py | 2 +- micropython/senml/manifest.py | 2 +- micropython/senml/{senml => mpsenml}/__init__.py | 0 micropython/senml/{senml => mpsenml}/senml_base.py | 0 micropython/senml/{senml => mpsenml}/senml_pack.py | 4 ++-- micropython/senml/{senml => mpsenml}/senml_record.py | 2 +- micropython/senml/{senml => mpsenml}/senml_unit.py | 0 15 files changed, 13 insertions(+), 13 deletions(-) rename micropython/senml/{senml => mpsenml}/__init__.py (100%) rename micropython/senml/{senml => mpsenml}/senml_base.py (100%) rename micropython/senml/{senml => mpsenml}/senml_pack.py (99%) rename micropython/senml/{senml => mpsenml}/senml_record.py (99%) rename micropython/senml/{senml => mpsenml}/senml_unit.py (100%) diff --git a/micropython/senml/examples/actuator.py b/micropython/senml/examples/actuator.py index 8e254349d..4a5d4137e 100644 --- a/micropython/senml/examples/actuator.py +++ b/micropython/senml/examples/actuator.py @@ -24,7 +24,7 @@ """ -from senml import * +from mpsenml import * def do_actuate(record): diff --git a/micropython/senml/examples/base.py b/micropython/senml/examples/base.py index 426cbbd0e..f07a0870e 100644 --- a/micropython/senml/examples/base.py +++ b/micropython/senml/examples/base.py @@ -24,7 +24,7 @@ """ -from senml import * +from mpsenml import * import time diff --git a/micropython/senml/examples/basic.py b/micropython/senml/examples/basic.py index 18a3a9a06..c2c604878 100644 --- a/micropython/senml/examples/basic.py +++ b/micropython/senml/examples/basic.py @@ -24,7 +24,7 @@ """ -from senml import * +from mpsenml import * import time diff --git a/micropython/senml/examples/basic2.py b/micropython/senml/examples/basic2.py index c2ea153bd..066071fdc 100644 --- a/micropython/senml/examples/basic2.py +++ b/micropython/senml/examples/basic2.py @@ -24,7 +24,7 @@ """ -from senml import * +from mpsenml import * import time diff --git a/micropython/senml/examples/basic_cbor.py b/micropython/senml/examples/basic_cbor.py index f5e92af37..8fe2f1751 100644 --- a/micropython/senml/examples/basic_cbor.py +++ b/micropython/senml/examples/basic_cbor.py @@ -24,7 +24,7 @@ """ -from senml import * +from mpsenml import * import time from cbor2 import decoder diff --git a/micropython/senml/examples/custom_record.py b/micropython/senml/examples/custom_record.py index e68d05f5b..93aa817dd 100644 --- a/micropython/senml/examples/custom_record.py +++ b/micropython/senml/examples/custom_record.py @@ -24,7 +24,7 @@ """ -from senml import * +from mpsenml import * import time diff --git a/micropython/senml/examples/gateway.py b/micropython/senml/examples/gateway.py index d28e4cffc..8d2bfa65a 100644 --- a/micropython/senml/examples/gateway.py +++ b/micropython/senml/examples/gateway.py @@ -24,7 +24,7 @@ """ -from senml import * +from mpsenml import * import time gateway_pack = SenmlPack("gateway") diff --git a/micropython/senml/examples/gateway_actuators.py b/micropython/senml/examples/gateway_actuators.py index add5ed24c..64144bc7b 100644 --- a/micropython/senml/examples/gateway_actuators.py +++ b/micropython/senml/examples/gateway_actuators.py @@ -24,7 +24,7 @@ """ -from senml import * +from mpsenml import * def do_actuate(record): diff --git a/micropython/senml/examples/supported_data_types.py b/micropython/senml/examples/supported_data_types.py index 3149f49d2..cafbd5c84 100644 --- a/micropython/senml/examples/supported_data_types.py +++ b/micropython/senml/examples/supported_data_types.py @@ -24,7 +24,7 @@ """ -from senml import * +from mpsenml import * import time pack = SenmlPack("device_name") diff --git a/micropython/senml/manifest.py b/micropython/senml/manifest.py index 216717caf..5c2115234 100644 --- a/micropython/senml/manifest.py +++ b/micropython/senml/manifest.py @@ -6,4 +6,4 @@ require("cbor2") -package("senml") +package("mpsenml") diff --git a/micropython/senml/senml/__init__.py b/micropython/senml/mpsenml/__init__.py similarity index 100% rename from micropython/senml/senml/__init__.py rename to micropython/senml/mpsenml/__init__.py diff --git a/micropython/senml/senml/senml_base.py b/micropython/senml/mpsenml/senml_base.py similarity index 100% rename from micropython/senml/senml/senml_base.py rename to micropython/senml/mpsenml/senml_base.py diff --git a/micropython/senml/senml/senml_pack.py b/micropython/senml/mpsenml/senml_pack.py similarity index 99% rename from micropython/senml/senml/senml_pack.py rename to micropython/senml/mpsenml/senml_pack.py index 85b26d40b..3e10ee6cd 100644 --- a/micropython/senml/senml/senml_pack.py +++ b/micropython/senml/mpsenml/senml_pack.py @@ -24,8 +24,8 @@ """ -from senml.senml_record import SenmlRecord -from senml.senml_base import SenmlBase +from mpsenml.senml_record import SenmlRecord +from mpsenml.senml_base import SenmlBase import json from cbor2 import encoder from cbor2 import decoder diff --git a/micropython/senml/senml/senml_record.py b/micropython/senml/mpsenml/senml_record.py similarity index 99% rename from micropython/senml/senml/senml_record.py rename to micropython/senml/mpsenml/senml_record.py index 9dfe22873..881654e95 100644 --- a/micropython/senml/senml/senml_record.py +++ b/micropython/senml/mpsenml/senml_record.py @@ -25,7 +25,7 @@ import binascii -from senml.senml_base import SenmlBase +from mpsenml.senml_base import SenmlBase class SenmlRecord(SenmlBase): diff --git a/micropython/senml/senml/senml_unit.py b/micropython/senml/mpsenml/senml_unit.py similarity index 100% rename from micropython/senml/senml/senml_unit.py rename to micropython/senml/mpsenml/senml_unit.py