Skip to contentSkip to conversation

python-aws-iot-device-sdk-python: fix runtime dependencies

PATCH Superseded André Draszik 1 participant 3 messages Mar 21, 2018

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/3 python-aws-iot-device-sdk-python: fix runtime dependencies

From: André Draszik <[email protected]>

They were completely wrong...
List of imports obtained via:
rgrep -w import \

   | awk -F : '{ $1="" ; gsub(/^[ \t]+|[ \t]+$/, ""); print; }' \
   | grep -v AWSIoTPythonSDK \
   | sort -u

and packages providing the relevant modules extracted using oe-pkgdata-util find-path.

---
 .../recipes-devtools/python/python-aws-iot-device-sdk-python.inc | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)
meta-python/recipes-devtools/python/python-aws-iot-device-sdk-python.inc +8 -1
index 177b819d4..1fc98bdbd 100644
@@ -11,8 +11,15 @@ inherit pypi
 PYPI_PACKAGE = "AWSIoTPythonSDK"
 
 RDEPENDS_${PN} += " \
-    ${PYTHON_PN}-pyopenssl \
+    ${PYTHON_PN}-crypt \
+    ${PYTHON_PN}-datetime \
+    ${PYTHON_PN}-io \
     ${PYTHON_PN}-json \
+    ${PYTHON_PN}-logging \
+    ${PYTHON_PN}-math \
+    ${PYTHON_PN}-netclient \
+    ${PYTHON_PN}-numbers \
+    ${PYTHON_PN}-threading \
 "
 
 BBCLASSEXTEND = "native nativesdk"
Signature · 1 line
2.16.2
#1 lore raw

PATCH 2/3 python-aws-iot-device-sdk-python: fix LICENSE

From: André Draszik <[email protected]>

The SDK ships with an embedded, modified copy of python-paho, which is licensed under the EPL-1.0 license:

vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv # Copyright (c) 2012-2014 Roger Light <[email protected]>
#
# All rights reserved. This program and the accompanying materials

 # are made available under the terms of the Eclipse Public License v1.0
 # and Eclipse Distribution License v1.0 which accompany this distribution.
 #
 # The Eclipse Public License is available at
 #    http://www.eclipse.org/legal/epl-v10.html
 # and the Eclipse Distribution License is available at
 #   http://www.eclipse.org/org/documents/edl-v10.php.
 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ endline=10 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
---
 .../recipes-devtools/python/python-aws-iot-device-sdk-python.inc   | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
meta-python/recipes-devtools/python/python-aws-iot-device-sdk-python.inc +5 -2
index 1fc98bdbd..d31c01411 100644
@@ -1,7 +1,10 @@
 DESCRIPTION = "SDK for connecting to AWS IoT using Python."
 HOMEPAGE = "https://github.com/aws/aws-iot-device-sdk-python"
-LICENSE = "Apache-2.0"
-LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=9ac49901b833e769c7d6f21e8dbd7b30"
+LICENSE = "Apache-2.0 & EPL-1.0"
+LIC_FILES_CHKSUM = "\
+    file://LICENSE.txt;md5=9ac49901b833e769c7d6f21e8dbd7b30 \
+    file://AWSIoTPythonSDK/core/protocol/paho/client.py;endline=10;md5=9381d38fd42b5ce6e76107252d75224a \
+"
 
 SRC_URI[md5sum] = "97e8cf0d40ef3765d979c19b534a716d"
 SRC_URI[sha256sum] = "d68cbff396143e837b4c23b6621d3b7ae374281afc75eed8e51a28625d9125ba"
Signature · 1 line
2.16.2
#2 lore raw

PATCH 3/3 python-aws-iot-device-sdk-python: also package examples (as additional package)

In reply to André Draszik

From: André Draszik <[email protected]>

---
 .../python/python-aws-iot-device-sdk-python.inc             | 13 +++++++++++++
 .../python/python-aws-iot-device-sdk-python_1.3.1.bb        |  2 ++
 2 files changed, 15 insertions(+)
meta-python/recipes-devtools/python/python-aws-iot-device-sdk-python.inc +13 -0
index d31c01411..1c9625259 100644
@@ -13,6 +13,17 @@ inherit pypi
 
 PYPI_PACKAGE = "AWSIoTPythonSDK"
 
+PACKAGES =+ "${PN}-examples"
+
+do_install_append() {
+        install -d -m0755 ${D}${datadir}/${BPN}/examples
+        cp --preserve=mode,timestamps -R ${S}/samples/* ${D}${datadir}/${BPN}/examples
+        # this requires the full blown AWS Python SDK
+        rm -r ${D}${datadir}/${BPN}/examples/basicPubSub
+}
+
+FILES_${PN}-examples = "${datadir}/${BPN}/examples"
+
 RDEPENDS_${PN} += " \
     ${PYTHON_PN}-crypt \
     ${PYTHON_PN}-datetime \
@@ -25,4 +36,6 @@ RDEPENDS_${PN} += " \
     ${PYTHON_PN}-threading \
 "
 
+RDEPENDS_${PN}-examples += "${PN}"
+
 BBCLASSEXTEND = "native nativesdk"
meta-python/recipes-devtools/python/python-aws-iot-device-sdk-python_1.3.1.bb +2 -0
index 12ae978e3..490e97391 100644
@@ -1,2 +1,4 @@
 inherit setuptools
 require python-aws-iot-device-sdk-python.inc
+
+RDEPENDS_${PN}-examples += "${PYTHON_PN}-argparse"
Signature · 1 line
2.16.2