package/python-zlmdb: select python3 zlib support
PATCH v2 1/3 package/python-zlmdb: select python3 zlib support
From: Yegor Yefremov <[email protected]>
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).
---
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(+)
package/python-zlmdb/Config.in +1 -0
@@ -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
Signature · 6 lines
2.34.1 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
PATCH v2 2/3 package/python-zlmdb: don't install the vendored flatbuffers package
From: Yegor Yefremov <[email protected]>
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.
---
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
package/python-zlmdb/0001-setup.py-don-t-install-the-vendored-flatbuffers-package.patch new file +37 -0
@@ -0,0 +1,37 @@ +From 18c4d2d3c7c0c3104e9280ea717c68a5d8f1368d Mon Sep 17 00:00:00 2001 +From: Yegor Yefremov <[email protected]> +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 <[email protected]> +--- + 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',
Signature · 6 lines
2.34.1 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
PATCH v2 3/3 package/python-zlmdb: bump to version 26.7.1
In reply to Yegor YefremovFrom: Yegor Yefremov <[email protected]>
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
---
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
package/python-zlmdb/0001-setup.py-don-t-install-the-vendored-flatbuffers-package.patch deleted +0 -37
@@ -1,37 +0,0 @@ -From 18c4d2d3c7c0c3104e9280ea717c68a5d8f1368d Mon Sep 17 00:00:00 2001 -From: Yegor Yefremov <[email protected]> -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 <[email protected]> ---- - 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',
package/python-zlmdb/Config.in +0 -2
@@ -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
package/python-zlmdb/python-zlmdb.hash +4 -3
@@ -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
package/python-zlmdb/python-zlmdb.mk +10 -5
@@ -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))
Signature · 6 lines
2.34.1 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot