* [Buildroot] [PATCH v2 1/2] package/python-dbus-fast: new package
@ 2022-11-03 10:21 Marcin Niestroj
2022-11-03 10:21 ` [Buildroot] [PATCH v2 2/2] package/python-bleak: bump version to 0.19.1 Marcin Niestroj
` (2 more replies)
0 siblings, 3 replies; 8+ messages in thread
From: Marcin Niestroj @ 2022-11-03 10:21 UTC (permalink / raw)
To: buildroot; +Cc: James Hilliard, Marcin Niestroj, Asaf Kahlon, Thomas Petazzoni
Signed-off-by: Marcin Niestroj <m.niestroj@grinn-global.com>
---
v1 -> v2:
* added REQUIRE_CYTHON=1 env and host-python-cython dependencies (suggested by
James)
DEVELOPERS | 2 +
package/Config.in | 1 +
package/python-dbus-fast/Config.in | 9 ++++
.../python-dbus-fast/python-dbus-fast.hash | 5 +++
package/python-dbus-fast/python-dbus-fast.mk | 16 +++++++
.../tests/package/sample_python_dbus_fast.py | 44 +++++++++++++++++++
.../tests/package/test_python_dbus_fast.py | 40 +++++++++++++++++
7 files changed, 117 insertions(+)
create mode 100644 package/python-dbus-fast/Config.in
create mode 100644 package/python-dbus-fast/python-dbus-fast.hash
create mode 100644 package/python-dbus-fast/python-dbus-fast.mk
create mode 100644 support/testing/tests/package/sample_python_dbus_fast.py
create mode 100644 support/testing/tests/package/test_python_dbus_fast.py
diff --git a/DEVELOPERS b/DEVELOPERS
index 7d27936992..6d670ae21a 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -1881,6 +1881,7 @@ F: package/murata-cyw-fw/
F: package/netdata/
F: package/python-ansicolors/
F: package/python-bleak/
+F: package/python-dbus-fast/
F: package/python-dbus-next/
F: package/python-iniconfig/
F: package/python-intelhex/
@@ -1892,6 +1893,7 @@ F: package/python-typing-extensions/
F: package/python-xmodem/
F: package/rs485conf/
F: package/turbolua/
+F: support/testing/tests/package/sample_python_dbus_fast.py
F: support/testing/tests/package/sample_python_dbus_next.py
F: support/testing/tests/package/sample_python_pytest.py
F: support/testing/tests/package/sample_python_pytest_asyncio.py
diff --git a/package/Config.in b/package/Config.in
index 238d7813f0..db9e94f357 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -1015,6 +1015,7 @@ menu "External python modules"
source "package/python-daphne/Config.in"
source "package/python-dataproperty/Config.in"
source "package/python-dateutil/Config.in"
+ source "package/python-dbus-fast/Config.in"
source "package/python-dbus-next/Config.in"
source "package/python-decorator/Config.in"
source "package/python-defusedxml/Config.in"
diff --git a/package/python-dbus-fast/Config.in b/package/python-dbus-fast/Config.in
new file mode 100644
index 0000000000..2665bd1964
--- /dev/null
+++ b/package/python-dbus-fast/Config.in
@@ -0,0 +1,9 @@
+config BR2_PACKAGE_PYTHON_DBUS_FAST
+ bool "python-dbus-fast"
+ select BR2_PACKAGE_PYTHON3_PYEXPAT # runtime
+ select BR2_PACKAGE_PYTHON_ASYNC_TIMEOUT # runtime
+ help
+ A faster version of dbus-next, a DBus library for Python with
+ asyncio support.
+
+ https://github.com/bluetooth-devices/dbus-fast
diff --git a/package/python-dbus-fast/python-dbus-fast.hash b/package/python-dbus-fast/python-dbus-fast.hash
new file mode 100644
index 0000000000..f0dceeb43d
--- /dev/null
+++ b/package/python-dbus-fast/python-dbus-fast.hash
@@ -0,0 +1,5 @@
+# md5, sha256 from https://pypi.org/pypi/dbus-fast/json
+md5 eebf2c558dd1af0f8f32b361e91f2fa3 dbus_fast-1.61.1.tar.gz
+sha256 bda4a7d559047b74f409eda278f68f610a418e86ad3efa0368fa2ed240daa6b6 dbus_fast-1.61.1.tar.gz
+# Locally computed sha256 checksums
+sha256 c37e9c75110e01d1f0c5360dc7d7776a30ac5f70d2440db214423e4b7a77a6af LICENSE
diff --git a/package/python-dbus-fast/python-dbus-fast.mk b/package/python-dbus-fast/python-dbus-fast.mk
new file mode 100644
index 0000000000..de7049ba22
--- /dev/null
+++ b/package/python-dbus-fast/python-dbus-fast.mk
@@ -0,0 +1,16 @@
+################################################################################
+#
+# python-dbus-fast
+#
+################################################################################
+
+PYTHON_DBUS_FAST_VERSION = 1.61.1
+PYTHON_DBUS_FAST_SOURCE = dbus_fast-$(PYTHON_DBUS_FAST_VERSION).tar.gz
+PYTHON_DBUS_FAST_SITE = https://files.pythonhosted.org/packages/dd/f4/a280d46b119d59f6a3d84abf474452ae76651558b0963ab8c48ae13b5a44
+PYTHON_DBUS_FAST_SETUP_TYPE = setuptools
+PYTHON_DBUS_FAST_LICENSE = MIT
+PYTHON_DBUS_FAST_LICENSE_FILES = LICENSE
+PYTHON_DBUS_FAST_ENV = REQUIRE_CYTHON=1
+PYTHON_DBUS_FAST_DEPENDENCIES = host-python-cython
+
+$(eval $(python-package))
diff --git a/support/testing/tests/package/sample_python_dbus_fast.py b/support/testing/tests/package/sample_python_dbus_fast.py
new file mode 100644
index 0000000000..c2855464a1
--- /dev/null
+++ b/support/testing/tests/package/sample_python_dbus_fast.py
@@ -0,0 +1,44 @@
+import asyncio
+from dbus_fast.aio import MessageBus
+from dbus_fast.service import ServiceInterface, method
+import dbus_fast.introspection as intr
+from dbus_fast import BusType
+
+
+class SampleInterface(ServiceInterface):
+ def __init__(self):
+ super().__init__('test.interface')
+
+ @method()
+ def Ping(self):
+ pass
+
+ @method()
+ def ConcatStrings(self, what1: 's', what2: 's') -> 's': # noqa: F821
+ return what1 + what2
+
+
+async def main():
+ bus_name = 'dbus.fast.sample'
+
+ bus = await MessageBus(bus_type=BusType.SYSTEM).connect()
+ bus2 = await MessageBus(bus_type=BusType.SYSTEM).connect()
+
+ await bus.request_name(bus_name)
+
+ service_interface = SampleInterface()
+ bus.export('/test/path', service_interface)
+
+ introspection = await bus2.introspect(bus_name, '/test/path')
+ assert type(introspection) is intr.Node
+ obj = bus2.get_proxy_object(bus_name, '/test/path', introspection)
+ interface = obj.get_interface(service_interface.name)
+
+ result = await interface.call_ping()
+ assert result is None
+
+ result = await interface.call_concat_strings('hello ', 'world')
+ assert result == 'hello world'
+
+
+asyncio.run(main())
diff --git a/support/testing/tests/package/test_python_dbus_fast.py b/support/testing/tests/package/test_python_dbus_fast.py
new file mode 100644
index 0000000000..5f67cfd8cc
--- /dev/null
+++ b/support/testing/tests/package/test_python_dbus_fast.py
@@ -0,0 +1,40 @@
+import textwrap
+
+
+from tests.package.test_python import TestPythonPackageBase
+
+
+class TestPythonPy3DBusFast(TestPythonPackageBase):
+ __test__ = True
+ config = TestPythonPackageBase.config + \
+ """
+ BR2_PACKAGE_DBUS=y
+ BR2_PACKAGE_PYTHON3=y
+ BR2_PACKAGE_PYTHON_DBUS_FAST=y
+ """
+ sample_scripts = ["tests/package/sample_python_dbus_fast.py"]
+
+ def run_sample_scripts(self):
+ config = \
+ """
+ <!DOCTYPE busconfig PUBLIC "-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN"
+ "http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd">
+ <busconfig>
+ <policy user="root">
+ <allow own="dbus.fast.sample"/>
+ <allow send_destination="dbus.fast.sample"/>
+ </policy>
+ </busconfig>
+ """
+ config = textwrap.dedent(config)
+ config_dir = "/etc/dbus-1/system.d"
+ config_fn = "dbus.fast.sample.conf"
+
+ # Setup and reload D-Bus configuration
+ self.emulator.run("mkdir -p " + config_dir)
+ self.emulator.run("cat > " + config_dir + "/" + config_fn +
+ " <<EOF" + config + "EOF")
+ self.emulator.run("killall -SIGHUP dbus-daemon")
+
+ # Run test scripts
+ super().run_sample_scripts()
--
2.38.1
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [Buildroot] [PATCH v2 2/2] package/python-bleak: bump version to 0.19.1
2022-11-03 10:21 [Buildroot] [PATCH v2 1/2] package/python-dbus-fast: new package Marcin Niestroj
@ 2022-11-03 10:21 ` Marcin Niestroj
2022-11-03 12:12 ` James Hilliard
2022-12-11 9:10 ` Yann E. MORIN
2022-11-03 12:13 ` [Buildroot] [PATCH v2 1/2] package/python-dbus-fast: new package James Hilliard
2023-01-02 21:37 ` Yann E. MORIN
2 siblings, 2 replies; 8+ messages in thread
From: Marcin Niestroj @ 2022-11-03 10:21 UTC (permalink / raw)
To: buildroot; +Cc: James Hilliard, Marcin Niestroj, Asaf Kahlon
Signed-off-by: Marcin Niestroj <m.niestroj@grinn-global.com>
---
v1 -> v2: no changes
package/python-bleak/Config.in | 3 ++-
package/python-bleak/python-bleak.hash | 4 ++--
package/python-bleak/python-bleak.mk | 4 ++--
3 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/package/python-bleak/Config.in b/package/python-bleak/Config.in
index 085c16fae8..691450f86b 100644
--- a/package/python-bleak/Config.in
+++ b/package/python-bleak/Config.in
@@ -1,6 +1,7 @@
config BR2_PACKAGE_PYTHON_BLEAK
bool "python-bleak"
- select BR2_PACKAGE_PYTHON_DBUS_NEXT # runtime
+ select BR2_PACKAGE_PYTHON_ASYNC_TIMEOUT # runtime
+ select BR2_PACKAGE_PYTHON_DBUS_FAST # runtime
help
Bluetooth Low Energy platform Agnostic Klient.
diff --git a/package/python-bleak/python-bleak.hash b/package/python-bleak/python-bleak.hash
index 5acac877c9..9a8310b11c 100644
--- a/package/python-bleak/python-bleak.hash
+++ b/package/python-bleak/python-bleak.hash
@@ -1,5 +1,5 @@
# md5, sha256 from https://pypi.org/pypi/bleak/json
-md5 0c26b270358a782767012220fc595aa5 bleak-0.12.1.tar.gz
-sha256 4a80a24cc944e52e856054639f298229c39a2fc720e5f7adbeebb117d10849ed bleak-0.12.1.tar.gz
+md5 57564087d6e17ad1853109f530279b27 bleak-0.19.1.tar.gz
+sha256 dff7c7f281dcb6629d0d722209c79ec3aa2a6c33867cb5c1ea3d44b72ca155c0 bleak-0.19.1.tar.gz
# Locally computed sha256 checksums
sha256 c4029a2b63b3824ab68be841f414addbdde20cb79cdbe272fa80c0b2abe65374 LICENSE
diff --git a/package/python-bleak/python-bleak.mk b/package/python-bleak/python-bleak.mk
index 3ae6d90311..00a4946ef6 100644
--- a/package/python-bleak/python-bleak.mk
+++ b/package/python-bleak/python-bleak.mk
@@ -4,9 +4,9 @@
#
################################################################################
-PYTHON_BLEAK_VERSION = 0.12.1
+PYTHON_BLEAK_VERSION = 0.19.1
PYTHON_BLEAK_SOURCE = bleak-$(PYTHON_BLEAK_VERSION).tar.gz
-PYTHON_BLEAK_SITE = https://files.pythonhosted.org/packages/67/4b/ba00c69a24a8d08c86f02caa45727a2ad2844c7bee9630ccb063be226f71
+PYTHON_BLEAK_SITE = https://files.pythonhosted.org/packages/30/b9/60e1f455365e2340fe076cf7683f4e6d03db0b759d4f93fa45e68dc371e5
PYTHON_BLEAK_SETUP_TYPE = setuptools
PYTHON_BLEAK_LICENSE = MIT
PYTHON_BLEAK_LICENSE_FILES = LICENSE
--
2.38.1
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [Buildroot] [PATCH v2 2/2] package/python-bleak: bump version to 0.19.1
2022-11-03 10:21 ` [Buildroot] [PATCH v2 2/2] package/python-bleak: bump version to 0.19.1 Marcin Niestroj
@ 2022-11-03 12:12 ` James Hilliard
2022-12-11 9:10 ` Yann E. MORIN
1 sibling, 0 replies; 8+ messages in thread
From: James Hilliard @ 2022-11-03 12:12 UTC (permalink / raw)
To: Marcin Niestroj; +Cc: Asaf Kahlon, buildroot
On Thu, Nov 3, 2022 at 6:21 AM Marcin Niestroj
<m.niestroj@grinn-global.com> wrote:
>
> Signed-off-by: Marcin Niestroj <m.niestroj@grinn-global.com>
Reviewed-by: James Hilliard <james.hilliard1@gmail.com>
> ---
> v1 -> v2: no changes
>
> package/python-bleak/Config.in | 3 ++-
> package/python-bleak/python-bleak.hash | 4 ++--
> package/python-bleak/python-bleak.mk | 4 ++--
> 3 files changed, 6 insertions(+), 5 deletions(-)
>
> diff --git a/package/python-bleak/Config.in b/package/python-bleak/Config.in
> index 085c16fae8..691450f86b 100644
> --- a/package/python-bleak/Config.in
> +++ b/package/python-bleak/Config.in
> @@ -1,6 +1,7 @@
> config BR2_PACKAGE_PYTHON_BLEAK
> bool "python-bleak"
> - select BR2_PACKAGE_PYTHON_DBUS_NEXT # runtime
> + select BR2_PACKAGE_PYTHON_ASYNC_TIMEOUT # runtime
> + select BR2_PACKAGE_PYTHON_DBUS_FAST # runtime
> help
> Bluetooth Low Energy platform Agnostic Klient.
>
> diff --git a/package/python-bleak/python-bleak.hash b/package/python-bleak/python-bleak.hash
> index 5acac877c9..9a8310b11c 100644
> --- a/package/python-bleak/python-bleak.hash
> +++ b/package/python-bleak/python-bleak.hash
> @@ -1,5 +1,5 @@
> # md5, sha256 from https://pypi.org/pypi/bleak/json
> -md5 0c26b270358a782767012220fc595aa5 bleak-0.12.1.tar.gz
> -sha256 4a80a24cc944e52e856054639f298229c39a2fc720e5f7adbeebb117d10849ed bleak-0.12.1.tar.gz
> +md5 57564087d6e17ad1853109f530279b27 bleak-0.19.1.tar.gz
> +sha256 dff7c7f281dcb6629d0d722209c79ec3aa2a6c33867cb5c1ea3d44b72ca155c0 bleak-0.19.1.tar.gz
> # Locally computed sha256 checksums
> sha256 c4029a2b63b3824ab68be841f414addbdde20cb79cdbe272fa80c0b2abe65374 LICENSE
> diff --git a/package/python-bleak/python-bleak.mk b/package/python-bleak/python-bleak.mk
> index 3ae6d90311..00a4946ef6 100644
> --- a/package/python-bleak/python-bleak.mk
> +++ b/package/python-bleak/python-bleak.mk
> @@ -4,9 +4,9 @@
> #
> ################################################################################
>
> -PYTHON_BLEAK_VERSION = 0.12.1
> +PYTHON_BLEAK_VERSION = 0.19.1
> PYTHON_BLEAK_SOURCE = bleak-$(PYTHON_BLEAK_VERSION).tar.gz
> -PYTHON_BLEAK_SITE = https://files.pythonhosted.org/packages/67/4b/ba00c69a24a8d08c86f02caa45727a2ad2844c7bee9630ccb063be226f71
> +PYTHON_BLEAK_SITE = https://files.pythonhosted.org/packages/30/b9/60e1f455365e2340fe076cf7683f4e6d03db0b759d4f93fa45e68dc371e5
> PYTHON_BLEAK_SETUP_TYPE = setuptools
> PYTHON_BLEAK_LICENSE = MIT
> PYTHON_BLEAK_LICENSE_FILES = LICENSE
> --
> 2.38.1
>
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Buildroot] [PATCH v2 1/2] package/python-dbus-fast: new package
2022-11-03 10:21 [Buildroot] [PATCH v2 1/2] package/python-dbus-fast: new package Marcin Niestroj
2022-11-03 10:21 ` [Buildroot] [PATCH v2 2/2] package/python-bleak: bump version to 0.19.1 Marcin Niestroj
@ 2022-11-03 12:13 ` James Hilliard
2023-01-02 21:37 ` Yann E. MORIN
2 siblings, 0 replies; 8+ messages in thread
From: James Hilliard @ 2022-11-03 12:13 UTC (permalink / raw)
To: Marcin Niestroj; +Cc: Asaf Kahlon, Thomas Petazzoni, buildroot
On Thu, Nov 3, 2022 at 6:21 AM Marcin Niestroj
<m.niestroj@grinn-global.com> wrote:
>
> Signed-off-by: Marcin Niestroj <m.niestroj@grinn-global.com>
Reviewed-by: James Hilliard <james.hilliard1@gmail.com>
> ---
> v1 -> v2:
> * added REQUIRE_CYTHON=1 env and host-python-cython dependencies (suggested by
> James)
>
> DEVELOPERS | 2 +
> package/Config.in | 1 +
> package/python-dbus-fast/Config.in | 9 ++++
> .../python-dbus-fast/python-dbus-fast.hash | 5 +++
> package/python-dbus-fast/python-dbus-fast.mk | 16 +++++++
> .../tests/package/sample_python_dbus_fast.py | 44 +++++++++++++++++++
> .../tests/package/test_python_dbus_fast.py | 40 +++++++++++++++++
> 7 files changed, 117 insertions(+)
> create mode 100644 package/python-dbus-fast/Config.in
> create mode 100644 package/python-dbus-fast/python-dbus-fast.hash
> create mode 100644 package/python-dbus-fast/python-dbus-fast.mk
> create mode 100644 support/testing/tests/package/sample_python_dbus_fast.py
> create mode 100644 support/testing/tests/package/test_python_dbus_fast.py
>
> diff --git a/DEVELOPERS b/DEVELOPERS
> index 7d27936992..6d670ae21a 100644
> --- a/DEVELOPERS
> +++ b/DEVELOPERS
> @@ -1881,6 +1881,7 @@ F: package/murata-cyw-fw/
> F: package/netdata/
> F: package/python-ansicolors/
> F: package/python-bleak/
> +F: package/python-dbus-fast/
> F: package/python-dbus-next/
> F: package/python-iniconfig/
> F: package/python-intelhex/
> @@ -1892,6 +1893,7 @@ F: package/python-typing-extensions/
> F: package/python-xmodem/
> F: package/rs485conf/
> F: package/turbolua/
> +F: support/testing/tests/package/sample_python_dbus_fast.py
> F: support/testing/tests/package/sample_python_dbus_next.py
> F: support/testing/tests/package/sample_python_pytest.py
> F: support/testing/tests/package/sample_python_pytest_asyncio.py
> diff --git a/package/Config.in b/package/Config.in
> index 238d7813f0..db9e94f357 100644
> --- a/package/Config.in
> +++ b/package/Config.in
> @@ -1015,6 +1015,7 @@ menu "External python modules"
> source "package/python-daphne/Config.in"
> source "package/python-dataproperty/Config.in"
> source "package/python-dateutil/Config.in"
> + source "package/python-dbus-fast/Config.in"
> source "package/python-dbus-next/Config.in"
> source "package/python-decorator/Config.in"
> source "package/python-defusedxml/Config.in"
> diff --git a/package/python-dbus-fast/Config.in b/package/python-dbus-fast/Config.in
> new file mode 100644
> index 0000000000..2665bd1964
> --- /dev/null
> +++ b/package/python-dbus-fast/Config.in
> @@ -0,0 +1,9 @@
> +config BR2_PACKAGE_PYTHON_DBUS_FAST
> + bool "python-dbus-fast"
> + select BR2_PACKAGE_PYTHON3_PYEXPAT # runtime
> + select BR2_PACKAGE_PYTHON_ASYNC_TIMEOUT # runtime
> + help
> + A faster version of dbus-next, a DBus library for Python with
> + asyncio support.
> +
> + https://github.com/bluetooth-devices/dbus-fast
> diff --git a/package/python-dbus-fast/python-dbus-fast.hash b/package/python-dbus-fast/python-dbus-fast.hash
> new file mode 100644
> index 0000000000..f0dceeb43d
> --- /dev/null
> +++ b/package/python-dbus-fast/python-dbus-fast.hash
> @@ -0,0 +1,5 @@
> +# md5, sha256 from https://pypi.org/pypi/dbus-fast/json
> +md5 eebf2c558dd1af0f8f32b361e91f2fa3 dbus_fast-1.61.1.tar.gz
> +sha256 bda4a7d559047b74f409eda278f68f610a418e86ad3efa0368fa2ed240daa6b6 dbus_fast-1.61.1.tar.gz
> +# Locally computed sha256 checksums
> +sha256 c37e9c75110e01d1f0c5360dc7d7776a30ac5f70d2440db214423e4b7a77a6af LICENSE
> diff --git a/package/python-dbus-fast/python-dbus-fast.mk b/package/python-dbus-fast/python-dbus-fast.mk
> new file mode 100644
> index 0000000000..de7049ba22
> --- /dev/null
> +++ b/package/python-dbus-fast/python-dbus-fast.mk
> @@ -0,0 +1,16 @@
> +################################################################################
> +#
> +# python-dbus-fast
> +#
> +################################################################################
> +
> +PYTHON_DBUS_FAST_VERSION = 1.61.1
> +PYTHON_DBUS_FAST_SOURCE = dbus_fast-$(PYTHON_DBUS_FAST_VERSION).tar.gz
> +PYTHON_DBUS_FAST_SITE = https://files.pythonhosted.org/packages/dd/f4/a280d46b119d59f6a3d84abf474452ae76651558b0963ab8c48ae13b5a44
> +PYTHON_DBUS_FAST_SETUP_TYPE = setuptools
> +PYTHON_DBUS_FAST_LICENSE = MIT
> +PYTHON_DBUS_FAST_LICENSE_FILES = LICENSE
> +PYTHON_DBUS_FAST_ENV = REQUIRE_CYTHON=1
> +PYTHON_DBUS_FAST_DEPENDENCIES = host-python-cython
> +
> +$(eval $(python-package))
> diff --git a/support/testing/tests/package/sample_python_dbus_fast.py b/support/testing/tests/package/sample_python_dbus_fast.py
> new file mode 100644
> index 0000000000..c2855464a1
> --- /dev/null
> +++ b/support/testing/tests/package/sample_python_dbus_fast.py
> @@ -0,0 +1,44 @@
> +import asyncio
> +from dbus_fast.aio import MessageBus
> +from dbus_fast.service import ServiceInterface, method
> +import dbus_fast.introspection as intr
> +from dbus_fast import BusType
> +
> +
> +class SampleInterface(ServiceInterface):
> + def __init__(self):
> + super().__init__('test.interface')
> +
> + @method()
> + def Ping(self):
> + pass
> +
> + @method()
> + def ConcatStrings(self, what1: 's', what2: 's') -> 's': # noqa: F821
> + return what1 + what2
> +
> +
> +async def main():
> + bus_name = 'dbus.fast.sample'
> +
> + bus = await MessageBus(bus_type=BusType.SYSTEM).connect()
> + bus2 = await MessageBus(bus_type=BusType.SYSTEM).connect()
> +
> + await bus.request_name(bus_name)
> +
> + service_interface = SampleInterface()
> + bus.export('/test/path', service_interface)
> +
> + introspection = await bus2.introspect(bus_name, '/test/path')
> + assert type(introspection) is intr.Node
> + obj = bus2.get_proxy_object(bus_name, '/test/path', introspection)
> + interface = obj.get_interface(service_interface.name)
> +
> + result = await interface.call_ping()
> + assert result is None
> +
> + result = await interface.call_concat_strings('hello ', 'world')
> + assert result == 'hello world'
> +
> +
> +asyncio.run(main())
> diff --git a/support/testing/tests/package/test_python_dbus_fast.py b/support/testing/tests/package/test_python_dbus_fast.py
> new file mode 100644
> index 0000000000..5f67cfd8cc
> --- /dev/null
> +++ b/support/testing/tests/package/test_python_dbus_fast.py
> @@ -0,0 +1,40 @@
> +import textwrap
> +
> +
> +from tests.package.test_python import TestPythonPackageBase
> +
> +
> +class TestPythonPy3DBusFast(TestPythonPackageBase):
> + __test__ = True
> + config = TestPythonPackageBase.config + \
> + """
> + BR2_PACKAGE_DBUS=y
> + BR2_PACKAGE_PYTHON3=y
> + BR2_PACKAGE_PYTHON_DBUS_FAST=y
> + """
> + sample_scripts = ["tests/package/sample_python_dbus_fast.py"]
> +
> + def run_sample_scripts(self):
> + config = \
> + """
> + <!DOCTYPE busconfig PUBLIC "-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN"
> + "http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd">
> + <busconfig>
> + <policy user="root">
> + <allow own="dbus.fast.sample"/>
> + <allow send_destination="dbus.fast.sample"/>
> + </policy>
> + </busconfig>
> + """
> + config = textwrap.dedent(config)
> + config_dir = "/etc/dbus-1/system.d"
> + config_fn = "dbus.fast.sample.conf"
> +
> + # Setup and reload D-Bus configuration
> + self.emulator.run("mkdir -p " + config_dir)
> + self.emulator.run("cat > " + config_dir + "/" + config_fn +
> + " <<EOF" + config + "EOF")
> + self.emulator.run("killall -SIGHUP dbus-daemon")
> +
> + # Run test scripts
> + super().run_sample_scripts()
> --
> 2.38.1
>
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Buildroot] [PATCH v2 2/2] package/python-bleak: bump version to 0.19.1
2022-11-03 10:21 ` [Buildroot] [PATCH v2 2/2] package/python-bleak: bump version to 0.19.1 Marcin Niestroj
2022-11-03 12:12 ` James Hilliard
@ 2022-12-11 9:10 ` Yann E. MORIN
2023-01-02 11:23 ` Marcin Niestrój
1 sibling, 1 reply; 8+ messages in thread
From: Yann E. MORIN @ 2022-12-11 9:10 UTC (permalink / raw)
To: Marcin Niestroj; +Cc: James Hilliard, Asaf Kahlon, buildroot
Marcin, All,
On 2022-11-03 11:21 +0100, Marcin Niestroj spake thusly:
> Signed-off-by: Marcin Niestroj <m.niestroj@grinn-global.com>
Applied to master, thanks.
Regards,
Yann E. MORIN.
> ---
> v1 -> v2: no changes
>
> package/python-bleak/Config.in | 3 ++-
> package/python-bleak/python-bleak.hash | 4 ++--
> package/python-bleak/python-bleak.mk | 4 ++--
> 3 files changed, 6 insertions(+), 5 deletions(-)
>
> diff --git a/package/python-bleak/Config.in b/package/python-bleak/Config.in
> index 085c16fae8..691450f86b 100644
> --- a/package/python-bleak/Config.in
> +++ b/package/python-bleak/Config.in
> @@ -1,6 +1,7 @@
> config BR2_PACKAGE_PYTHON_BLEAK
> bool "python-bleak"
> - select BR2_PACKAGE_PYTHON_DBUS_NEXT # runtime
> + select BR2_PACKAGE_PYTHON_ASYNC_TIMEOUT # runtime
> + select BR2_PACKAGE_PYTHON_DBUS_FAST # runtime
> help
> Bluetooth Low Energy platform Agnostic Klient.
>
> diff --git a/package/python-bleak/python-bleak.hash b/package/python-bleak/python-bleak.hash
> index 5acac877c9..9a8310b11c 100644
> --- a/package/python-bleak/python-bleak.hash
> +++ b/package/python-bleak/python-bleak.hash
> @@ -1,5 +1,5 @@
> # md5, sha256 from https://pypi.org/pypi/bleak/json
> -md5 0c26b270358a782767012220fc595aa5 bleak-0.12.1.tar.gz
> -sha256 4a80a24cc944e52e856054639f298229c39a2fc720e5f7adbeebb117d10849ed bleak-0.12.1.tar.gz
> +md5 57564087d6e17ad1853109f530279b27 bleak-0.19.1.tar.gz
> +sha256 dff7c7f281dcb6629d0d722209c79ec3aa2a6c33867cb5c1ea3d44b72ca155c0 bleak-0.19.1.tar.gz
> # Locally computed sha256 checksums
> sha256 c4029a2b63b3824ab68be841f414addbdde20cb79cdbe272fa80c0b2abe65374 LICENSE
> diff --git a/package/python-bleak/python-bleak.mk b/package/python-bleak/python-bleak.mk
> index 3ae6d90311..00a4946ef6 100644
> --- a/package/python-bleak/python-bleak.mk
> +++ b/package/python-bleak/python-bleak.mk
> @@ -4,9 +4,9 @@
> #
> ################################################################################
>
> -PYTHON_BLEAK_VERSION = 0.12.1
> +PYTHON_BLEAK_VERSION = 0.19.1
> PYTHON_BLEAK_SOURCE = bleak-$(PYTHON_BLEAK_VERSION).tar.gz
> -PYTHON_BLEAK_SITE = https://files.pythonhosted.org/packages/67/4b/ba00c69a24a8d08c86f02caa45727a2ad2844c7bee9630ccb063be226f71
> +PYTHON_BLEAK_SITE = https://files.pythonhosted.org/packages/30/b9/60e1f455365e2340fe076cf7683f4e6d03db0b759d4f93fa45e68dc371e5
> PYTHON_BLEAK_SETUP_TYPE = setuptools
> PYTHON_BLEAK_LICENSE = MIT
> PYTHON_BLEAK_LICENSE_FILES = LICENSE
> --
> 2.38.1
>
> _______________________________________________
> buildroot mailing list
> buildroot@buildroot.org
> https://lists.buildroot.org/mailman/listinfo/buildroot
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 561 099 427 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Buildroot] [PATCH v2 2/2] package/python-bleak: bump version to 0.19.1
2022-12-11 9:10 ` Yann E. MORIN
@ 2023-01-02 11:23 ` Marcin Niestrój
2023-01-02 18:08 ` Yann E. MORIN
0 siblings, 1 reply; 8+ messages in thread
From: Marcin Niestrój @ 2023-01-02 11:23 UTC (permalink / raw)
To: Yann E. MORIN; +Cc: James Hilliard, Asaf Kahlon, buildroot
Hi Yann,
"Yann E. MORIN" <yann.morin.1998@free.fr> writes:
> Marcin, All,
>
> On 2022-11-03 11:21 +0100, Marcin Niestroj spake thusly:
>> Signed-off-by: Marcin Niestroj <m.niestroj@grinn-global.com>
>
> Applied to master, thanks.
>
I have noticed that this patch was applied to master without PATCH 1/2
that adds python-dbus-next package, which is a runtime dependency.
--
Regards,
Marcin Niestrój
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Buildroot] [PATCH v2 2/2] package/python-bleak: bump version to 0.19.1
2023-01-02 11:23 ` Marcin Niestrój
@ 2023-01-02 18:08 ` Yann E. MORIN
0 siblings, 0 replies; 8+ messages in thread
From: Yann E. MORIN @ 2023-01-02 18:08 UTC (permalink / raw)
To: Marcin Niestrój; +Cc: James Hilliard, Asaf Kahlon, buildroot
Marcin, All,
On 2023-01-02 12:23 +0100, Marcin Niestrój spake thusly:
> "Yann E. MORIN" <yann.morin.1998@free.fr> writes:
> > Marcin, All,
> >
> > On 2022-11-03 11:21 +0100, Marcin Niestroj spake thusly:
> >> Signed-off-by: Marcin Niestroj <m.niestroj@grinn-global.com>
> > Applied to master, thanks.
> I have noticed that this patch was applied to master without PATCH 1/2
> that adds python-dbus-next package, which is a runtime dependency.
Indeed, this is a complete oversight here, and I don't remember why I
did not apply it...
I'll look into right now (but please allow dinner to be an unmaskable
interrupt should that trigger before I'm done ;-) )
Regards,
Yann E. MORIN.
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 561 099 427 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Buildroot] [PATCH v2 1/2] package/python-dbus-fast: new package
2022-11-03 10:21 [Buildroot] [PATCH v2 1/2] package/python-dbus-fast: new package Marcin Niestroj
2022-11-03 10:21 ` [Buildroot] [PATCH v2 2/2] package/python-bleak: bump version to 0.19.1 Marcin Niestroj
2022-11-03 12:13 ` [Buildroot] [PATCH v2 1/2] package/python-dbus-fast: new package James Hilliard
@ 2023-01-02 21:37 ` Yann E. MORIN
2 siblings, 0 replies; 8+ messages in thread
From: Yann E. MORIN @ 2023-01-02 21:37 UTC (permalink / raw)
To: Marcin Niestroj; +Cc: James Hilliard, Thomas Petazzoni, Asaf Kahlon, buildroot
Narcin, All,
On 2022-11-03 11:21 +0100, Marcin Niestroj spake thusly:
> Signed-off-by: Marcin Niestroj <m.niestroj@grinn-global.com>
[--SNIP--]
> diff --git a/package/python-dbus-fast/python-dbus-fast.mk b/package/python-dbus-fast/python-dbus-fast.mk
> new file mode 100644
> index 0000000000..de7049ba22
> --- /dev/null
> +++ b/package/python-dbus-fast/python-dbus-fast.mk
> @@ -0,0 +1,16 @@
> +################################################################################
> +#
> +# python-dbus-fast
> +#
> +################################################################################
> +
> +PYTHON_DBUS_FAST_VERSION = 1.61.1
> +PYTHON_DBUS_FAST_SOURCE = dbus_fast-$(PYTHON_DBUS_FAST_VERSION).tar.gz
> +PYTHON_DBUS_FAST_SITE = https://files.pythonhosted.org/packages/dd/f4/a280d46b119d59f6a3d84abf474452ae76651558b0963ab8c48ae13b5a44
> +PYTHON_DBUS_FAST_SETUP_TYPE = setuptools
> +PYTHON_DBUS_FAST_LICENSE = MIT
> +PYTHON_DBUS_FAST_LICENSE_FILES = LICENSE
> +PYTHON_DBUS_FAST_ENV = REQUIRE_CYTHON=1
> +PYTHON_DBUS_FAST_DEPENDENCIES = host-python-cython
Since there is a Kconfig symbol for host-python-cython, I've added the
appropriate select in Config.in.
> +$(eval $(python-package))
> diff --git a/support/testing/tests/package/sample_python_dbus_fast.py b/support/testing/tests/package/sample_python_dbus_fast.py
> new file mode 100644
> index 0000000000..c2855464a1
> --- /dev/null
> +++ b/support/testing/tests/package/sample_python_dbus_fast.py
> @@ -0,0 +1,44 @@
> +import asyncio
> +from dbus_fast.aio import MessageBus
> +from dbus_fast.service import ServiceInterface, method
> +import dbus_fast.introspection as intr
> +from dbus_fast import BusType
> +
> +
> +class SampleInterface(ServiceInterface):
> + def __init__(self):
> + super().__init__('test.interface')
> +
> + @method()
> + def Ping(self):
> + pass
> +
> + @method()
> + def ConcatStrings(self, what1: 's', what2: 's') -> 's': # noqa: F821
> + return what1 + what2
> +
> +
> +async def main():
> + bus_name = 'dbus.fast.sample'
I've introduced obj_path = '/test/path', and...
> +
> + bus = await MessageBus(bus_type=BusType.SYSTEM).connect()
> + bus2 = await MessageBus(bus_type=BusType.SYSTEM).connect()
> +
> + await bus.request_name(bus_name)
> +
> + service_interface = SampleInterface()
> + bus.export('/test/path', service_interface)
... used it here, and...
> + introspection = await bus2.introspect(bus_name, '/test/path')
... here, and....
> + assert type(introspection) is intr.Node
> + obj = bus2.get_proxy_object(bus_name, '/test/path', introspection)
... here.
Applied to master, thanks.
Sorry for missing this patch when I got to apply python-bleak's bump a
few weeks ago; thanks for reminding me.
Regards,
Yann E. MORIN.
> + interface = obj.get_interface(service_interface.name)
> +
> + result = await interface.call_ping()
> + assert result is None
> +
> + result = await interface.call_concat_strings('hello ', 'world')
> + assert result == 'hello world'
> +
> +
> +asyncio.run(main())
> diff --git a/support/testing/tests/package/test_python_dbus_fast.py b/support/testing/tests/package/test_python_dbus_fast.py
> new file mode 100644
> index 0000000000..5f67cfd8cc
> --- /dev/null
> +++ b/support/testing/tests/package/test_python_dbus_fast.py
> @@ -0,0 +1,40 @@
> +import textwrap
> +
> +
> +from tests.package.test_python import TestPythonPackageBase
> +
> +
> +class TestPythonPy3DBusFast(TestPythonPackageBase):
> + __test__ = True
> + config = TestPythonPackageBase.config + \
> + """
> + BR2_PACKAGE_DBUS=y
> + BR2_PACKAGE_PYTHON3=y
> + BR2_PACKAGE_PYTHON_DBUS_FAST=y
> + """
> + sample_scripts = ["tests/package/sample_python_dbus_fast.py"]
> +
> + def run_sample_scripts(self):
> + config = \
> + """
> + <!DOCTYPE busconfig PUBLIC "-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN"
> + "http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd">
> + <busconfig>
> + <policy user="root">
> + <allow own="dbus.fast.sample"/>
> + <allow send_destination="dbus.fast.sample"/>
> + </policy>
> + </busconfig>
> + """
> + config = textwrap.dedent(config)
> + config_dir = "/etc/dbus-1/system.d"
> + config_fn = "dbus.fast.sample.conf"
> +
> + # Setup and reload D-Bus configuration
> + self.emulator.run("mkdir -p " + config_dir)
> + self.emulator.run("cat > " + config_dir + "/" + config_fn +
> + " <<EOF" + config + "EOF")
> + self.emulator.run("killall -SIGHUP dbus-daemon")
> +
> + # Run test scripts
> + super().run_sample_scripts()
> --
> 2.38.1
>
> _______________________________________________
> buildroot mailing list
> buildroot@buildroot.org
> https://lists.buildroot.org/mailman/listinfo/buildroot
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 561 099 427 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2023-01-02 21:38 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-03 10:21 [Buildroot] [PATCH v2 1/2] package/python-dbus-fast: new package Marcin Niestroj
2022-11-03 10:21 ` [Buildroot] [PATCH v2 2/2] package/python-bleak: bump version to 0.19.1 Marcin Niestroj
2022-11-03 12:12 ` James Hilliard
2022-12-11 9:10 ` Yann E. MORIN
2023-01-02 11:23 ` Marcin Niestrój
2023-01-02 18:08 ` Yann E. MORIN
2022-11-03 12:13 ` [Buildroot] [PATCH v2 1/2] package/python-dbus-fast: new package James Hilliard
2023-01-02 21:37 ` Yann E. MORIN
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.