All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 0/2] Asynchronous OPC UP Python client
@ 2020-09-04 14:32 Jugurtha BELKALEM
  2020-09-04 14:33 ` [Buildroot] [PATCH 1/2] package/python-aiofiles : new package Jugurtha BELKALEM
  2020-09-04 14:33 ` [Buildroot] [PATCH 2/2] package/python-opcua-asyncio " Jugurtha BELKALEM
  0 siblings, 2 replies; 5+ messages in thread
From: Jugurtha BELKALEM @ 2020-09-04 14:32 UTC (permalink / raw)
  To: buildroot

Even though OPC UA SDKs provide synchronous versions
(in addition to asynchronous APIs) for OPC UA operations;
these should not be used as they block until
timeout is reached or server's response reception arrives.

opcua-asyncio allows to create an asynchronous behaviour for
a python OPC UA client.

Jugurtha BELKALEM (2):
  package/python-aiofiles : new package
  package/python-opcua-asyncio : new package

 DEVELOPERS                                             |  2 ++
 package/Config.in                                      |  2 ++
 package/python-aiofiles/Config.in                      |  8 ++++++++
 package/python-aiofiles/python-aiofiles.hash           |  5 +++++
 package/python-aiofiles/python-aiofiles.mk             | 14 ++++++++++++++
 package/python-opcua-asyncio/Config.in                 | 14 ++++++++++++++
 package/python-opcua-asyncio/python-opcua-asyncio.hash |  3 +++
 package/python-opcua-asyncio/python-opcua-asyncio.mk   | 14 ++++++++++++++
 8 files changed, 62 insertions(+)
 create mode 100644 package/python-aiofiles/Config.in
 create mode 100644 package/python-aiofiles/python-aiofiles.hash
 create mode 100644 package/python-aiofiles/python-aiofiles.mk
 create mode 100644 package/python-opcua-asyncio/Config.in
 create mode 100644 package/python-opcua-asyncio/python-opcua-asyncio.hash
 create mode 100644 package/python-opcua-asyncio/python-opcua-asyncio.mk

-- 
2.11.0

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Buildroot] [PATCH 1/2] package/python-aiofiles : new package
  2020-09-04 14:32 [Buildroot] [PATCH 0/2] Asynchronous OPC UP Python client Jugurtha BELKALEM
@ 2020-09-04 14:33 ` Jugurtha BELKALEM
  2020-09-06 19:00   ` Thomas Petazzoni
  2020-09-04 14:33 ` [Buildroot] [PATCH 2/2] package/python-opcua-asyncio " Jugurtha BELKALEM
  1 sibling, 1 reply; 5+ messages in thread
From: Jugurtha BELKALEM @ 2020-09-04 14:33 UTC (permalink / raw)
  To: buildroot

Ordinary local file IO is blocking, and cannot easily and
portably made asynchronous.
This means doing file IO may interfere with asyncio applications,
which shouldn?t block the executing thread. aiofiles helps
with this y introducing asynchronous versions of files
that support delegating operations to a separate thread pool.

More information is available at :
https://pypi.org/project/aiofiles.

Signed-off-by: Jugurtha BELKALEM <jugurtha.belkalem@smile.fr>
---
Package has been tested with check-package:
$ ./utils/check-package package/python-aiofiles/*
27 lines processed
0 warnings generated

 DEVELOPERS                                   |  1 +
 package/Config.in                            |  1 +
 package/python-aiofiles/Config.in            |  8 ++++++++
 package/python-aiofiles/python-aiofiles.hash |  5 +++++
 package/python-aiofiles/python-aiofiles.mk   | 14 ++++++++++++++
 5 files changed, 29 insertions(+)
 create mode 100644 package/python-aiofiles/Config.in
 create mode 100644 package/python-aiofiles/python-aiofiles.hash
 create mode 100644 package/python-aiofiles/python-aiofiles.mk

diff --git a/DEVELOPERS b/DEVELOPERS
index d306c5f025..5f66576b6f 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -1419,6 +1419,7 @@ N:	Joshua Henderson <joshua.henderson@microchip.com>
 F:	package/qt5/qt5wayland/
 
 N:	Jugurtha BELKALEM <jugurtha.belkalem@smile.fr>
+F:	package/python-aiofiles/
 F:	package/python-cycler/
 F:	package/python-matplotlib/
 
diff --git a/package/Config.in b/package/Config.in
index 3b6ced8f0f..f99fa83cd9 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -856,6 +856,7 @@ menu "External python modules"
 	source "package/python-aiocoap/Config.in"
 	source "package/python-aioconsole/Config.in"
 	source "package/python-aiodns/Config.in"
+	source "package/python-aiofiles/Config.in"
 	source "package/python-aiohttp/Config.in"
 	source "package/python-aiohttp-cors/Config.in"
 	source "package/python-aiohttp-debugtoolbar/Config.in"
diff --git a/package/python-aiofiles/Config.in b/package/python-aiofiles/Config.in
new file mode 100644
index 0000000000..9cc3d7fe59
--- /dev/null
+++ b/package/python-aiofiles/Config.in
@@ -0,0 +1,8 @@
+config BR2_PACKAGE_PYTHON_AIOFILES
+	bool "python-aiofiles"
+	depends on BR2_PACKAGE_PYTHON3
+	help
+	  aiofiles aims to  handle local disk files in
+	  asyncio applications.
+
+	  https://pypi.org/project/aiofiles
diff --git a/package/python-aiofiles/python-aiofiles.hash b/package/python-aiofiles/python-aiofiles.hash
new file mode 100644
index 0000000000..3c3e8565a3
--- /dev/null
+++ b/package/python-aiofiles/python-aiofiles.hash
@@ -0,0 +1,5 @@
+# md5, sha256 from https://pypi.org/pypi/aiofiles/json
+md5  2243eff06072115e8afe8907677ca51d  aiofiles-0.5.0.tar.gz
+sha256  98e6bcfd1b50f97db4980e182ddd509b7cc35909e903a8fe50d8849e02d815af  aiofiles-0.5.0.tar.gz
+# Locally computed sha256 checksums
+sha256  cb5e8e7e5f4a3988e1063c142c60dc2df75605f4c46515e776e3aca6df976e14  LICENSE
diff --git a/package/python-aiofiles/python-aiofiles.mk b/package/python-aiofiles/python-aiofiles.mk
new file mode 100644
index 0000000000..28f41e3967
--- /dev/null
+++ b/package/python-aiofiles/python-aiofiles.mk
@@ -0,0 +1,14 @@
+################################################################################
+#
+# python-aiofiles
+#
+################################################################################
+
+PYTHON_AIOFILES_VERSION = 0.5.0
+PYTHON_AIOFILES_SOURCE = aiofiles-$(PYTHON_AIOFILES_VERSION).tar.gz
+PYTHON_AIOFILES_SITE = https://files.pythonhosted.org/packages/2b/64/437053d6a4ba3b3eea1044131a25b458489320cb9609e19ac17261e4dc9b
+PYTHON_AIOFILES_SETUP_TYPE = setuptools
+PYTHON_AIOFILES_LICENSE = Apache-2.0
+PYTHON_AIOFILES_LICENSE_FILES = LICENSE
+
+$(eval $(python-package))
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [Buildroot] [PATCH 2/2] package/python-opcua-asyncio : new package
  2020-09-04 14:32 [Buildroot] [PATCH 0/2] Asynchronous OPC UP Python client Jugurtha BELKALEM
  2020-09-04 14:33 ` [Buildroot] [PATCH 1/2] package/python-aiofiles : new package Jugurtha BELKALEM
@ 2020-09-04 14:33 ` Jugurtha BELKALEM
  2020-09-07  6:51   ` Thomas Petazzoni
  1 sibling, 1 reply; 5+ messages in thread
From: Jugurtha BELKALEM @ 2020-09-04 14:33 UTC (permalink / raw)
  To: buildroot

opcua-asyncio is an asyncio-based asynchronous OPC UA client
based on python-opcua, removing hacks for support of
python < 3.6. 
Asynchronous programming allows for simpler code (e.g. less need
for locks) and potentially performance gains.

More information is available at :
https://github.com/FreeOpcUa/opcua-asyncio.

Signed-off-by: Jugurtha BELKALEM <jugurtha.belkalem@smile.fr>
---

Package has been tested with check-package:
$ ./utils/check-package package/python-opcua-asyncio/*
31 lines processed
0 warnings generated
	
 DEVELOPERS                                             |  1 +
 package/Config.in                                      |  1 +
 package/python-opcua-asyncio/Config.in                 | 14 ++++++++++++++
 package/python-opcua-asyncio/python-opcua-asyncio.hash |  3 +++
 package/python-opcua-asyncio/python-opcua-asyncio.mk   | 14 ++++++++++++++
 5 files changed, 33 insertions(+)
 create mode 100644 package/python-opcua-asyncio/Config.in
 create mode 100644 package/python-opcua-asyncio/python-opcua-asyncio.hash
 create mode 100644 package/python-opcua-asyncio/python-opcua-asyncio.mk

diff --git a/DEVELOPERS b/DEVELOPERS
index 5f66576b6f..7a289c1e46 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -1422,6 +1422,7 @@ N:	Jugurtha BELKALEM <jugurtha.belkalem@smile.fr>
 F:	package/python-aiofiles/
 F:	package/python-cycler/
 F:	package/python-matplotlib/
+F:	package/python-opcua-asyncio/
 
 N:	Juha Rantanen <juha@codercoded.com>
 F:	package/acsccid/
diff --git a/package/Config.in b/package/Config.in
index f99fa83cd9..7a351a6ccb 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -1048,6 +1048,7 @@ menu "External python modules"
 	source "package/python-nfc/Config.in"
 	source "package/python-numpy/Config.in"
 	source "package/python-oauthlib/Config.in"
+	source "package/python-opcua-asyncio/Config.in"
 	source "package/python-packaging/Config.in"
 	source "package/python-paho-mqtt/Config.in"
 	source "package/python-pam/Config.in"
diff --git a/package/python-opcua-asyncio/Config.in b/package/python-opcua-asyncio/Config.in
new file mode 100644
index 0000000000..6dee004b9b
--- /dev/null
+++ b/package/python-opcua-asyncio/Config.in
@@ -0,0 +1,14 @@
+config BR2_PACKAGE_PYTHON_OPCUA_ASYNCIO
+	bool "python-opcua-asyncio"
+	depends on BR2_PACKAGE_PYTHON3
+	select BR2_PACKAGE_PYTHON_DATEUTIL #runtime
+	select BR2_PACKAGE_PYTHON_PYTZ #runtime
+	select BR2_PACKAGE_PYTHON_LXML #runtime
+	select BR2_PACKAGE_PYTHON_CRYPTOGRAPHY #runtime
+	select BR2_PACKAGE_PYTHON_AIOFILES #runtime
+	help
+	  opcua-asyncio is an asyncio-based asynchronous
+	  OPC UA client based on python-opcua, removing
+	  hacks for support of python < 3.6.
+
+	  https://github.com/FreeOpcUa/opcua-asyncio
diff --git a/package/python-opcua-asyncio/python-opcua-asyncio.hash b/package/python-opcua-asyncio/python-opcua-asyncio.hash
new file mode 100644
index 0000000000..2754c19059
--- /dev/null
+++ b/package/python-opcua-asyncio/python-opcua-asyncio.hash
@@ -0,0 +1,3 @@
+# Locally computed
+sha256  e5fab37a92162351fe40cab43df09db8a2e9f8b8a2a8f13ed680aa6f6d687ec3  opcua-asyncio-0.8.4.tar.gz
+sha256  89480768826f408daea1f3caff0509c2cc9606e10f6bb0ccfd12a3d604842c35  COPYING
diff --git a/package/python-opcua-asyncio/python-opcua-asyncio.mk b/package/python-opcua-asyncio/python-opcua-asyncio.mk
new file mode 100644
index 0000000000..febde48ba5
--- /dev/null
+++ b/package/python-opcua-asyncio/python-opcua-asyncio.mk
@@ -0,0 +1,14 @@
+################################################################################
+#
+# python-opcua-asyncio
+#
+################################################################################
+
+PYTHON_OPCUA_ASYNCIO_VERSION = 0.8.4
+PYTHON_OPCUA_ASYNCIO_SOURCE = opcua-asyncio-$(PYTHON_OPCUA_ASYNCIO_VERSION).tar.gz
+PYTHON_OPCUA_ASYNCIO_SITE = $(call github,FreeOpcUa,opcua-asyncio,$(PYTHON_OPCUA_ASYNCIO_VERSION))
+PYTHON_OPCUA_ASYNCIO_SETUP_TYPE = setuptools
+PYTHON_OPCUA_ASYNCIO_LICENSE = LGPL-3.0
+PYTHON_OPCUA_ASYNCIO_LICENSE_FILES = COPYING
+
+$(eval $(python-package))
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [Buildroot] [PATCH 1/2] package/python-aiofiles : new package
  2020-09-04 14:33 ` [Buildroot] [PATCH 1/2] package/python-aiofiles : new package Jugurtha BELKALEM
@ 2020-09-06 19:00   ` Thomas Petazzoni
  0 siblings, 0 replies; 5+ messages in thread
From: Thomas Petazzoni @ 2020-09-06 19:00 UTC (permalink / raw)
  To: buildroot

On Fri,  4 Sep 2020 16:33:00 +0200
Jugurtha BELKALEM <jugurtha.belkalem@smile.fr> wrote:

> Ordinary local file IO is blocking, and cannot easily and
> portably made asynchronous.
> This means doing file IO may interfere with asyncio applications,
> which shouldn?t block the executing thread. aiofiles helps
> with this y introducing asynchronous versions of files
> that support delegating operations to a separate thread pool.
> 
> More information is available at :
> https://pypi.org/project/aiofiles.
> 
> Signed-off-by: Jugurtha BELKALEM <jugurtha.belkalem@smile.fr>
> ---
> Package has been tested with check-package:
> $ ./utils/check-package package/python-aiofiles/*
> 27 lines processed
> 0 warnings generated

Applied to master, thanks.

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Buildroot] [PATCH 2/2] package/python-opcua-asyncio : new package
  2020-09-04 14:33 ` [Buildroot] [PATCH 2/2] package/python-opcua-asyncio " Jugurtha BELKALEM
@ 2020-09-07  6:51   ` Thomas Petazzoni
  0 siblings, 0 replies; 5+ messages in thread
From: Thomas Petazzoni @ 2020-09-07  6:51 UTC (permalink / raw)
  To: buildroot

Hello,

Thanks, I've applied to master, with a few changes. See below.

On Fri,  4 Sep 2020 16:33:01 +0200
Jugurtha BELKALEM <jugurtha.belkalem@smile.fr> wrote:

> diff --git a/package/python-opcua-asyncio/Config.in b/package/python-opcua-asyncio/Config.in
> new file mode 100644
> index 0000000000..6dee004b9b
> --- /dev/null
> +++ b/package/python-opcua-asyncio/Config.in
> @@ -0,0 +1,14 @@
> +config BR2_PACKAGE_PYTHON_OPCUA_ASYNCIO
> +	bool "python-opcua-asyncio"
> +	depends on BR2_PACKAGE_PYTHON3
> +	select BR2_PACKAGE_PYTHON_DATEUTIL #runtime
> +	select BR2_PACKAGE_PYTHON_PYTZ #runtime
> +	select BR2_PACKAGE_PYTHON_LXML #runtime
> +	select BR2_PACKAGE_PYTHON_CRYPTOGRAPHY #runtime
> +	select BR2_PACKAGE_PYTHON_AIOFILES #runtime

In general, we like to have such lists alphabetically sorted. Also we
usually have a space after the # that marks the start of a comment.

> +sha256  e5fab37a92162351fe40cab43df09db8a2e9f8b8a2a8f13ed680aa6f6d687ec3  opcua-asyncio-0.8.4.tar.gz
> +sha256  89480768826f408daea1f3caff0509c2cc9606e10f6bb0ccfd12a3d604842c35  COPYING

This license file hash was incorrect. Did you test "make legal-info"
with this package enabled ?

> +PYTHON_OPCUA_ASYNCIO_VERSION = 0.8.4
> +PYTHON_OPCUA_ASYNCIO_SOURCE = opcua-asyncio-$(PYTHON_OPCUA_ASYNCIO_VERSION).tar.gz
> +PYTHON_OPCUA_ASYNCIO_SITE = $(call github,FreeOpcUa,opcua-asyncio,$(PYTHON_OPCUA_ASYNCIO_VERSION))
> +PYTHON_OPCUA_ASYNCIO_SETUP_TYPE = setuptools
> +PYTHON_OPCUA_ASYNCIO_LICENSE = LGPL-3.0

The license really is LGPL-3.0+, as indicated in the setup.py file, so
I fixed that as well.

Thanks a lot!

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2020-09-07  6:51 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-04 14:32 [Buildroot] [PATCH 0/2] Asynchronous OPC UP Python client Jugurtha BELKALEM
2020-09-04 14:33 ` [Buildroot] [PATCH 1/2] package/python-aiofiles : new package Jugurtha BELKALEM
2020-09-06 19:00   ` Thomas Petazzoni
2020-09-04 14:33 ` [Buildroot] [PATCH 2/2] package/python-opcua-asyncio " Jugurtha BELKALEM
2020-09-07  6:51   ` Thomas Petazzoni

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.