From 9fc4c0c863fe3d9c24591bd7029162b09ac74f18 Mon Sep 17 00:00:00 2001 From: Nicolas Graves Date: Fri, 7 Nov 2025 00:55:28 +0100 Subject: [PATCH] gnu: Add python-berkeleydb. * gnu/packages/python-xyz.scm (python-berkeleydb): New variable. (python-bsddb3): Inherit from python-berkeleydb. Change-Id: Icc9bb816a243f7bbc7b03f067ec4e8dfb9ba5125 Signed-off-by: Sharlatan Hellseher --- gnu/packages/python-xyz.scm | 61 ++++++++++++++++++++++++++----------- 1 file changed, 43 insertions(+), 18 deletions(-) diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm index a02afacb40d5f2d126d2cdfe9901e453bfebd09e..b63d4562df4ac506ca65dff0d0d4a66fb8594e17 100644 --- a/gnu/packages/python-xyz.scm +++ b/gnu/packages/python-xyz.scm @@ -28562,30 +28562,35 @@ should have run while it was offline.") library in Python.") (license license:expat))) -(define-public python-bsddb3 +(define-public python-berkeleydb (package - (name "python-bsddb3") - (version "6.2.9") + (name "python-berkeleydb") + (version "18.1.15") (source (origin (method url-fetch) - (uri (pypi-uri "bsddb3" version)) + (uri (pypi-uri "berkeleydb" version)) (sha256 - (base32 "00bqdsfx8jgmfz5bgkx10nlw5bfsw11a86f91zkl53snvk45xl3h")))) - (build-system python-build-system) - (inputs - (list bdb)) + (base32 "13kmvy6viay27khmj6ydryniirdsbqrc2mjnr2r6nk3m7la57yks")))) + (build-system pyproject-build-system) (arguments - '(#:phases - (modify-phases %standard-phases - (add-after 'unpack 'configure-locations - (lambda* (#:key inputs #:allow-other-keys) - (setenv "BERKELEYDB_DIR" (assoc-ref inputs "bdb")) - (setenv "YES_I_HAVE_THE_RIGHT_TO_USE_THIS_BERKELEY_DB_VERSION" "1") - #t)) - (replace 'check - (lambda _ - (invoke "python3" "test3.py" "-v")))))) + (list + #:test-backend #~'custom + #:test-flags #~(list "test.py" "-v") + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'configure-locations + (lambda* (#:key inputs #:allow-other-keys) + (setenv "BERKELEYDB_DIR" + (assoc-ref inputs "bdb")) + (setenv "YES_I_HAVE_THE_RIGHT_TO_USE_THIS_BERKELEY_DB_VERSION" + "1"))) + (add-after 'unpack 'remove-legacy + (lambda _ + (substitute* "pyproject.toml" + ((":__legacy__") ""))))))) + (native-inputs (list python-setuptools)) + (inputs (list bdb)) (home-page "https://www.jcea.es/programacion/pybsddb.htm") (synopsis "Python bindings for Oracle Berkeley DB") (description @@ -28598,6 +28603,26 @@ transactions. Complete support for Berkeley DB Replication Manager. Complete support for Berkeley DB Base Replication. Support for RPC.") (license license:bsd-3))) +;; Last version before rename to python-berkeleydb. +(define-public python-bsddb3 + (package + (inherit python-berkeleydb) + (name "python-bsddb3") + (version "6.2.9") + (source + (origin + (method url-fetch) + (uri (pypi-uri "bsddb3" version)) + (sha256 + (base32 "00bqdsfx8jgmfz5bgkx10nlw5bfsw11a86f91zkl53snvk45xl3h")))) + (arguments + (substitute-keyword-arguments (package-arguments python-berkeleydb) + ((#:phases phases #~%standard-phases) + #~(modify-phases #$phases + (delete 'remove-legacy))) + ((#:test-flags test-flags #~(list)) + #~(list "test3.py" "-v")))))) + (define-public python-dbfread (package (name "python-dbfread")