@@ -26556,3 +26556,44 @@ files and directories and adds a datestamp in standard ISO 8601+ format
YYYY-MM-DD at the beginning of the file or directory name.")
(home-page "https://github.com/novoid/date2name")
(license license:gpl3+))))
+
+(define-public python-berkeleydb
+ (package
+ (name "python-berkeleydb")
+ (version "18.1.4")
+ (source
+ (origin
+ ;; We use the upstream repository, as the tests are not included in the
+ ;; PyPI releases.
+ (method hg-fetch)
+ (uri (hg-reference
+ (url "https://hg.jcea.es/pybsddb/")
+ (changeset version)))
+ (file-name (string-append name "-" version "-checkout"))
+ (sha256
+ (base32
+ "0xj0l73ns6xph5pmysna7g4rdla1alvh2s2k2crhwv8yghjmnjqi"))))
+ (build-system python-build-system)
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (add-before 'unpack 'suppress-license-warning
+ (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")))
+ (replace 'check
+ (lambda* (#:key tests? #:allow-other-keys)
+ (when tests?
+ (invoke "./test.py" "-v")))))))
+ (inputs
+ `(("bdb" ,bdb)))
+ (home-page "https://www.jcea.es/programacion/pybsddb.htm")
+ (synopsis "Python bindings for Oracle Berkeley DB")
+ (description "This package provides a nearly complete wrapping of the
+Oracle/Sleepycat C API for the Database Environment, Database, Cursor, Log
+Cursor, Sequence and Transaction objects, and each of these is exposed as a
+Python type in the berkeleydb.db module. The database objects can use various
+access methods: btree, hash, recno, queue and heap. Oracle Berkeley DB
+distributed transactions, Oracle Berkeley DB Replication Manager and Oracle
+Berkeley DB Base Replication are supported.")
+ (license license:bsd-3)))