+
+(define-public mdbtools
+ (package
+ (name "mdbtools")
+ (version "0.7.1")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append "https://github.com/brianb/mdbtools/archive/"
+ version ".tar.gz"))
+ (sha256
+ (base32
+ "05hbmxcq173kzb899gdi3bz2qcc1vi3n1qbbkwpsvrq7ggf11wyw"))
+ (file-name (string-append name "-" version ".tar.gz"))))
+ (build-system gnu-build-system)
+ (inputs
+ `(("glib" ,glib)))
+ (native-inputs
+ `(("autoconf" ,autoconf)
+ ("automake" ,automake)
+ ("libtool" ,libtool)
+ ("pkg-config" ,pkg-config)
+ ("txt2man" ,txt2man)
+ ("which" ,which)))
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'autoreconf
+ (lambda _
+ (zero? (system* "autoreconf" "-vfi")))))))
+ (home-page "http://mdbtools.sourceforge.net/")
+ (synopsis "Read Microsoft Access databases")
+ (description "MDB Tools is a set of tools and applications to read the
+proprietary MDB file format used in Microsoft's Access database package. This
+includes programs to export schema and data from Microsoft's Access database
+file format to other databases such as MySQL, Oracle, Sybase, PostgreSQL,
+etc., and an SQL engine for performing simple SQL queries.")
+ (license (list license:lgpl2.0
+ license:gpl2+))))
+
+(define-public python-lmdb
+ (package
+ (name "python-lmdb")
+ (version "0.92")
+ (source (origin
+ (method url-fetch)
+ (uri (pypi-uri "lmdb" version))
+ (sha256
+ (base32
+ "01nw6r08jkipx6v92kw49z34wmwikrpvc5j9xawdiyg1n2526wrx"))
+ (modules '((guix build utils)))
+ (snippet
+ ;; Delete bundled lmdb source files.
+ '(for-each delete-file (list "lib/lmdb.h"
+ "lib/mdb.c"
+ "lib/midl.c"
+ "lib/midl.h")))))
+ (build-system python-build-system)
+ (inputs
+ `(("lmdb" ,lmdb)))
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (add-before 'build 'use-system-lmdb
+ (lambda* (#:key inputs #:allow-other-keys)
+ (let ((lmdb (assoc-ref inputs "lmdb")))
+ (setenv "LMDB_FORCE_SYSTEM" "set")
+ (setenv "LMDB_INCLUDEDIR" (string-append lmdb "/include"))
+ (setenv "LMDB_LIBDIR" (string-append lmdb "/lib"))
+ #t))))
+ ;; Tests fail with: ‘lmdb.tool: Please specify environment (--env)’.
+ #:tests? #f))
+ (home-page "https://github.com/dw/py-lmdb")
+ (synopsis "Python binding for the ‘Lightning’ database (LMDB)")
+ (description
+ "python-lmdb or py-lmdb is a Python binding for the @dfn{Lightning
+Memory-Mapped Database} (LMDB), a high-performance key-value store.")
+ (license
+ (list license:openldap2.8
+ ;; ‘lib/win32/inttypes.h’ and ‘lib/win32-stdint/stdint.h’ are BSD-3,
+ ;; but not actually needed on platforms currently supported by Guix.
+ license:bsd-3))))
+
+(define-public python2-lmdb
+ (package-with-python2 python-lmdb))
+
+(define-public python-orator
+ (package
+ (name "python-orator")
+ (version "0.9.7")
+ (source (origin
+ (method url-fetch)
+ (uri (pypi-uri "orator" version))
+ (sha256
+ (base32
+ "14r58z64fdp76ixnvmi4lni762b405ynmsx6chr1qihs3yl9zn6c"))))
+ (build-system python-build-system)
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'loosen-dependencies
+ ;; Tests are not actually run since they are not included with the
+ ;; distributed package, but dependencies are checked.
+ (lambda _
+ (substitute* "setup.py"
+ ((",<.*'") "'")
+ (("flexmock==0.9.7") "flexmock")
+ ;; The pytest-mock package is out of date, so we remove minimum
+ ;; version requirement.
+ (("pytest-mock.*'") "pytest-mock'"))
+ #t)))))
+ (native-inputs
+ `(("python-pytest-mock" ,python-pytest-mock)
+ ("python-pytest" ,python-pytest-3.0)
+ ("python-flexmock" ,python-flexmock)))
+ (propagated-inputs
+ `(("python-backpack" ,python-backpack)
+ ("python-blinker" ,python-blinker)
+ ("python-cleo" ,python-cleo)
+ ("python-faker" ,python-faker)
+ ("python-inflection" ,python-inflection)
+ ("python-lazy-object-proxy" ,python-lazy-object-proxy)
+ ("python-pendulum" ,python-pendulum)
+ ("python-pyaml" ,python-pyaml)
+ ("python-pygments" ,python-pygments)
+ ("python-simplejson" ,python-simplejson)
+ ("python-six" ,python-six)
+ ("python-wrapt" ,python-wrapt)))
+ (home-page "https://orator-orm.com/")
+ (synopsis "ActiveRecord ORM for Python")
+ (description
+ "Orator provides a simple ActiveRecord-like Object Relational Mapping
+implementation for Python.")
+ (license license:expat)
+ (properties `((python2-variant . ,(delay python2-orator))))))
+
+(define-public python2-orator
+ (package-with-python2 (strip-python2-variant python-orator)))