aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexandru Ardelean <ardeleanalex@gmail.com>2022-08-16 12:38:58 +0300
committerRosen Penev <rosenp@gmail.com>2022-08-16 13:12:33 -0700
commit6bfecdf43269cbbc5c923d8928c04288a27ed3d2 (patch)
tree473d7f95ea40991a7986444a083b51042ebebd6e
parent4ae376ea02cc4346df98908b7badd3d466965d4e (diff)
bigclown-gateway: use Python's json lib
From: https://github.com/hardwario/bch-gateway/pull/17 Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
-rw-r--r--utils/bigclown/bigclown-gateway/Makefile3
-rw-r--r--utils/bigclown/bigclown-gateway/patches/0001-bcg-gateway-use-Python-s-built-in-json-library.patch34
2 files changed, 35 insertions, 2 deletions
diff --git a/utils/bigclown/bigclown-gateway/Makefile b/utils/bigclown/bigclown-gateway/Makefile
index af0fe8554..5984162f3 100644
--- a/utils/bigclown/bigclown-gateway/Makefile
+++ b/utils/bigclown/bigclown-gateway/Makefile
@@ -6,7 +6,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=bigclown-gateway
PKG_VERSION:=1.16.2
-PKG_RELEASE:=2
+PKG_RELEASE:=3
PYPI_NAME:=bcg
PKG_HASH:=ce7f27f372551c0beb3f8929af2d779417d9dcd0feaa2fa2dc49e87b1416c536
@@ -33,7 +33,6 @@ define Package/bigclown-gateway
+python3-paho-mqtt \
+python3-pyserial \
+python3-yaml \
- +python3-simplejson \
+python3-schema \
+python3-appdirs
endef
diff --git a/utils/bigclown/bigclown-gateway/patches/0001-bcg-gateway-use-Python-s-built-in-json-library.patch b/utils/bigclown/bigclown-gateway/patches/0001-bcg-gateway-use-Python-s-built-in-json-library.patch
new file mode 100644
index 000000000..d7b909d2b
--- /dev/null
+++ b/utils/bigclown/bigclown-gateway/patches/0001-bcg-gateway-use-Python-s-built-in-json-library.patch
@@ -0,0 +1,34 @@
+From 0d9251aa4b7f925c908c048ae2eab123acab32d6 Mon Sep 17 00:00:00 2001
+From: Alexandru Ardelean <ardeleanalex@gmail.com>
+Date: Wed, 16 Mar 2022 09:46:03 +0200
+Subject: [PATCH] bcg: gateway: use Python's built-in json library
+
+This reduces the dependency list by one, since Python has a built-in JSON
+library with the same API.
+
+Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
+---
+ bcg/gateway.py | 2 +-
+ requirements.txt | 1 -
+ 2 files changed, 1 insertion(+), 2 deletions(-)
+
+--- a/bcg/gateway.py
++++ b/bcg/gateway.py
+@@ -3,7 +3,7 @@
+ import os
+ import time
+ import logging
+-import simplejson as json
++import json
+ import platform
+ import socket
+ import decimal
+--- a/requirements.txt
++++ b/requirements.txt
+@@ -3,6 +3,5 @@ click-log>=0.2.1
+ paho-mqtt>=1.0 # deb:python3-paho-mqtt>=1.0
+ pyserial>=3.0 # deb:python3-serial>=3.0
+ PyYAML>=3.11 # deb:python3-yaml>=3.11
+-simplejson>=3.6.0 # deb:python3-simplejson>=3.6.0
+ schema>=0.6
+ appdirs>=1.0