* [Buildroot] [PATCH 1/1] package/python-segno: new package
@ 2023-04-13 9:31 Witold Lipieta
2023-04-15 12:41 ` Yann E. MORIN
0 siblings, 1 reply; 3+ messages in thread
From: Witold Lipieta @ 2023-04-13 9:31 UTC (permalink / raw)
To: buildroot; +Cc: Witold Lipieta, Thomas Petazzoni, Asaf Kahlon
segno 1.5.2 https://pypi.org/project/segno/
Signed-off-by: Witold Lipieta <witold.lipieta@thaumatec.com>
---
package/Config.in | 1 +
package/python-segno/Config.in | 6 ++++++
package/python-segno/python-segno.hash | 5 +++++
package/python-segno/python-segno.mk | 14 ++++++++++++++
4 files changed, 26 insertions(+)
create mode 100644 package/python-segno/Config.in
create mode 100644 package/python-segno/python-segno.hash
create mode 100644 package/python-segno/python-segno.mk
diff --git a/package/Config.in b/package/Config.in
index 760dda6ac1..68949295df 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -1273,6 +1273,7 @@ menu "External python modules"
source "package/python-sdnotify/Config.in"
source "package/python-secretstorage/Config.in"
source "package/python-see/Config.in"
+ source "package/python-segno/Config.in"
source "package/python-selenium/Config.in"
source "package/python-semver/Config.in"
source "package/python-sentry-sdk/Config.in"
diff --git a/package/python-segno/Config.in b/package/python-segno/Config.in
new file mode 100644
index 0000000000..5c6ada7e68
--- /dev/null
+++ b/package/python-segno/Config.in
@@ -0,0 +1,6 @@
+config BR2_PACKAGE_PYTHON_SEGNO
+ bool "python-segno"
+ help
+ QR Code and Micro QR Code generator for Python 2 and Python 3
+
+ https://github.com/heuer/segno/
diff --git a/package/python-segno/python-segno.hash b/package/python-segno/python-segno.hash
new file mode 100644
index 0000000000..286bdf3615
--- /dev/null
+++ b/package/python-segno/python-segno.hash
@@ -0,0 +1,5 @@
+# md5, sha256 from https://pypi.org/pypi/segno/json
+md5 6d7c852f951501cd3af85ef061d6bee4 segno-1.5.2.tar.gz
+sha256 983424b296e62189d70fc73460cd946cf56dcbe82b9bda18c066fc1b24371cdc segno-1.5.2.tar.gz
+# Locally computed sha256 checksums
+sha256 98b0a86ca0cbf68c95051741bc983425a43fdece775fe0e2712e66be459cc9d1 LICENSE
diff --git a/package/python-segno/python-segno.mk b/package/python-segno/python-segno.mk
new file mode 100644
index 0000000000..c832f38f4b
--- /dev/null
+++ b/package/python-segno/python-segno.mk
@@ -0,0 +1,14 @@
+################################################################################
+#
+# python-segno
+#
+################################################################################
+
+PYTHON_SEGNO_VERSION = 1.5.2
+PYTHON_SEGNO_SOURCE = segno-$(PYTHON_SEGNO_VERSION).tar.gz
+PYTHON_SEGNO_SITE = https://files.pythonhosted.org/packages/90/2a/2fedf1023f9273d8326362df7936748ebadef92ba53ab7970d9b8df1a6c2
+PYTHON_SEGNO_SETUP_TYPE = setuptools
+PYTHON_SEGNO_LICENSE = BSD-3-Clause
+PYTHON_SEGNO_LICENSE_FILES = LICENSE
+
+$(eval $(python-package))
--
2.34.1
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [Buildroot] [PATCH 1/1] package/python-segno: new package
2023-04-13 9:31 [Buildroot] [PATCH 1/1] package/python-segno: new package Witold Lipieta
@ 2023-04-15 12:41 ` Yann E. MORIN
2023-04-18 13:19 ` Witold Lipieta
0 siblings, 1 reply; 3+ messages in thread
From: Yann E. MORIN @ 2023-04-15 12:41 UTC (permalink / raw)
To: Witold Lipieta; +Cc: Asaf Kahlon, Thomas Petazzoni, buildroot
Witold, All,
On 2023-04-13 11:31 +0200, Witold Lipieta spake thusly:
> segno 1.5.2 https://pypi.org/project/segno/
I was a bit surprised to see no dependency of any kind, so I tried a
basic, minimalist build with this defconfig:
BR2_arm=y
BR2_cortex_a7=y
BR2_TOOLCHAIN_EXTERNAL=y
BR2_TOOLCHAIN_EXTERNAL_BOOTLIN=y
BR2_PER_PACKAGE_DIRECTORIES=y
BR2_PACKAGE_PYTHON3=y
And indeed that fails:
# python3
Python 3.11.2 (main, Apr 15 2023, 14:18:20) [GCC 12.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import segno
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python3.11/site-packages/segno/__init__.py", line 18, in <module>
File "/usr/lib/python3.11/site-packages/segno/writers.py", line 21, in <module>
ModuleNotFoundError: No module named 'zlib'
So, at the bare minimum, it should select BR2_PACKAGE_PYTHON3_ZLIB.
I am not sure I understand the documetnation properly, but there are a
few candidate modules that seem like they may be dependencies.
- PIL (not in Buildroot, but we have pillow)
- qrcode-artistic (not in Buildroot)
Also, a runtime test would be immensely useful to have, to validate
that at least the very basic features do work. See existing tests in
support/testing/tests/package/test_python*
Can you have a look at the above issues, and resubmit a newer patch,
please?
Regards,
Yann E. MORIN.
> Signed-off-by: Witold Lipieta <witold.lipieta@thaumatec.com>
> ---
> package/Config.in | 1 +
> package/python-segno/Config.in | 6 ++++++
> package/python-segno/python-segno.hash | 5 +++++
> package/python-segno/python-segno.mk | 14 ++++++++++++++
> 4 files changed, 26 insertions(+)
> create mode 100644 package/python-segno/Config.in
> create mode 100644 package/python-segno/python-segno.hash
> create mode 100644 package/python-segno/python-segno.mk
>
> diff --git a/package/Config.in b/package/Config.in
> index 760dda6ac1..68949295df 100644
> --- a/package/Config.in
> +++ b/package/Config.in
> @@ -1273,6 +1273,7 @@ menu "External python modules"
> source "package/python-sdnotify/Config.in"
> source "package/python-secretstorage/Config.in"
> source "package/python-see/Config.in"
> + source "package/python-segno/Config.in"
> source "package/python-selenium/Config.in"
> source "package/python-semver/Config.in"
> source "package/python-sentry-sdk/Config.in"
> diff --git a/package/python-segno/Config.in b/package/python-segno/Config.in
> new file mode 100644
> index 0000000000..5c6ada7e68
> --- /dev/null
> +++ b/package/python-segno/Config.in
> @@ -0,0 +1,6 @@
> +config BR2_PACKAGE_PYTHON_SEGNO
> + bool "python-segno"
> + help
> + QR Code and Micro QR Code generator for Python 2 and Python 3
> +
> + https://github.com/heuer/segno/
> diff --git a/package/python-segno/python-segno.hash b/package/python-segno/python-segno.hash
> new file mode 100644
> index 0000000000..286bdf3615
> --- /dev/null
> +++ b/package/python-segno/python-segno.hash
> @@ -0,0 +1,5 @@
> +# md5, sha256 from https://pypi.org/pypi/segno/json
> +md5 6d7c852f951501cd3af85ef061d6bee4 segno-1.5.2.tar.gz
> +sha256 983424b296e62189d70fc73460cd946cf56dcbe82b9bda18c066fc1b24371cdc segno-1.5.2.tar.gz
> +# Locally computed sha256 checksums
> +sha256 98b0a86ca0cbf68c95051741bc983425a43fdece775fe0e2712e66be459cc9d1 LICENSE
> diff --git a/package/python-segno/python-segno.mk b/package/python-segno/python-segno.mk
> new file mode 100644
> index 0000000000..c832f38f4b
> --- /dev/null
> +++ b/package/python-segno/python-segno.mk
> @@ -0,0 +1,14 @@
> +################################################################################
> +#
> +# python-segno
> +#
> +################################################################################
> +
> +PYTHON_SEGNO_VERSION = 1.5.2
> +PYTHON_SEGNO_SOURCE = segno-$(PYTHON_SEGNO_VERSION).tar.gz
> +PYTHON_SEGNO_SITE = https://files.pythonhosted.org/packages/90/2a/2fedf1023f9273d8326362df7936748ebadef92ba53ab7970d9b8df1a6c2
> +PYTHON_SEGNO_SETUP_TYPE = setuptools
> +PYTHON_SEGNO_LICENSE = BSD-3-Clause
> +PYTHON_SEGNO_LICENSE_FILES = LICENSE
> +
> +$(eval $(python-package))
> --
> 2.34.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] 3+ messages in thread
* Re: [Buildroot] [PATCH 1/1] package/python-segno: new package
2023-04-15 12:41 ` Yann E. MORIN
@ 2023-04-18 13:19 ` Witold Lipieta
0 siblings, 0 replies; 3+ messages in thread
From: Witold Lipieta @ 2023-04-18 13:19 UTC (permalink / raw)
To: Yann E. MORIN; +Cc: Asaf Kahlon, Thomas Petazzoni, buildroot
sob., 15 kwi 2023 o 14:41 Yann E. MORIN <yann.morin.1998@free.fr> napisał(a):
>
> Witold, All,
>
> On 2023-04-13 11:31 +0200, Witold Lipieta spake thusly:
> > segno 1.5.2 https://pypi.org/project/segno/
>
> I was a bit surprised to see no dependency of any kind, so I tried a
> basic, minimalist build with this defconfig:
>
> BR2_arm=y
> BR2_cortex_a7=y
> BR2_TOOLCHAIN_EXTERNAL=y
> BR2_TOOLCHAIN_EXTERNAL_BOOTLIN=y
> BR2_PER_PACKAGE_DIRECTORIES=y
> BR2_PACKAGE_PYTHON3=y
>
> And indeed that fails:
>
> # python3
> Python 3.11.2 (main, Apr 15 2023, 14:18:20) [GCC 12.2.0] on linux
> Type "help", "copyright", "credits" or "license" for more information.
> >>> import segno
> Traceback (most recent call last):
> File "<stdin>", line 1, in <module>
> File "/usr/lib/python3.11/site-packages/segno/__init__.py", line 18, in <module>
> File "/usr/lib/python3.11/site-packages/segno/writers.py", line 21, in <module>
> ModuleNotFoundError: No module named 'zlib'
>
> So, at the bare minimum, it should select BR2_PACKAGE_PYTHON3_ZLIB.
Of course you are right, I forgot to add setuptools
> I am not sure I understand the documetnation properly, but there are a
> few candidate modules that seem like they may be dependencies.
>
> - PIL (not in Buildroot, but we have pillow)
> - qrcode-artistic (not in Buildroot)
I think those are required by separate plugins
> Also, a runtime test would be immensely useful to have, to validate
> that at least the very basic features do work. See existing tests in
> support/testing/tests/package/test_python*
I've added a basic check, based on a test from the package.
> Can you have a look at the above issues, and resubmit a newer patch,
> please?
>
> Regards,
> Yann E. MORIN.
I've submitted patch v2,
BR
> > Signed-off-by: Witold Lipieta <witold.lipieta@thaumatec.com>
> > ---
> > package/Config.in | 1 +
> > package/python-segno/Config.in | 6 ++++++
> > package/python-segno/python-segno.hash | 5 +++++
> > package/python-segno/python-segno.mk | 14 ++++++++++++++
> > 4 files changed, 26 insertions(+)
> > create mode 100644 package/python-segno/Config.in
> > create mode 100644 package/python-segno/python-segno.hash
> > create mode 100644 package/python-segno/python-segno.mk
> >
> > diff --git a/package/Config.in b/package/Config.in
> > index 760dda6ac1..68949295df 100644
> > --- a/package/Config.in
> > +++ b/package/Config.in
> > @@ -1273,6 +1273,7 @@ menu "External python modules"
> > source "package/python-sdnotify/Config.in"
> > source "package/python-secretstorage/Config.in"
> > source "package/python-see/Config.in"
> > + source "package/python-segno/Config.in"
> > source "package/python-selenium/Config.in"
> > source "package/python-semver/Config.in"
> > source "package/python-sentry-sdk/Config.in"
> > diff --git a/package/python-segno/Config.in b/package/python-segno/Config.in
> > new file mode 100644
> > index 0000000000..5c6ada7e68
> > --- /dev/null
> > +++ b/package/python-segno/Config.in
> > @@ -0,0 +1,6 @@
> > +config BR2_PACKAGE_PYTHON_SEGNO
> > + bool "python-segno"
> > + help
> > + QR Code and Micro QR Code generator for Python 2 and Python 3
> > +
> > + https://github.com/heuer/segno/
> > diff --git a/package/python-segno/python-segno.hash b/package/python-segno/python-segno.hash
> > new file mode 100644
> > index 0000000000..286bdf3615
> > --- /dev/null
> > +++ b/package/python-segno/python-segno.hash
> > @@ -0,0 +1,5 @@
> > +# md5, sha256 from https://pypi.org/pypi/segno/json
> > +md5 6d7c852f951501cd3af85ef061d6bee4 segno-1.5.2.tar.gz
> > +sha256 983424b296e62189d70fc73460cd946cf56dcbe82b9bda18c066fc1b24371cdc segno-1.5.2.tar.gz
> > +# Locally computed sha256 checksums
> > +sha256 98b0a86ca0cbf68c95051741bc983425a43fdece775fe0e2712e66be459cc9d1 LICENSE
> > diff --git a/package/python-segno/python-segno.mk b/package/python-segno/python-segno.mk
> > new file mode 100644
> > index 0000000000..c832f38f4b
> > --- /dev/null
> > +++ b/package/python-segno/python-segno.mk
> > @@ -0,0 +1,14 @@
> > +################################################################################
> > +#
> > +# python-segno
> > +#
> > +################################################################################
> > +
> > +PYTHON_SEGNO_VERSION = 1.5.2
> > +PYTHON_SEGNO_SOURCE = segno-$(PYTHON_SEGNO_VERSION).tar.gz
> > +PYTHON_SEGNO_SITE = https://files.pythonhosted.org/packages/90/2a/2fedf1023f9273d8326362df7936748ebadef92ba53ab7970d9b8df1a6c2
> > +PYTHON_SEGNO_SETUP_TYPE = setuptools
> > +PYTHON_SEGNO_LICENSE = BSD-3-Clause
> > +PYTHON_SEGNO_LICENSE_FILES = LICENSE
> > +
> > +$(eval $(python-package))
> > --
> > 2.34.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] 3+ messages in thread
end of thread, other threads:[~2023-04-18 13:19 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-04-13 9:31 [Buildroot] [PATCH 1/1] package/python-segno: new package Witold Lipieta
2023-04-15 12:41 ` Yann E. MORIN
2023-04-18 13:19 ` Witold Lipieta
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox