diff mbox series

[3/6] package/python-zlmdb: add new package

Message ID 20220403221953.1158787-3-emile.cormier.jr@gmail.com
State Accepted
Headers show
Series [1/6] package/python-snappy: bump version to 0.6.1 | expand

Commit Message

Emile Cormier April 3, 2022, 10:19 p.m. UTC
From: ecorm <ecorm@users.noreply.github.com>

Required by python-crossbar.
Signed-off-by: Emile Cormier <emile.cormier.jr@gmail.com>
---
 DEVELOPERS                             |  5 +++++
 package/Config.in                      |  1 +
 package/python-zlmdb/Config.in         | 16 ++++++++++++++++
 package/python-zlmdb/python-zlmdb.hash |  5 +++++
 package/python-zlmdb/python-zlmdb.mk   | 14 ++++++++++++++
 5 files changed, 41 insertions(+)
 create mode 100644 package/python-zlmdb/Config.in
 create mode 100644 package/python-zlmdb/python-zlmdb.hash
 create mode 100644 package/python-zlmdb/python-zlmdb.mk

Comments

Thomas Petazzoni Aug. 7, 2022, 2:53 p.m. UTC | #1
Hello Emile,

I have also applied this patch, though with some changes. See below.

On Sun,  3 Apr 2022 19:19:50 -0300
Emile Cormier <emile.cormier.jr@gmail.com> wrote:

> From: ecorm <ecorm@users.noreply.github.com>

I fixed this bogus From: value.

> 
> Required by python-crossbar.

Added an empty new line here.

> Signed-off-by: Emile Cormier <emile.cormier.jr@gmail.com>
> ---
>  DEVELOPERS                             |  5 +++++
>  package/Config.in                      |  1 +
>  package/python-zlmdb/Config.in         | 16 ++++++++++++++++
>  package/python-zlmdb/python-zlmdb.hash |  5 +++++
>  package/python-zlmdb/python-zlmdb.mk   | 14 ++++++++++++++
>  5 files changed, 41 insertions(+)
>  create mode 100644 package/python-zlmdb/Config.in
>  create mode 100644 package/python-zlmdb/python-zlmdb.hash
>  create mode 100644 package/python-zlmdb/python-zlmdb.mk
> 
> diff --git a/DEVELOPERS b/DEVELOPERS
> index a66b9d7eee..7f04663077 100644
> --- a/DEVELOPERS
> +++ b/DEVELOPERS
> @@ -746,6 +746,11 @@ N:	Eloi Bail <eloi.bail@savoirfairelinux.com>
>  F:	package/bayer2rgb-neon/
>  F:	package/gstreamer1/gst1-plugins-bayer2rgb-neon/
>  
> +N:	Emile Cormier <emile.cormier.jr@gmail.com>
> +F:	package/python-autobahn/
> +F:	package/python-crossbar/
> +F:	package/python-zlmdb/

Reduce this to just adding package/python-zlmdb/. Entries for existing
packages should be added in a separate commit.

> diff --git a/package/python-zlmdb/Config.in b/package/python-zlmdb/Config.in
> new file mode 100644
> index 0000000000..9eaab3a7a7
> --- /dev/null
> +++ b/package/python-zlmdb/Config.in
> @@ -0,0 +1,16 @@
> +config BR2_PACKAGE_PYTHON_ZLMDB
> +	bool "python-zlmdb"
> +	select BR2_PACKAGE_PYTHON_CBOR2 # runtime
> +	select BR2_PACKAGE_PYTHON_CFFI # runtime
> +	select BR2_PACKAGE_PYTHON_CLICK # runtime
> +	select BR2_PACKAGE_PYTHON_FLATBUFFERS # runtime
> +	select BR2_PACKAGE_PYTHON_LMDB # runtime
> +	select BR2_PACKAGE_PYTHON_NUMPY # runtime

This one has some depends on that we need to replicate.

> +	select BR2_PACKAGE_PYTHON_PYNACL # runtime
> +	select BR2_PACKAGE_PYTHON_PYYAML # runtime
> +	select BR2_PACKAGE_PYTHON_TXAIO # runtime
> +	help
> +	  Object-relational zero-copy in-memory database layer for
> +	  LMDB.
> +
> +	  https://github.com/crossbario/zlmdb

So the final Config.in file looks like this:

config BR2_PACKAGE_PYTHON_ZLMDB
        bool "python-zlmdb"
        depends on BR2_PACKAGE_PYTHON_NUMPY_ARCH_SUPPORTS # python-numpy
        depends on BR2_TOOLCHAIN_USES_GLIBC || BR2_TOOLCHAIN_USES_MUSL # python-numpy
        select BR2_PACKAGE_PYTHON_CBOR2 # runtime
        select BR2_PACKAGE_PYTHON_CFFI # runtime
        select BR2_PACKAGE_PYTHON_CLICK # runtime
        select BR2_PACKAGE_PYTHON_FLATBUFFERS # runtime
        select BR2_PACKAGE_PYTHON_LMDB # runtime
        select BR2_PACKAGE_PYTHON_NUMPY # runtime
        select BR2_PACKAGE_PYTHON_PYNACL # runtime
        select BR2_PACKAGE_PYTHON_PYYAML # runtime
        select BR2_PACKAGE_PYTHON_TXAIO # runtime
        help
          Object-relational zero-copy in-memory database layer for
          LMDB.

          https://github.com/crossbario/zlmdb

comment "python-zlmdb needs glibc or musl"
        depends on BR2_PACKAGE_PYTHON_NUMPY_ARCH_SUPPORTS
        depends on !(BR2_TOOLCHAIN_USES_GLIBC || BR2_TOOLCHAIN_USES_MUSL)

Another thing that this package really needs is a test case, in
support/testing/tests/package/. I was trying to look for some
documentation, but apart from a pretty obscure reference document that
doesn't have much explanations, I couldn't find anything.

Do you have some simple example on how to use zlmdb? This would allow
us to add a test case for this package that has a lot of runtime
dependencies.

Thanks!

Thomas
Emile Cormier Aug. 7, 2022, 3:37 p.m. UTC | #2
Hi Thomas,

I'm in the process of migrating away from Crossbar, due to dynamic
authentication/authorization no longer working and the author not
interested in backporting bug fixes to older versions. I can no longer
devote any time to support Crossbar on Buildroot. Please do what you will
with these patch requests.

Sorry, I'm not familiar with zlmdb; the only reason I introduced it was to
satisfy a dependency by Crossbar.

Cheers,
Emile Cormier

On Sun, Aug 7, 2022 at 11:53 AM Thomas Petazzoni <
thomas.petazzoni@bootlin.com> wrote:

> Hello Emile,
>
> I have also applied this patch, though with some changes. See below.
>
> On Sun,  3 Apr 2022 19:19:50 -0300
> Emile Cormier <emile.cormier.jr@gmail.com> wrote:
>
> > From: ecorm <ecorm@users.noreply.github.com>
>
> I fixed this bogus From: value.
>
> >
> > Required by python-crossbar.
>
> Added an empty new line here.
>
> > Signed-off-by: Emile Cormier <emile.cormier.jr@gmail.com>
> > ---
> >  DEVELOPERS                             |  5 +++++
> >  package/Config.in                      |  1 +
> >  package/python-zlmdb/Config.in         | 16 ++++++++++++++++
> >  package/python-zlmdb/python-zlmdb.hash |  5 +++++
> >  package/python-zlmdb/python-zlmdb.mk   | 14 ++++++++++++++
> >  5 files changed, 41 insertions(+)
> >  create mode 100644 package/python-zlmdb/Config.in
> >  create mode 100644 package/python-zlmdb/python-zlmdb.hash
> >  create mode 100644 package/python-zlmdb/python-zlmdb.mk
> >
> > diff --git a/DEVELOPERS b/DEVELOPERS
> > index a66b9d7eee..7f04663077 100644
> > --- a/DEVELOPERS
> > +++ b/DEVELOPERS
> > @@ -746,6 +746,11 @@ N:       Eloi Bail <eloi.bail@savoirfairelinux.com>
> >  F:   package/bayer2rgb-neon/
> >  F:   package/gstreamer1/gst1-plugins-bayer2rgb-neon/
> >
> > +N:   Emile Cormier <emile.cormier.jr@gmail.com>
> > +F:   package/python-autobahn/
> > +F:   package/python-crossbar/
> > +F:   package/python-zlmdb/
>
> Reduce this to just adding package/python-zlmdb/. Entries for existing
> packages should be added in a separate commit.
>
> > diff --git a/package/python-zlmdb/Config.in
> b/package/python-zlmdb/Config.in
> > new file mode 100644
> > index 0000000000..9eaab3a7a7
> > --- /dev/null
> > +++ b/package/python-zlmdb/Config.in
> > @@ -0,0 +1,16 @@
> > +config BR2_PACKAGE_PYTHON_ZLMDB
> > +     bool "python-zlmdb"
> > +     select BR2_PACKAGE_PYTHON_CBOR2 # runtime
> > +     select BR2_PACKAGE_PYTHON_CFFI # runtime
> > +     select BR2_PACKAGE_PYTHON_CLICK # runtime
> > +     select BR2_PACKAGE_PYTHON_FLATBUFFERS # runtime
> > +     select BR2_PACKAGE_PYTHON_LMDB # runtime
> > +     select BR2_PACKAGE_PYTHON_NUMPY # runtime
>
> This one has some depends on that we need to replicate.
>
> > +     select BR2_PACKAGE_PYTHON_PYNACL # runtime
> > +     select BR2_PACKAGE_PYTHON_PYYAML # runtime
> > +     select BR2_PACKAGE_PYTHON_TXAIO # runtime
> > +     help
> > +       Object-relational zero-copy in-memory database layer for
> > +       LMDB.
> > +
> > +       https://github.com/crossbario/zlmdb
>
> So the final Config.in file looks like this:
>
> config BR2_PACKAGE_PYTHON_ZLMDB
>         bool "python-zlmdb"
>         depends on BR2_PACKAGE_PYTHON_NUMPY_ARCH_SUPPORTS # python-numpy
>         depends on BR2_TOOLCHAIN_USES_GLIBC || BR2_TOOLCHAIN_USES_MUSL #
> python-numpy
>         select BR2_PACKAGE_PYTHON_CBOR2 # runtime
>         select BR2_PACKAGE_PYTHON_CFFI # runtime
>         select BR2_PACKAGE_PYTHON_CLICK # runtime
>         select BR2_PACKAGE_PYTHON_FLATBUFFERS # runtime
>         select BR2_PACKAGE_PYTHON_LMDB # runtime
>         select BR2_PACKAGE_PYTHON_NUMPY # runtime
>         select BR2_PACKAGE_PYTHON_PYNACL # runtime
>         select BR2_PACKAGE_PYTHON_PYYAML # runtime
>         select BR2_PACKAGE_PYTHON_TXAIO # runtime
>         help
>           Object-relational zero-copy in-memory database layer for
>           LMDB.
>
>           https://github.com/crossbario/zlmdb
>
> comment "python-zlmdb needs glibc or musl"
>         depends on BR2_PACKAGE_PYTHON_NUMPY_ARCH_SUPPORTS
>         depends on !(BR2_TOOLCHAIN_USES_GLIBC || BR2_TOOLCHAIN_USES_MUSL)
>
> Another thing that this package really needs is a test case, in
> support/testing/tests/package/. I was trying to look for some
> documentation, but apart from a pretty obscure reference document that
> doesn't have much explanations, I couldn't find anything.
>
> Do you have some simple example on how to use zlmdb? This would allow
> us to add a test case for this package that has a lot of runtime
> dependencies.
>
> Thanks!
>
> Thomas
> --
> Thomas Petazzoni, co-owner and CEO, Bootlin
> Embedded Linux and Kernel engineering and training
> https://bootlin.com
>
Thomas Petazzoni Aug. 7, 2022, 4:10 p.m. UTC | #3
Hello,

On Sun, 7 Aug 2022 12:37:46 -0300
Emile Cormier <emile.cormier.jr@gmail.com> wrote:

> I'm in the process of migrating away from Crossbar, due to dynamic
> authentication/authorization no longer working and the author not
> interested in backporting bug fixes to older versions. I can no longer
> devote any time to support Crossbar on Buildroot. Please do what you will
> with these patch requests.

Ah, too bad :-/

Do you still have some time to comment on
https://patchwork.ozlabs.org/project/buildroot/patch/20220403221953.1158787-6-emile.cormier.jr@gmail.com/
? I was looking at it, and wanted to ask a few questions.

> Sorry, I'm not familiar with zlmdb; the only reason I introduced it was to
> satisfy a dependency by Crossbar.

ACK, no worries.

Best regards,

Thomas
Emile Cormier Aug. 7, 2022, 4:50 p.m. UTC | #4
On Sun, Aug 7, 2022 at 1:10 PM Thomas Petazzoni <
thomas.petazzoni@bootlin.com> wrote:

> Do you still have some time to comment on
>
> https://patchwork.ozlabs.org/project/buildroot/patch/20220403221953.1158787-6-emile.cormier.jr@gmail.com/
> ? I was looking at it, and wanted to ask a few questions.
>

I'll try to answer your question as time allows. It's unfortunate this
wasn't done sooner while everything was still fresh in my mind, but I
understand that you might have had other priorities.
diff mbox series

Patch

diff --git a/DEVELOPERS b/DEVELOPERS
index a66b9d7eee..7f04663077 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -746,6 +746,11 @@  N:	Eloi Bail <eloi.bail@savoirfairelinux.com>
 F:	package/bayer2rgb-neon/
 F:	package/gstreamer1/gst1-plugins-bayer2rgb-neon/
 
+N:	Emile Cormier <emile.cormier.jr@gmail.com>
+F:	package/python-autobahn/
+F:	package/python-crossbar/
+F:	package/python-zlmdb/
+
 N:	Eric Le Bihan <eric.le.bihan.dev@free.fr>
 F:	docs/manual/adding-packages-meson.txt
 F:	package/adwaita-icon-theme/
diff --git a/package/Config.in b/package/Config.in
index a1964df5f1..4330659431 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -1300,6 +1300,7 @@  menu "External python modules"
 	source "package/python-yatl/Config.in"
 	source "package/python-zc-lockfile/Config.in"
 	source "package/python-zeroconf/Config.in"
+	source "package/python-zlmdb/Config.in"
 	source "package/python-zope-interface/Config.in"
 	source "package/python-zopfli/Config.in"
 endmenu
diff --git a/package/python-zlmdb/Config.in b/package/python-zlmdb/Config.in
new file mode 100644
index 0000000000..9eaab3a7a7
--- /dev/null
+++ b/package/python-zlmdb/Config.in
@@ -0,0 +1,16 @@ 
+config BR2_PACKAGE_PYTHON_ZLMDB
+	bool "python-zlmdb"
+	select BR2_PACKAGE_PYTHON_CBOR2 # runtime
+	select BR2_PACKAGE_PYTHON_CFFI # runtime
+	select BR2_PACKAGE_PYTHON_CLICK # runtime
+	select BR2_PACKAGE_PYTHON_FLATBUFFERS # runtime
+	select BR2_PACKAGE_PYTHON_LMDB # runtime
+	select BR2_PACKAGE_PYTHON_NUMPY # runtime
+	select BR2_PACKAGE_PYTHON_PYNACL # runtime
+	select BR2_PACKAGE_PYTHON_PYYAML # runtime
+	select BR2_PACKAGE_PYTHON_TXAIO # runtime
+	help
+	  Object-relational zero-copy in-memory database layer for
+	  LMDB.
+
+	  https://github.com/crossbario/zlmdb
diff --git a/package/python-zlmdb/python-zlmdb.hash b/package/python-zlmdb/python-zlmdb.hash
new file mode 100644
index 0000000000..d98dc7d12a
--- /dev/null
+++ b/package/python-zlmdb/python-zlmdb.hash
@@ -0,0 +1,5 @@ 
+# md5, sha256 from https://pypi.org/pypi/zlmdb/json
+md5  d730a394b74108933a65c9fbe76aba36  zlmdb-22.3.1.tar.gz
+sha256  0d416a47b1ee627186af8e5c99e5246f6b277df44ba5c6bb67e947eabf948e5a  zlmdb-22.3.1.tar.gz
+# Locally computed sha256 checksums
+sha256  8a139bf325dcca11e0e476ce537bf791a6cfbeed8899a9b6ddc55238e180d230  LICENSE
diff --git a/package/python-zlmdb/python-zlmdb.mk b/package/python-zlmdb/python-zlmdb.mk
new file mode 100644
index 0000000000..a040622d9d
--- /dev/null
+++ b/package/python-zlmdb/python-zlmdb.mk
@@ -0,0 +1,14 @@ 
+################################################################################
+#
+# python-zlmdb
+#
+################################################################################
+
+PYTHON_ZLMDB_VERSION = 22.3.1
+PYTHON_ZLMDB_SOURCE = zlmdb-$(PYTHON_ZLMDB_VERSION).tar.gz
+PYTHON_ZLMDB_SITE = https://files.pythonhosted.org/packages/71/87/bb3cebd5312e670e33551317c7fc5e4b6a4a9af39075a71cd541b32cc0bf
+PYTHON_ZLMDB_SETUP_TYPE = setuptools
+PYTHON_ZLMDB_LICENSE = MIT
+PYTHON_ZLMDB_LICENSE_FILES = LICENSE
+
+$(eval $(python-package))