Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH v2 1/3] package/python-zlmdb: select python3 zlib support
@ 2026-10-14 21:10 Yegor Yefremov
  2026-10-14 21:10 ` [Buildroot] [PATCH v2 2/3] package/python-zlmdb: don't install the vendored flatbuffers package Yegor Yefremov
  2026-10-14 21:10 ` [Buildroot] [PATCH v2 3/3] package/python-zlmdb: bump to version 26.7.1 Yegor Yefremov
  0 siblings, 2 replies; 3+ messages in thread
From: Yegor Yefremov @ 2026-10-14 21:10 UTC (permalink / raw)
  To: buildroot; +Cc: Thomas Petazzoni

From: Yegor Yefremov <yegorslists@googlemail.com>

zlmdb/_pmap.py unconditionally imports the zlib module, so importing
zlmdb fails without it:

  ModuleNotFoundError: No module named 'zlib'

Select BR2_PACKAGE_PYTHON3_ZLIB.

The zlib import has been there since the package was added (22.3.1).

Fixes: acf68180de66 ("package/python-zlmdb: new package")

Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
Assisted-by: Claude:claude-opus-5-5
---
Changes v1 -> v2:
  - add Fixes: tag pointing to the commit adding the package (suggested
    by Thomas)

 package/python-zlmdb/Config.in | 1 +
 1 file changed, 1 insertion(+)

diff --git a/package/python-zlmdb/Config.in b/package/python-zlmdb/Config.in
index 884cfff182..1edf993ecd 100644
--- a/package/python-zlmdb/Config.in
+++ b/package/python-zlmdb/Config.in
@@ -5,6 +5,7 @@ config BR2_PACKAGE_PYTHON_ZLMDB
 	depends on BR2_INSTALL_LIBSTDCPP # python-numpy
 	depends on BR2_TOOLCHAIN_USES_GLIBC || BR2_TOOLCHAIN_USES_MUSL # python-numpy
 	depends on BR2_TOOLCHAIN_GCC_AT_LEAST_9 # python-numpy
+	select BR2_PACKAGE_PYTHON3_ZLIB # runtime
 	select BR2_PACKAGE_PYTHON_CBOR2 # runtime
 	select BR2_PACKAGE_PYTHON_CFFI # runtime
 	select BR2_PACKAGE_PYTHON_CLICK # runtime
-- 
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

* [Buildroot] [PATCH v2 2/3] package/python-zlmdb: don't install the vendored flatbuffers package
  2026-10-14 21:10 [Buildroot] [PATCH v2 1/3] package/python-zlmdb: select python3 zlib support Yegor Yefremov
@ 2026-10-14 21:10 ` Yegor Yefremov
  2026-10-14 21:10 ` [Buildroot] [PATCH v2 3/3] package/python-zlmdb: bump to version 26.7.1 Yegor Yefremov
  1 sibling, 0 replies; 3+ messages in thread
From: Yegor Yefremov @ 2026-10-14 21:10 UTC (permalink / raw)
  To: buildroot; +Cc: Thomas Petazzoni

From: Yegor Yefremov <yegorslists@googlemail.com>

zlmdb installs a copy of the flatbuffers runtime as a top-level
"flatbuffers" package, which conflicts with python-flatbuffers that
python-zlmdb selects:

  FileExistsError: File already exists: .../target/usr/lib/python3.14/site-packages/flatbuffers/__init__.py

The overlap has been there since the package was added, but it became
fatal when setuptools packages were migrated to the pep517 installer,
which refuses to overwrite files.

Add a patch so that zlmdb doesn't install its copy and uses
python-flatbuffers instead.

Fixes: https://autobuild.buildroot.org/results/e3b026cb48f41ec531e5bdae9e07b8e581f1a06b
Fixes: 8937db8dd595 ("package/pkg-python.mk: migrate setuptools to pep517")

Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
Assisted-by: Claude:claude-opus-5-5
---
Changes v1 -> v2:
  - new patch: minimal fix for the flatbuffers conflict that can be
    backported to the LTS branches instead of the version bump
    (suggested by Thomas). Tested on master and 2025.02.x.

 ...all-the-vendored-flatbuffers-package.patch | 37 +++++++++++++++++++
 1 file changed, 37 insertions(+)
 create mode 100644 package/python-zlmdb/0001-setup.py-don-t-install-the-vendored-flatbuffers-package.patch

diff --git a/package/python-zlmdb/0001-setup.py-don-t-install-the-vendored-flatbuffers-package.patch b/package/python-zlmdb/0001-setup.py-don-t-install-the-vendored-flatbuffers-package.patch
new file mode 100644
index 0000000000..608074ea51
--- /dev/null
+++ b/package/python-zlmdb/0001-setup.py-don-t-install-the-vendored-flatbuffers-package.patch
@@ -0,0 +1,37 @@
+From 18c4d2d3c7c0c3104e9280ea717c68a5d8f1368d Mon Sep 17 00:00:00 2001
+From: Yegor Yefremov <yegorslists@googlemail.com>
+Date: Wed, 14 Oct 2026 17:52:45 +0200
+Subject: [PATCH] setup.py: don't install the vendored flatbuffers package
+
+zlmdb installs a copy of the flatbuffers runtime as a top-level
+"flatbuffers" package, although it also depends on the flatbuffers
+package (install_requires). Both install
+site-packages/flatbuffers/__init__.py, so installing zlmdb on top of
+flatbuffers fails with a pep517 installer:
+
+  FileExistsError: File already exists: .../site-packages/flatbuffers/__init__.py
+
+Don't install the vendored copy and use the flatbuffers package
+instead. zlmdb.flatbuffers (the reflection code) is not affected.
+
+Upstream: N/A, since version 25.12.1 upstream no longer installs a
+top-level flatbuffers package (the runtime is vendored as
+zlmdb.flatbuffers).
+
+Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
+---
+ setup.py | 1 -
+ 1 file changed, 1 deletion(-)
+
+diff --git a/setup.py b/setup.py
+index 16ed0cb..571615a 100644
+--- a/setup.py
++++ b/setup.py
+@@ -67,7 +67,6 @@ with open('requirements-dev.txt') as f:
+ test_requirements = ['pytest', 'pytest-runner']
+ 
+ packages = [
+-    'flatbuffers',
+     'zlmdb',
+     'zlmdb.flatbuffers',
+     'zlmdb.flatbuffers.reflection',
-- 
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

* [Buildroot] [PATCH v2 3/3] package/python-zlmdb: bump to version 26.7.1
  2026-10-14 21:10 [Buildroot] [PATCH v2 1/3] package/python-zlmdb: select python3 zlib support Yegor Yefremov
  2026-10-14 21:10 ` [Buildroot] [PATCH v2 2/3] package/python-zlmdb: don't install the vendored flatbuffers package Yegor Yefremov
@ 2026-10-14 21:10 ` Yegor Yefremov
  1 sibling, 0 replies; 3+ messages in thread
From: Yegor Yefremov @ 2026-10-14 21:10 UTC (permalink / raw)
  To: buildroot; +Cc: Thomas Petazzoni

From: Yegor Yefremov <yegorslists@googlemail.com>

Since version 25.12.1 zlmdb no longer installs a top-level flatbuffers
package: the flatbuffers runtime is vendored as zlmdb.flatbuffers. So
the patch that drops the vendored copy is no longer needed. py-lmdb
plus a patched LMDB are vendored as zlmdb._lmdb_vendor, built as a CFFI
extension. Thus drop the python-flatbuffers and python-lmdb selects.

The build system switched to hatchling. The build hook needs host cffi
and setuptools to compile the LMDB extension and uses cmake to build
the bundled flatc compiler.

Update the license information to cover the bundled LMDB, py-lmdb and
flatbuffers code.

Changelog: https://github.com/crossbario/zlmdb/blob/master/docs/changelog.rst

Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
Assisted-by: Claude:claude-opus-5-5
---
Changes v1 -> v2:
  - drop the patch added in the previous commit
  - move the autobuild Fixes: tag to the previous commit

 ...all-the-vendored-flatbuffers-package.patch | 37 -------------------
 package/python-zlmdb/Config.in                |  2 -
 package/python-zlmdb/python-zlmdb.hash        |  7 ++--
 package/python-zlmdb/python-zlmdb.mk          | 15 +++++---
 4 files changed, 14 insertions(+), 47 deletions(-)
 delete mode 100644 package/python-zlmdb/0001-setup.py-don-t-install-the-vendored-flatbuffers-package.patch

diff --git a/package/python-zlmdb/0001-setup.py-don-t-install-the-vendored-flatbuffers-package.patch b/package/python-zlmdb/0001-setup.py-don-t-install-the-vendored-flatbuffers-package.patch
deleted file mode 100644
index 608074ea51..0000000000
--- a/package/python-zlmdb/0001-setup.py-don-t-install-the-vendored-flatbuffers-package.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-From 18c4d2d3c7c0c3104e9280ea717c68a5d8f1368d Mon Sep 17 00:00:00 2001
-From: Yegor Yefremov <yegorslists@googlemail.com>
-Date: Wed, 14 Oct 2026 17:52:45 +0200
-Subject: [PATCH] setup.py: don't install the vendored flatbuffers package
-
-zlmdb installs a copy of the flatbuffers runtime as a top-level
-"flatbuffers" package, although it also depends on the flatbuffers
-package (install_requires). Both install
-site-packages/flatbuffers/__init__.py, so installing zlmdb on top of
-flatbuffers fails with a pep517 installer:
-
-  FileExistsError: File already exists: .../site-packages/flatbuffers/__init__.py
-
-Don't install the vendored copy and use the flatbuffers package
-instead. zlmdb.flatbuffers (the reflection code) is not affected.
-
-Upstream: N/A, since version 25.12.1 upstream no longer installs a
-top-level flatbuffers package (the runtime is vendored as
-zlmdb.flatbuffers).
-
-Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
----
- setup.py | 1 -
- 1 file changed, 1 deletion(-)
-
-diff --git a/setup.py b/setup.py
-index 16ed0cb..571615a 100644
---- a/setup.py
-+++ b/setup.py
-@@ -67,7 +67,6 @@ with open('requirements-dev.txt') as f:
- test_requirements = ['pytest', 'pytest-runner']
- 
- packages = [
--    'flatbuffers',
-     'zlmdb',
-     'zlmdb.flatbuffers',
-     'zlmdb.flatbuffers.reflection',
diff --git a/package/python-zlmdb/Config.in b/package/python-zlmdb/Config.in
index 1edf993ecd..f6b8caebcb 100644
--- a/package/python-zlmdb/Config.in
+++ b/package/python-zlmdb/Config.in
@@ -9,8 +9,6 @@ config BR2_PACKAGE_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
diff --git a/package/python-zlmdb/python-zlmdb.hash b/package/python-zlmdb/python-zlmdb.hash
index ed1b6db8c2..e29bbea280 100644
--- a/package/python-zlmdb/python-zlmdb.hash
+++ b/package/python-zlmdb/python-zlmdb.hash
@@ -1,5 +1,6 @@
 # md5, sha256 from https://pypi.org/pypi/zlmdb/json
-md5  4d96b46d1724b9d4cb6961874e5b4a9a  zlmdb-23.1.1.tar.gz
-sha256  ddcf680bf49352cabe35bfb5bfe3acbd5d6b8d481cafa508c423e0b18d654d05  zlmdb-23.1.1.tar.gz
+md5  186642d7df261a781631a734244f785e  zlmdb-26.7.1.tar.gz
+sha256  3cbc9447cfbf3b33dad0a30f7e671d467d72b41e5bc4e999b4f41914eff5fcb9  zlmdb-26.7.1.tar.gz
 # Locally computed sha256 checksums
-sha256  8a139bf325dcca11e0e476ce537bf791a6cfbeed8899a9b6ddc55238e180d230  LICENSE
+sha256  0ba0c0c595fd01ee19478ca417f210b75740f9b84ca937ebf783154e1cc01174  LICENSE
+sha256  cfc7749b96f63bd31c3c42b5c471bf756814053e847c10f3eb003417bc523d30  deps/flatbuffers/LICENSE
diff --git a/package/python-zlmdb/python-zlmdb.mk b/package/python-zlmdb/python-zlmdb.mk
index 70538ce63c..da625f9777 100644
--- a/package/python-zlmdb/python-zlmdb.mk
+++ b/package/python-zlmdb/python-zlmdb.mk
@@ -4,11 +4,16 @@
 #
 ################################################################################
 
-PYTHON_ZLMDB_VERSION = 23.1.1
+PYTHON_ZLMDB_VERSION = 26.7.1
 PYTHON_ZLMDB_SOURCE = zlmdb-$(PYTHON_ZLMDB_VERSION).tar.gz
-PYTHON_ZLMDB_SITE = https://files.pythonhosted.org/packages/56/b2/abaeb5419435a6224a0beb2b5edad621ec975fe4802297963ecf1728b883
-PYTHON_ZLMDB_SETUP_TYPE = setuptools
-PYTHON_ZLMDB_LICENSE = MIT
-PYTHON_ZLMDB_LICENSE_FILES = LICENSE
+PYTHON_ZLMDB_SITE = https://files.pythonhosted.org/packages/87/21/5b877e438d652f78bcf88aec83474b373f8ab1b98b6c0c5d47db3481d6b0
+PYTHON_ZLMDB_SETUP_TYPE = hatch
+PYTHON_ZLMDB_LICENSE = MIT, OLDAP-2.8 (bundled lmdb, py-lmdb), Apache-2.0 (bundled flatbuffers)
+PYTHON_ZLMDB_LICENSE_FILES = LICENSE deps/flatbuffers/LICENSE
+# cmake is used to build the bundled flatc compiler
+PYTHON_ZLMDB_DEPENDENCIES = \
+	$(BR2_CMAKE_HOST_DEPENDENCY) \
+	host-python-cffi \
+	host-python-setuptools
 
 $(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

end of thread, other threads:[~2026-10-14 21:11 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-14 21:10 [Buildroot] [PATCH v2 1/3] package/python-zlmdb: select python3 zlib support Yegor Yefremov
2026-10-14 21:10 ` [Buildroot] [PATCH v2 2/3] package/python-zlmdb: don't install the vendored flatbuffers package Yegor Yefremov
2026-10-14 21:10 ` [Buildroot] [PATCH v2 3/3] package/python-zlmdb: bump to version 26.7.1 Yegor Yefremov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox