From patchwork Mon Aug 29 17:14:13 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marcus Hoffmann X-Patchwork-Id: 1671575 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=buildroot.org (client-ip=2605:bc80:3010::136; helo=smtp3.osuosl.org; envelope-from=buildroot-bounces@buildroot.org; receiver=) Received: from smtp3.osuosl.org (smtp3.osuosl.org [IPv6:2605:bc80:3010::136]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4MGcWJ2g04z1yhC for ; Tue, 30 Aug 2022 03:14:52 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id 9FBB960AFD; Mon, 29 Aug 2022 17:14:50 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org 9FBB960AFD X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id AorOdwGWX22P; Mon, 29 Aug 2022 17:14:49 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp3.osuosl.org (Postfix) with ESMTP id 7FD8160AC0; Mon, 29 Aug 2022 17:14:48 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org 7FD8160AC0 X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from smtp1.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id 0C9ED1BF280 for ; Mon, 29 Aug 2022 17:14:25 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id E770B81348 for ; Mon, 29 Aug 2022 17:14:24 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org E770B81348 X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id XVSSouaPiZ2u for ; Mon, 29 Aug 2022 17:14:21 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.8.0 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org 2ECC481329 Received: from mout-b-110.mailbox.org (mout-b-110.mailbox.org [195.10.208.55]) by smtp1.osuosl.org (Postfix) with ESMTPS id 2ECC481329 for ; Mon, 29 Aug 2022 17:14:21 +0000 (UTC) Received: from smtp2.mailbox.org (smtp2.mailbox.org [10.196.197.2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-b-110.mailbox.org (Postfix) with ESMTPS id 4MGcVc4kLfz9t47; Mon, 29 Aug 2022 19:14:16 +0200 (CEST) From: Marcus Hoffmann To: buildroot@buildroot.org Date: Mon, 29 Aug 2022 19:14:13 +0200 Message-Id: <20220829171415.129914-2-marcus.hoffmann@othermo.de> In-Reply-To: <20220829171415.129914-1-marcus.hoffmann@othermo.de> References: <20220829171415.129914-1-marcus.hoffmann@othermo.de> MIME-Version: 1.0 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=othermo.de; s=MBO0001; t=1661793256; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=/4JfUco+ZAUUOkYTCNs4oJ5OJg5vDYs+AWFHWSqDCm8=; b=jpJIhAwOc8h1EVtNasoFyhu/c/4znG3uRylNzuvQ9IW6yTLz1OmbVOvrNfVho0oZ4+S9gz q1TSpmL2cWL54qpfK/0vlsuxP01I3i96hfbH0MOVtX8v4NYG16hdV0/bqw3zLpfr1DsyWQ gJhm8Oks2c8P2dqHydA4+0Z0rRiwNOKrZomKWQ/H+SpRROFEIa4rtxf7G4fdiUYSGqFPkv aZm9RCIzipn4tDihHb+pWyLgxTpwMLtScpfY1ftVOZKv9/vkoBf0CHFTnLcoFnINBOCISI Z7eSE+baE8WP28Flmb8K5YDuVM/YtCZ4knPzVa5Z9Z9Fmznsi7OQhyPZmaAqSA== X-Mailman-Original-Authentication-Results: smtp1.osuosl.org; dkim=pass (2048-bit key) header.d=othermo.de header.i=@othermo.de header.a=rsa-sha256 header.s=MBO0001 header.b=jpJIhAwO Subject: [Buildroot] [next v2 1/2] package/python-paho-mqtt: bump to 1.6.1 X-BeenThere: buildroot@buildroot.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Davide Viti , Asaf Kahlon Errors-To: buildroot-bounces@buildroot.org Sender: "buildroot" We need to switch to the github download as the sdist published to pypi doesn't package the epl-v20 license file isn't included there: https://github.com/eclipse/paho.mqtt.python/pull/635 License changed to EPL-2.0 or EDLv1.0 Changelog: https://github.com/eclipse/paho.mqtt.python/blob/master/ChangeLog.txt Signed-off-by: Marcus Hoffmann --- Changes v1 -> v2: - switch to github download to have license file in source tarball - update license hashes package/python-paho-mqtt/python-paho-mqtt.hash | 10 +++++----- package/python-paho-mqtt/python-paho-mqtt.mk | 9 ++++----- 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/package/python-paho-mqtt/python-paho-mqtt.hash b/package/python-paho-mqtt/python-paho-mqtt.hash index bf3993e919..dbf9ee89f6 100644 --- a/package/python-paho-mqtt/python-paho-mqtt.hash +++ b/package/python-paho-mqtt/python-paho-mqtt.hash @@ -1,6 +1,6 @@ -# md5 from https://pypi.python.org/pypi/paho-mqtt/json, sha256 locally computed -md5 e3ac29cd5dc247a01083a2a8f3fddd08 paho-mqtt-1.4.0.tar.gz -sha256 e440a052b46d222e184be3be38676378722072fcd4dfd2c8f509fb861a7b0b79 paho-mqtt-1.4.0.tar.gz -sha256 76f13729e84e9222e543303df00f87d1b2c0995b6a505cd859a285667e44babb LICENSE.txt +# locally computed +md5 00c3381d7deacc7ac8b220f3b9d689c6 python-paho-mqtt-1.6.1.tar.gz +sha256 6e35c1be242a901fc9c00bad7d37b5cc4a497f398dfceb4ed0d8018a959be650 python-paho-mqtt-1.6.1.tar.gz +sha256 66408b049249c3bdb0ba1ed285f5422ce67e371d40151bebd4d806af454ffe7c LICENSE.txt sha256 e8cf7d54ea46c19aba793983889b7f7425e1ebfcaaccec764a7db091646e203c edl-v10 -sha256 3b9be6b894d0769de796e653571ff6cef494913c0ce78c35a97db939e7d9087c epl-v10 +sha256 8c349f80764d0648e645f41ef23772a70c995a0924b5235f735f4a3d09df127c epl-v20 diff --git a/package/python-paho-mqtt/python-paho-mqtt.mk b/package/python-paho-mqtt/python-paho-mqtt.mk index d192749e1e..3ff5f9e57a 100644 --- a/package/python-paho-mqtt/python-paho-mqtt.mk +++ b/package/python-paho-mqtt/python-paho-mqtt.mk @@ -4,11 +4,10 @@ # ################################################################################ -PYTHON_PAHO_MQTT_VERSION = 1.4.0 -PYTHON_PAHO_MQTT_SOURCE = paho-mqtt-$(PYTHON_PAHO_MQTT_VERSION).tar.gz -PYTHON_PAHO_MQTT_SITE = https://files.pythonhosted.org/packages/25/63/db25e62979c2a716a74950c9ed658dce431b5cb01fde29eb6cba9489a904 -PYTHON_PAHO_MQTT_LICENSE = EPL-1.0 or EDLv1.0 -PYTHON_PAHO_MQTT_LICENSE_FILES = LICENSE.txt edl-v10 epl-v10 +PYTHON_PAHO_MQTT_VERSION = 1.6.1 +PYTHON_PAHO_MQTT_SITE = $(call github,eclipse,paho.mqtt.python,v$(PYTHON_PAHO_MQTT_VERSION)) +PYTHON_PAHO_MQTT_LICENSE = EPL-2.0 or EDLv1.0 +PYTHON_PAHO_MQTT_LICENSE_FILES = LICENSE.txt epl-v20 edl-v10 PYTHON_PAHO_MQTT_SETUP_TYPE = setuptools $(eval $(python-package)) From patchwork Mon Aug 29 17:18:20 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marcus Hoffmann X-Patchwork-Id: 1671578 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=buildroot.org (client-ip=2605:bc80:3010::138; helo=smtp1.osuosl.org; envelope-from=buildroot-bounces@buildroot.org; receiver=) Received: from smtp1.osuosl.org (smtp1.osuosl.org [IPv6:2605:bc80:3010::138]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4MGcbW700Kz1yh5 for ; Tue, 30 Aug 2022 03:18:31 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id 9A41881449; Mon, 29 Aug 2022 17:18:29 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org 9A41881449 X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id AAC0OVXJ61GA; Mon, 29 Aug 2022 17:18:28 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp1.osuosl.org (Postfix) with ESMTP id A2BB181446; Mon, 29 Aug 2022 17:18:27 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org A2BB181446 X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from smtp3.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by ash.osuosl.org (Postfix) with ESMTP id BD1F21BF280 for ; Mon, 29 Aug 2022 17:18:25 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id 986C46079D for ; Mon, 29 Aug 2022 17:18:25 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org 986C46079D X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id PwwzfQmCk8WY for ; Mon, 29 Aug 2022 17:18:24 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.8.0 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org BADED605C9 Received: from mout-b-105.mailbox.org (mout-b-105.mailbox.org [195.10.208.50]) by smtp3.osuosl.org (Postfix) with ESMTPS id BADED605C9 for ; Mon, 29 Aug 2022 17:18:24 +0000 (UTC) Received: from smtp2.mailbox.org (smtp2.mailbox.org [10.196.197.2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-b-105.mailbox.org (Postfix) with ESMTPS id 4MGcbJ6lhHz9tq6; Mon, 29 Aug 2022 19:18:20 +0200 (CEST) From: Marcus Hoffmann To: buildroot@buildroot.org Date: Mon, 29 Aug 2022 19:18:20 +0200 Message-Id: <20220829171820.130690-1-marcus.hoffmann@othermo.de> MIME-Version: 1.0 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=othermo.de; s=MBO0001; t=1661793500; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=v59PP4EgdgvyneehcGGnEPOSaoS3dQYdysiBHHqZLok=; b=zxEF0i5g21Hv8FjoOVbUw9DnOXZCwrItVZV/GNyixx0r6InDq90lvw7XLeDP9SIMJmRxRi Tm3H35pPJu10wMJ5XeqlpNrxY8Cb3p65Aolf4kNEpuk3w+AU8qUB3SFC9Y1LZXpET7niMJ dL7ud3em0XtuDhYvDuSd6HWVmw+2My5CrUxJUYT+YxG2fPVBe8uKtf0QvulWHKAM/BGq8C 9UqqlbiZPCYfAeKEZVMjQr2qggYvzo3fZdoz3D18kfxIqG5MogJmymCFaanmR3SdUUhkWm 1EhUlTmJ7y2M4IXkK0i98gHvG0h32zh3oTyb/vPRhLnq1hYRar4QlK65DTUm1A== X-Mailman-Original-Authentication-Results: smtp3.osuosl.org; dkim=pass (2048-bit key) header.d=othermo.de header.i=@othermo.de header.a=rsa-sha256 header.s=MBO0001 header.b=zxEF0i5g Subject: [Buildroot] [next v2 2/2] support/testing/tests/package/test_python_paho_mqtt: new runtime test X-BeenThere: buildroot@buildroot.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Davide Viti , Asaf Kahlon Errors-To: buildroot-bounces@buildroot.org Sender: "buildroot" Signed-off-by: Marcus Hoffmann Tested-by: Arnout Vandecappelle (Essensium/Mind) --- .../tests/package/sample_python_paho_mqtt.py | 12 ++++++++ .../tests/package/test_python_paho_mqtt.py | 29 +++++++++++++++++++ 2 files changed, 41 insertions(+) create mode 100644 support/testing/tests/package/sample_python_paho_mqtt.py create mode 100644 support/testing/tests/package/test_python_paho_mqtt.py diff --git a/support/testing/tests/package/sample_python_paho_mqtt.py b/support/testing/tests/package/sample_python_paho_mqtt.py new file mode 100644 index 0000000000..769ad6250f --- /dev/null +++ b/support/testing/tests/package/sample_python_paho_mqtt.py @@ -0,0 +1,12 @@ +from paho.mqtt import publish, subscribe + +publish.single( + 'buildroot/test', + payload="Hello, World!", + qos=2, + retain=True, + hostname="localhost", + port=1883) + +message = subscribe.simple('buildroot/test') +print(message.payload.decode()) diff --git a/support/testing/tests/package/test_python_paho_mqtt.py b/support/testing/tests/package/test_python_paho_mqtt.py new file mode 100644 index 0000000000..b1e2b8fb42 --- /dev/null +++ b/support/testing/tests/package/test_python_paho_mqtt.py @@ -0,0 +1,29 @@ +from tests.package.test_python import TestPythonPackageBase +import os +import time + + +class TestPythonPahoMQTT(TestPythonPackageBase): + __test__ = True + config = TestPythonPackageBase.config + \ + """ + BR2_PACKAGE_MOSQUITTO=y + BR2_PACKAGE_MOSQUITTO_BROKER=y + BR2_PACKAGE_PYTHON3=y + BR2_PACKAGE_PYTHON_PAHO_MQTT=y + """ + sample_scripts = ["tests/package/sample_python_paho_mqtt.py"] + + def test_run(self): + self.login() + self.check_sample_scripts_exist() + cmd = "mosquitto > /dev/null 2>&1 &" + _, exit_code = self.emulator.run(cmd, timeout=self.timeout) + + # Give some time for mosquitto broker to start up + time.sleep(1) + + cmd = "%s %s" % (self.interpreter, os.path.basename(self.sample_scripts[0])) + output, exit_code = self.emulator.run(cmd, timeout=self.timeout) + self.assertEqual(exit_code, 0) + self.assertEqual(output[0], "Hello, World!")