X-Git-Url: https://git.hcoop.net/jackhill/guix/guix.git/blobdiff_plain/bb4674b43fa413a6d41694b2093c3b00d11eea47..b0e7b6992f3f845e83cfbca4d700b51dba50b4d5:/gnu/packages/databases.scm diff --git a/gnu/packages/databases.scm b/gnu/packages/databases.scm index 9681be8b4b..55fc4f8850 100644 --- a/gnu/packages/databases.scm +++ b/gnu/packages/databases.scm @@ -11,13 +11,13 @@ ;;; Copyright © 2016 Hartmut Goebel ;;; Copyright © 2016 Christopher Allan Webber ;;; Copyright © 2015, 2016, 2017, 2018, 2019, 2020 Efraim Flashner -;;; Copyright © 2016, 2017 ng0 +;;; Copyright © 2016, 2017 Nikita ;;; Copyright © 2016, 2017, 2018 Roel Janssen ;;; Copyright © 2016 David Craven ;;; Copyright © 2016 Jan Nieuwenhuizen ;;; Copyright © 2016 Andy Patterson ;;; Copyright © 2016 Danny Milosavljevic -;;; Copyright © 2016, 2017, 2018, 2019 Marius Bakke +;;; Copyright © 2016, 2017, 2018, 2019, 2020 Marius Bakke ;;; Copyright © 2017, 2018 Julien Lepiller ;;; Copyright © 2017, 2020 Thomas Danckaert ;;; Copyright © 2017 Jelle Licht @@ -40,6 +40,9 @@ ;;; Copyright © 2019 Guillaume Le Vaillant ;;; Copyright © 2020 Pierre Neidhardt ;;; Copyright © 2020 Nicolò Balzarotti +;;; Copyright © 2020 Tanguy Le Carrour +;;; Copyright © 2020 Lars-Dominik Braun +;;; Copyright © 2020 Guy Fleury Iteriteka ;;; ;;; This file is part of GNU Guix. ;;; @@ -86,7 +89,9 @@ #:use-module (gnu packages language) #:use-module (gnu packages libevent) #:use-module (gnu packages linux) + #:use-module (gnu packages logging) #:use-module (gnu packages man) + #:use-module (gnu packages maths) #:use-module (gnu packages ncurses) #:use-module (gnu packages onc-rpc) #:use-module (gnu packages parallel) @@ -96,6 +101,7 @@ #:use-module (gnu packages perl-web) #:use-module (gnu packages pkg-config) #:use-module (gnu packages popt) + #:use-module (gnu packages protobuf) #:use-module (gnu packages python) #:use-module (gnu packages python-crypto) #:use-module (gnu packages python-web) @@ -103,6 +109,8 @@ #:use-module (gnu packages python-xyz) #:use-module (gnu packages rdf) #:use-module (gnu packages readline) + #:use-module (gnu packages regex) + #:use-module (gnu packages rpc) #:use-module (gnu packages ruby) #:use-module (gnu packages serialization) #:use-module (gnu packages sphinx) @@ -140,7 +148,7 @@ (source (origin (method git-fetch) (uri (git-reference - (url "https://github.com/4store/4store.git") + (url "https://github.com/4store/4store") (commit (string-append "v" version)))) (file-name (git-file-name name version)) (sha256 @@ -166,7 +174,7 @@ ("avahi" ,avahi) ("cyrus-sasl" ,cyrus-sasl) ("openssl" ,openssl) - ("util-linux" ,util-linux))) + ("util-linux" ,util-linux "lib"))) ;; http://www.4store.org has been down for a while now. (home-page "https://github.com/4store/4store") (synopsis "Clustered RDF storage and query engine") @@ -217,44 +225,28 @@ either single machines or networked clusters.") "@code{mgo} (pronounced as mango) is a MongoDB driver for the Go language. It implements a rich selection of features under a simple API following standard Go idioms.") - (home-page "http://labix.org/mgo") + (home-page "https://labix.org/mgo") (license license:bsd-2))) (define-public ephemeralpg (package (name "ephemeralpg") - (version "2.8") + (version "3.0") (source (origin (method url-fetch) (uri (string-append - "http://eradman.com/ephemeralpg/code/ephemeralpg-" + "https://eradman.com/ephemeralpg/code/ephemeralpg-" version ".tar.gz")) (sha256 - (base32 "1dpfxsd8a52psx3zlfbqkw53m35w28qwyb87a8anz143x6gnkkr4")))) + (base32 "1j0g7g114ma7y7sadbng5p1ss1zsm9zpicm77qspym6565733vvh")))) (build-system gnu-build-system) (arguments '(#:make-flags (list "CC=gcc" (string-append "PREFIX=" %output)) #:phases (modify-phases %standard-phases - (delete 'configure) - (replace 'check - (lambda* (#:key inputs #:allow-other-keys) - ;; The intention for one test is to test without PostgreSQL on - ;; the $PATH, so replace the test $PATH with just the util-linux - ;; bin, which contains getopt. It will hopefully be possible to - ;; remove this for releases after 2.8. - (substitute* "test.rb" - (("/bin:/usr/bin") - (string-append (assoc-ref inputs "util-linux") - "/bin"))) - ;; Set the LC_ALL=C as some tests use sort, and the locale - ;; affects the order. It will hopefully be possible to remove - ;; this for releases after 2.8. - (setenv "LC_ALL" "C") - (invoke "ruby" "test.rb") - #t)) + (delete 'configure) ; no configure script (add-after 'install 'wrap (lambda* (#:key inputs outputs #:allow-other-keys) (let ((out (assoc-ref outputs "out"))) @@ -264,15 +256,18 @@ standard Go idioms.") "/bin") ,(string-append (assoc-ref inputs "postgresql") "/bin") - ;; For getsocket + ;; For getsocket. ,(string-append out "/bin"))))) - #t))))) + #t))) + #:test-target "test")) (inputs `(("postgresql" ,postgresql) ("util-linux" ,util-linux))) (native-inputs - `(("ruby" ,ruby))) - (home-page "http://eradman.com/ephemeralpg/") + ;; For tests. + `(("ruby" ,ruby) + ("which" ,which))) + (home-page "https://eradman.com/ephemeralpg/") (synopsis "Run temporary PostgreSQL databases") (description "@code{pg_tmp} creates temporary PostgreSQL databases, suitable for tasks @@ -519,7 +514,7 @@ replacement for the code@{python-memcached} library.") ("python" ,python-2) ("python2-pymongo" ,python2-pymongo) ("python2-pyyaml" ,python2-pyyaml) - ("tzdata" ,tzdata))) + ("tzdata" ,tzdata-for-tests))) (arguments `(#:scons ,scons-python2 #:phases @@ -615,6 +610,37 @@ RDBMS systems (which are deep in functionality).") ;; Some parts are licensed under the Apache License license:asl2.0)))) +(define-public mycli + (package + (name "mycli") + (version "1.21.1") + (source + (origin + (method url-fetch) + (uri (pypi-uri "mycli" version)) + (sha256 + (base32 + "1q9p0yik9cpvpxjs048anvhicfcna84mpl7axv9bwgr48w40lqwg")))) + (build-system python-build-system) + (arguments + `(#:tests? #f)) ; tests expect a running MySQL + (propagated-inputs + `(("python-cli-helpers" ,python-cli-helpers) + ("python-click" ,python-click) + ("python-configobj" ,python-configobj) + ("python-cryptography" ,python-cryptography) + ("python-prompt-toolkit" ,python-prompt-toolkit) + ("python-pygments" ,python-pygments) + ("python-pymysql" ,python-pymysql) + ("python-sqlparse" ,python-sqlparse))) + (home-page "http://mycli.net") + (synopsis + "Terminal Client for MySQL with AutoCompletion and Syntax Highlighting") + (description + "MyCLI is a command line interface for MySQL, MariaDB, and Percona with +auto-completion and syntax highlighting.") + (license license:bsd-3))) + ;; XXX When updating, check whether boost-for-mysql is still needed. ;; It might suffice to patch ‘cmake/boost.cmake’ as done in the past. (define-public mysql @@ -690,7 +716,7 @@ Language.") (define-public mariadb (package (name "mariadb") - (version "10.1.44") + (version "10.1.45") (source (origin (method url-fetch) (uri (string-append "https://downloads.mariadb.com/MariaDB" @@ -698,7 +724,7 @@ Language.") version ".tar.gz")) (sha256 (base32 - "0fah6d50hldq0farxwr8mj3jnniwdz0d1wsha07nx37fc79h7wi1")) + "1mfs0x4c0z7d306n128dxdawk3llk25vxif5zwl20fv1z5qhz3wx")) (patches (search-patches "mariadb-client-test-32bit.patch")) (modules '((guix build utils))) (snippet @@ -772,6 +798,20 @@ Language.") "-DINSTALL_SHAREDIR=share") #:phases (modify-phases %standard-phases + ,@(if (string-prefix? "arm" (%current-system)) + ;; XXX: Because of the GCC 5 input, we need to hide GCC 7 from + ;; CPLUS_INCLUDE_PATH so that its headers do not shadow GCC 5. + '((add-after 'set-paths 'hide-default-gcc + (lambda* (#:key inputs #:allow-other-keys) + (let ((gcc (assoc-ref inputs "gcc"))) + (setenv "CPLUS_INCLUDE_PATH" + (string-join + (delete (string-append gcc "/include/c++") + (string-split (getenv "CPLUS_INCLUDE_PATH") + #\:)) + ":")) + #t)))) + '()) (add-after 'unpack 'fix-pcre-detection (lambda _ ;; The bundled PCRE in MariaDB has a patch that was upstreamed @@ -904,7 +944,7 @@ Language.") `(("bison" ,bison) ;; XXX: On armhf, use GCC 5 to work around . ,@(if (string-prefix? "armhf" (%current-system)) - `(("gcc", gcc-5)) + `(("gcc@5", gcc-5)) '()) ("perl" ,perl))) (inputs @@ -930,7 +970,7 @@ as a drop-in replacement of MySQL.") (define-public mariadb-connector-c (package (name "mariadb-connector-c") - (version "3.1.6") + (version "3.1.9") (source (origin (method url-fetch) (uri (string-append @@ -939,13 +979,12 @@ as a drop-in replacement of MySQL.") version "-src.tar.gz")) (sha256 (base32 - "083724f5daaqyzdcx508caz6fk2hs89jff85zg28ih43vxkvnrnj")))) + "1izjzf7yzjqzlk8dkp327fa9lawsv2hnnlnr7g5lshyx5azrk38h")))) (inputs `(("openssl" ,openssl))) (build-system cmake-build-system) (arguments - ;; No tests. - '(#:tests? #f)) + '(#:tests? #f)) ; no tests (home-page "https://mariadb.com/kb/en/mariadb-connector-c/") (synopsis "Client library to connect to MySQL or MariaDB") (description "The MariaDB Connector/C is used to connect applications @@ -956,14 +995,14 @@ developed in C/C++ to MariaDB and MySQL databases.") (define-public postgresql (package (name "postgresql") - (version "10.12") + (version "10.13") (source (origin (method url-fetch) (uri (string-append "https://ftp.postgresql.org/pub/source/v" version "/postgresql-" version ".tar.bz2")) (sha256 (base32 - "1rsab4zf4rx7pvvhlwhb04kb95aiad9cwazc4ksbvg2gij47z3rq")) + "1qal0yp7a90yzya7hl56gsmw5fvacplrdhpn7h9gnbyr1i2iyw2d")) (patches (search-patches "postgresql-disable-resolve_symlinks.patch")))) (build-system gnu-build-system) (arguments @@ -985,7 +1024,7 @@ developed in C/C++ to MariaDB and MySQL databases.") (invoke "make" "-C" "contrib" "install")))))) (inputs `(("readline" ,readline) - ("libuuid" ,util-linux) + ("libuuid" ,util-linux "lib") ("openssl" ,openssl) ("zlib" ,zlib))) (home-page "https://www.postgresql.org/") @@ -1070,7 +1109,7 @@ Most public APIs are compatible with @command{mysqlclient} and MySQLdb.") (assoc-ref %outputs "out") "/lib")) #:make-flags (list "CFLAGS=-fPIC"))) - (home-page "http://fallabs.com/qdbm") + (home-page "https://fallabs.com/qdbm/") (synopsis "Key-value database") (description "QDBM is a library of routines for managing a database. The database is a simple data file containing key-value @@ -1140,7 +1179,7 @@ including field and record folding."))) (define-public rocksdb (package (name "rocksdb") - (version "6.6.4") + (version "6.10.2") (source (origin (method git-fetch) (uri (git-reference @@ -1149,7 +1188,7 @@ including field and record folding."))) (file-name (git-file-name name version)) (sha256 (base32 - "1h7y31b05w4vv4v509l368j9qlbv5assmdq9hp2788zipqbpywc0")) + "1f2wqb6px812ijcivq3rsknqgkv01wblc6sd8wavhrw8qljgr3s1")) (modules '((guix build utils))) (snippet '(begin @@ -1244,19 +1283,20 @@ data in a single database. RocksDB is partially based on @code{LevelDB}.") (name "sparql-query") (version "1.1") (source (origin - (method url-fetch) - (uri (string-append "https://github.com/tialaramex/" - name "/archive/" version ".tar.gz")) + (method git-fetch) + (uri (git-reference + (url "https://github.com/tialaramex/sparql-query") + (commit version))) (sha256 - (base32 "0yq3k20472rv8npcc420q9ab6idy584g5y0q501d360k5q0ggr8w")) - (file-name (string-append name "-" version ".tar.gz")))) + (base32 "0a84a89idpjhj9w2y3fmvzv7ldps1cva1kxvfmh897k02kaniwxk")) + (file-name (git-file-name name version)))) (build-system gnu-build-system) (inputs - `(("readline" ,readline) - ("ncurses" ,ncurses) + `(("curl" ,curl) ("glib" ,glib) ("libxml2" ,libxml2) - ("curl" ,curl))) + ("ncurses" ,ncurses) + ("readline" ,readline))) (native-inputs `(("pkg-config" ,pkg-config))) (arguments @@ -1393,7 +1433,7 @@ which uses SQL to describe changes.") (source (origin (method git-fetch) (uri (git-reference - (url "https://github.com/coffeeandscripts/sqlcrush.git") + (url "https://github.com/coffeeandscripts/sqlcrush") (commit commit))) (file-name (git-file-name name version)) (sha256 @@ -1455,7 +1495,7 @@ extremely small.") (define-public perl-dbi (package (name "perl-dbi") - (version "1.642") + (version "1.643") (source (origin (method url-fetch) (uri (string-append @@ -1463,7 +1503,7 @@ extremely small.") version ".tar.gz")) (sha256 (base32 - "0pbzqazrx7pnw4nbyaf27in4b6yddkirbd2ws7mnqa2n7812a81z")))) + "1yinx39960y241vf2sknxj0dfz82a5m9gvklq5rw78k0nlyrjawa")))) (build-system perl-build-system) (synopsis "Database independent interface for Perl") (description "This package provides an database interface for Perl.") @@ -1473,15 +1513,14 @@ extremely small.") (define-public perl-dbix-class (package (name "perl-dbix-class") - (version "0.082841") + (version "0.082842") (source (origin (method url-fetch) (uri (string-append "mirror://cpan/authors/id/R/RI/RIBASUSHI/" "DBIx-Class-" version ".tar.gz")) (sha256 - (base32 - "1gf3hgv8f9rnr8bl4ljgsqk4aliphmvljhsk4282kvdc4mcgh1fp")))) + (base32 "1rh7idjjbibc1zmiaaarask434lh0lx7f2xyfwmy37k9fa0xcpmh")))) (build-system perl-build-system) (native-inputs `(("perl-dbd-sqlite" ,perl-dbd-sqlite) @@ -1509,7 +1548,7 @@ extremely small.") ("perl-path-class" ,perl-path-class) ("perl-scalar-list-utils" ,perl-scalar-list-utils) ("perl-scope-guard" ,perl-scope-guard) - ("perl-sql-abstract" ,perl-sql-abstract) + ("perl-sql-abstract-classic" ,perl-sql-abstract-classic) ("perl-sub-name" ,perl-sub-name) ("perl-text-balanced" ,perl-text-balanced) ("perl-try-tiny" ,perl-try-tiny))) @@ -1699,7 +1738,7 @@ columns, primary keys, unique constraints and relationships.") (define-public perl-dbd-sqlite (package (name "perl-dbd-sqlite") - (version "1.62") + (version "1.64") (source (origin (method url-fetch) (uri (string-append @@ -1707,7 +1746,7 @@ columns, primary keys, unique constraints and relationships.") version ".tar.gz")) (sha256 (base32 - "0p78ri1q6xpc1i98i6mlriv8n66iz8r5r11dlsknjm4y58rfz0mx")))) + "00gz5aw3xrr92lf9nfk0dhmy7a8jzmxhznddd9b0a8w4a1xqzbpl")))) (build-system perl-build-system) (inputs `(("sqlite" ,sqlite))) (propagated-inputs `(("perl-dbi" ,perl-dbi))) @@ -1745,14 +1784,14 @@ libmysqlclient. It will fill an aray with long options, ready to be parsed by (define-public perl-sql-abstract (package (name "perl-sql-abstract") - (version "1.86") + (version "1.87") (source (origin (method url-fetch) (uri (string-append "mirror://cpan/authors/id/I/IL/ILMARI/" "SQL-Abstract-" version ".tar.gz")) (sha256 - (base32 "1pwcm8hwxcgidyyrak37lx69d85q728jxsb0b14jz93gbvdgg9z7")))) + (base32 "0jhw91b23wc9bkfwcgvka4x5ddxk58m9bcp5ay7a3vx77nla09p9")))) (build-system perl-build-system) (native-inputs `(("perl-module-install" ,perl-module-install) @@ -1774,6 +1813,42 @@ structures you provide it, so that you don't have to modify your code every time your data changes.") (license license:perl-license))) +(define-public perl-sql-abstract-classic + (package + (name "perl-sql-abstract-classic") + (version "1.91") + (source + (origin + (method url-fetch) + (uri (string-append "mirror://cpan/authors/id/R/RI/RIBASUSHI/" + "SQL-Abstract-Classic-" version ".tar.gz")) + (sha256 + (base32 "0a7g13hs3kdxrjn43sfli09mgsi9d6w0dfw6hlk268av17yisgaf")))) + (build-system perl-build-system) + (native-inputs + `(("perl-test-deep" ,perl-test-deep) + ("perl-test-exception" ,perl-test-exception) + ("perl-test-warn" ,perl-test-warn))) + (propagated-inputs + `(("perl-mro-compat" ,perl-mro-compat) + ("perl-sql-abstract" ,perl-sql-abstract))) + (home-page "https://metacpan.org/release/SQL-Abstract-Classic") + (synopsis "Generate SQL from Perl data structures") + (description + "This module is nearly identical to @code{SQL::Abstract} 1.81, and exists +to preserve the ability of users to opt into the new way of doing things in +later versions according to their own schedules. + +It is an abstract SQL generation module based on the concepts used by +@code{DBIx::Abstract}, with several important differences, especially when it +comes to @code{WHERE} clauses. These concepts were modified to make the SQL +easier to generate from Perl data structures. + +The underlying idea is for this module to do what you mean, based on the data +structures you provide it. You shouldn't have to modify your code every time +your data changes, as this module figures it out.") + (license license:perl-license))) + (define-public perl-sql-splitstatement (package (name "perl-sql-splitstatement") @@ -1892,7 +1967,7 @@ similar to BerkeleyDB, LevelDB, etc.") (description "Redis is an advanced key-value cache and store. Redis supports many data structures including strings, hashes, lists, sets, sorted sets, bitmaps and hyperloglogs.") - (home-page "http://redis.io/") + (home-page "https://redis.io/") (license license:bsd-3))) (define-public kyotocabinet @@ -2045,17 +2120,14 @@ database.") (define-public perl-db-file (package (name "perl-db-file") - (version "1.852") + (version "1.853") (source (origin (method url-fetch) - (uri (string-append - "mirror://cpan/authors/id/P/PM/PMQS/DB_File-" - version - ".tar.gz")) + (uri (string-append "mirror://cpan/authors/id/P/PM/PMQS/DB_File-" + version ".tar.gz")) (sha256 - (base32 - "14c30xyqx9c1hxw40bqbzls41al8gmklxv5jbk2kknmn4dsrbdrs")))) + (base32 "1y967si45vj0skip1hnhicbv9da29fv6qcfwnsbnvj06n36mkj6h")))) (build-system perl-build-system) (inputs `(("bdb" ,bdb))) (native-inputs `(("perl-test-pod" ,perl-test-pod))) @@ -2077,16 +2149,16 @@ database.") (define-public lmdb (package (name "lmdb") - (version "0.9.24") + (version "0.9.25") (source (origin (method git-fetch) (uri (git-reference - (url "https://github.com/LMDB/lmdb.git") + (url "https://git.openldap.org/openldap/openldap.git") (commit (string-append "LMDB_" version)))) (file-name (git-file-name name version)) (sha256 - (base32 "088q6m8fvr12w43s461h7cvpg5hj8csaqj6n9pci150dz7bk5lxm")))) + (base32 "0i60zlca8r6fib23gdgl4c80gxpx24772ggpvz94yr7zaai4k11w")))) (build-system gnu-build-system) (arguments `(#:test-target "test" @@ -2098,7 +2170,7 @@ database.") (substitute* "Makefile" (("/usr/local") (assoc-ref outputs "out"))) #t))))) - (home-page "https://symas.com/products/lightning-memory-mapped-database") + (home-page "https://symas.com/lmdb/") (synopsis "Lightning Memory-Mapped Database library") (description "The @dfn{Lightning Memory-Mapped Database} (LMDB) is a high-performance @@ -2120,7 +2192,7 @@ virtual address space — not physical RAM.") (origin (method git-fetch) (uri (git-reference - (url "https://github.com/drycpp/lmdbxx.git") + (url "https://github.com/drycpp/lmdbxx") (commit version))) (file-name (git-file-name name version)) (sha256 @@ -2178,14 +2250,14 @@ on another machine, accessed via TCP/IP.") (define-public python-peewee (package (name "python-peewee") - (version "2.10.2") + (version "3.9.6") (source (origin (method url-fetch) (uri (pypi-uri "peewee" version)) (sha256 (base32 - "10f2mrd5hw6rjklrzaix2lsxlgc8vx3xak54arcy6yd791zhchi3")))) + "1j4sh946k0736m7pd54z0y6i2hjhgg3kdllx1pwq8xkzzcgrx1xw")))) (build-system python-build-system) (arguments `(#:tests? #f)) ; Fails to import test data @@ -2204,6 +2276,41 @@ can autogenerate peewee models using @code{pwiz}, a model generator.") (define-public python2-peewee (package-with-python2 python-peewee)) +(define-public python-tortoise-orm + (package + (name "python-tortoise-orm") + (version "0.16.7") + (source + (origin + (method url-fetch) + (uri (pypi-uri "tortoise-orm" version)) + (sha256 + (base32 + "0wr7p4v0b16ypm9fcpwpl99kf491m6w3jkd13xcsgq13fy73fbqc")))) + (build-system python-build-system) + ;; Disable tests for now. They pull in a lot of dependencies. + (arguments `(#:tests? #f)) + (native-inputs + `(("python-asynctest" ,python-asynctest) + ("python-nose2" ,python-nose2))) + (propagated-inputs + `(("python-aiosqlite" ,python-aiosqlite) + ("python-pypika" ,python-pypika) + ("python-ciso8601" ,python-ciso8601) + ("python-typing-extensions" + ,python-typing-extensions))) + (home-page + "https://github.com/tortoise/tortoise-orm") + (synopsis + "Easy async ORM for python, built with relations in mind") + (description + "Tortoise ORM is an easy-to-use asyncio ORM (Object Relational Mapper) +inspired by Django. Tortoise ORM was build with relations in mind and +admiration for the excellent and popular Django ORM. It’s engraved in its +design that you are working not with just tables, you work with relational +data.") + (license license:asl2.0))) + (define-public sqlcipher (package (name "sqlcipher") @@ -2314,7 +2421,7 @@ for ODBC.") (origin (method git-fetch) (uri (git-reference - (url "https://github.com/brianb/mdbtools.git") + (url "https://github.com/brianb/mdbtools") (commit version))) (file-name (git-file-name name version)) (sha256 @@ -2343,13 +2450,13 @@ etc., and an SQL engine for performing simple SQL queries.") (define-public python-lmdb (package (name "python-lmdb") - (version "0.95") + (version "0.98") (source (origin (method url-fetch) (uri (pypi-uri "lmdb" version)) (sha256 (base32 - "0nx9f193gzl33r1lbqhb96h1igya7pz8wmahr8m9x5zgc05hal91")) + "027pgbdhhdcbwj53vrzr6a60gjhmz4s75gl3180fd4q8pwlbq986")) (modules '((guix build utils))) (snippet ;; Delete bundled lmdb source files. @@ -2385,38 +2492,20 @@ Memory-Mapped Database} (LMDB), a high-performance key-value store.") ;; 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") + (version "0.9.9") (source (origin (method url-fetch) (uri (pypi-uri "orator" version)) (sha256 (base32 - "14r58z64fdp76ixnvmi4lni762b405ynmsx6chr1qihs3yl9zn6c")))) + "0mbgybz63ryhr9p1f4glnls5c57jp6il3dw0kf97f3pj80687rvg")))) (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) - ("python-flexmock" ,python-flexmock))) + ;; FIXME: Tests are not distributed with PyPI, and the repository + ;; does not contain setup.py. How to test? + (arguments '(#:tests? #f)) (propagated-inputs `(("python-backpack" ,python-backpack) ("python-blinker" ,python-blinker) @@ -2427,6 +2516,7 @@ Memory-Mapped Database} (LMDB), a high-performance key-value store.") ("python-pendulum" ,python-pendulum) ("python-pyaml" ,python-pyaml) ("python-pygments" ,python-pygments) + ("python-pyyaml" ,python-pyyaml) ("python-simplejson" ,python-simplejson) ("python-six" ,python-six) ("python-wrapt" ,python-wrapt))) @@ -2530,13 +2620,13 @@ Database API 2.0T.") (define-public python-sqlalchemy (package (name "python-sqlalchemy") - (version "1.3.3") + (version "1.3.18") (source (origin (method url-fetch) (uri (pypi-uri "SQLAlchemy" version)) (sha256 - (base32 "06c3lcv7nijsgqsjaaa4djrwlzgh9f910zlqxkmgq22h6jl4rici")))) + (base32 "1rwc6ss1cnz3kxx0p9p6xw0w79r8qw03lcc29k31yb3rcigvfbys")))) (build-system python-build-system) (native-inputs `(("python-cython" ,python-cython) ; for C extensions @@ -2613,15 +2703,21 @@ You might also want to install the following optional dependencies: (define-public python-alembic (package (name "python-alembic") - (version "1.0.11") + (version "1.4.1") (source (origin (method url-fetch) (uri (pypi-uri "alembic" version)) + (patches (search-patches "python-alembic-exceptions-cause.patch")) (sha256 (base32 - "1k5hag0vahd5vrf9abx8fdj2whrwaw2iq2yp736mmxnbsn5xkdyd")))) + "0a4hzn76csgbf1px4f5vfm256byvjrqkgi9869nkcjrwjn35c6kr")))) (build-system python-build-system) + (arguments + '(#:phases (modify-phases %standard-phases + (replace 'check + (lambda _ + (invoke "pytest" "-vv")))))) (native-inputs `(("python-mock" ,python-mock) ("python-pytest-cov" ,python-pytest-cov))) @@ -2681,7 +2777,7 @@ PickleShare.") (define-public python-apsw (package (name "python-apsw") - (version "3.28.0-r1") + (version "3.31.1-r1") (source (origin (method url-fetch) @@ -2689,7 +2785,7 @@ PickleShare.") "/download/" version "/apsw-" version ".zip")) (sha256 (base32 - "0x62534l5hcgwrc4k2gxpdzc1sxlhm6m4nwlay74rnmr77qh8wly")))) + "1gap5lr6c7bp134nzvfwr693i6d0fqyaysg3ms2cayjldv616yfx")))) (build-system python-build-system) (native-inputs `(("unzip" ,unzip))) @@ -2723,6 +2819,29 @@ translate the complete SQLite API into Python.") (define-public python2-apsw (package-with-python2 python-apsw)) +(define-public python-aiosqlite + (package + (name "python-aiosqlite") + (version "0.12.0") + (source + (origin + (method url-fetch) + (uri (pypi-uri "aiosqlite" version)) + (sha256 + (base32 + "1w8248yz85xyzvvh4jaxnc59fqil45aka6h82kn1rcih4rjxbnn1")))) + (build-system python-build-system) + (native-inputs + `(("python-aiounittest" ,python-aiounittest))) + (home-page "https://github.com/jreese/aiosqlite") + (synopsis + "Asyncio bridge for sqlite3") + (description + "The package aiosqlite replicates the standard sqlite3 module, but with +async versions of all the standard connection and cursor methods, and context +managers for automatically closing connections.") + (license license:expat))) + (define-public python2-neo4j-driver (package (name "python2-neo4j-driver") @@ -2768,13 +2887,13 @@ designed to be easy and intuitive to use.") (define-public python-psycopg2 (package (name "python-psycopg2") - (version "2.7.7") + (version "2.8.4") (source (origin (method url-fetch) (uri (pypi-uri "psycopg2" version)) (sha256 - (base32 "0zjbabb4qjx9dm07imhf8y5a9rpa06d5zah80myiimgdi83nslpl")))) + (base32 "1djvh98pi4hjd8rxbq8qzc63bg8v78k33yg6pl99wak61b6fb67q")))) (build-system python-build-system) (arguments ;; Tests would require a postgresql database "psycopg2_test" @@ -2881,18 +3000,20 @@ parsing code in hiredis. It primarily speeds up parsing of multi bulk replies." (define-public python-fakeredis (package (name "python-fakeredis") - (version "0.8.2") + (version "1.2.1") (source (origin (method url-fetch) (uri (pypi-uri "fakeredis" version)) (sha256 (base32 - "0zncahj3byyasyfx9i7k991ph0n0lq8v3a21pqri5qxn9564bk9r")))) + "1s12mn4q4hz7402139khn9fx56kibj7nn0d6w81hn0zs07b90wpc")))) (build-system python-build-system) (arguments ;; no tests `(#:tests? #f)) + (propagated-inputs + `(("python-sortedcontainers" ,python-sortedcontainers))) (home-page "https://github.com/jamesls/fakeredis") (synopsis "Fake implementation of redis API for testing purposes") (description @@ -3029,6 +3150,29 @@ transforms idiomatic python function calls to well-formed SQL queries.") (define-public python2-sql (package-with-python2 python-sql)) +(define-public python-pypika + (package + (name "python-pypika") + (version "0.37.2") + (source + (origin (method git-fetch) + (uri (git-reference + (url "https://github.com/kayak/pypika") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "089z1c778q1fwhzsc88ws8j5gm2hgxknibabn4wpax8rz2bfs3ck")))) + (build-system python-build-system) + (native-inputs + `(("python-parameterized" ,python-parameterized))) + (home-page "https://github.com/kayak/pypika") + (synopsis "SQL query builder API for Python") + (description + "PyPika is a python SQL query builder that exposes the full richness of +the SQL language using a syntax that reflects the resulting query.") + (license license:asl2.0))) + (define-public mongo-tools (package (name "mongo-tools") @@ -3144,20 +3288,22 @@ Monitor read/write activity on a mongo server @end table") (license license:asl2.0))) +;; There are many wrappers for this in other languages. When touching, please +;; be sure to ensure all dependencies continue to build. (define-public apache-arrow (package (name "apache-arrow") - (version "0.10.0") + (version "0.17.1") (source - (origin - (method git-fetch) - (uri (git-reference - (url "https://github.com/apache/arrow") - (commit (string-append "apache-arrow-" version)))) - (file-name (git-file-name name version)) - (sha256 - (base32 - "04xkp922b8qrrnpvv9ixxnvk7151n1plzx6aqdff6frn9651zvxs")))) + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/apache/arrow") + (commit (string-append "apache-arrow-" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "02r6yx3yhywzikd3b0vfkjgddhfiriyx2vpm3jf5880wq59x798a")))) (build-system cmake-build-system) (arguments `(#:tests? #f @@ -3170,91 +3316,135 @@ Monitor read/write activity on a mongo server (setenv "BOOST_ROOT" (assoc-ref %build-inputs "boost")) (setenv "BROTLI_HOME" (assoc-ref %build-inputs "brotli")) (setenv "FLATBUFFERS_HOME" (assoc-ref %build-inputs "flatbuffers")) - (setenv "JEMALLOC_HOME" (assoc-ref %build-inputs "jemalloc")) (setenv "RAPIDJSON_HOME" (assoc-ref %build-inputs "rapidjson")) #t))) #:build-type "Release" #:configure-flags (list "-DARROW_PYTHON=ON" - - ;; Install to PREFIX/lib (the default is - ;; PREFIX/lib64). - (string-append "-DCMAKE_INSTALL_LIBDIR=" - (assoc-ref %outputs "out") + "-DARROW_GLOG=ON" + ;; Parquet options + "-DARROW_PARQUET=ON" + "-DPARQUET_BUILD_EXECUTABLES=ON" + ;; The maintainers disallow using system versions of + ;; jemalloc: + ;; https://issues.apache.org/jira/browse/ARROW-3507. This + ;; is unfortunate because jemalloc increases performance: + ;; https://arrow.apache.org/blog/2018/07/20/jemalloc/. + "-DARROW_JEMALLOC=OFF" + + ;; The CMake option ARROW_DEPENDENCY_SOURCE is a global + ;; option that instructs the build system how to resolve + ;; each dependency. SYSTEM = Finding the dependency in + ;; system paths using CMake's built-in find_package + ;; function, or using pkg-config for packages that do not + ;; have this feature + "-DARROW_DEPENDENCY_SOURCE=SYSTEM" + + ;; Split output into its component packages. + (string-append "-DCMAKE_INSTALL_PREFIX=" + (assoc-ref %outputs "lib")) + (string-append "-DCMAKE_INSTALL_RPATH=" + (assoc-ref %outputs "lib") "/lib") - - ;; XXX These Guix package offer static - ;; libraries that are not position independent, - ;; and ld fails to link them into the arrow .so - "-DARROW_WITH_SNAPPY=OFF" - "-DARROW_WITH_ZLIB=OFF" - "-DARROW_WITH_ZSTD=OFF" - "-DARROW_WITH_LZ4=OFF" + (string-append "-DCMAKE_INSTALL_BINDIR=" + (assoc-ref %outputs "out") + "/bin") + (string-append "-DCMAKE_INSTALL_INCLUDEDIR=" + (assoc-ref %outputs "include") + "/share/include") + + + "-DARROW_WITH_SNAPPY=ON" + "-DARROW_WITH_ZLIB=ON" + "-DARROW_WITH_ZSTD=ON" + "-DARROW_WITH_LZ4=ON" + "-DARROW_COMPUTE=ON" + "-DARROW_CSV=ON" + "-DARROW_DATASET=ON" + "-DARROW_FILESYSTEM=ON" + "-DARROW_HDFS=ON" + "-DARROW_JSON=ON" + ;; Arrow Python C++ integration library (required for + ;; building pyarrow). This library must be built against + ;; the same Python version for which you are building + ;; pyarrow. NumPy must also be installed. Enabling this + ;; option also enables ARROW_COMPUTE, ARROW_CSV, + ;; ARROW_DATASET, ARROW_FILESYSTEM, ARROW_HDFS, and + ;; ARROW_JSON. + "-DARROW_PYTHON=ON" ;; Building the tests forces on all the ;; optional features and the use of static ;; libraries. "-DARROW_BUILD_TESTS=OFF" + "-DBENCHMARK_ENABLE_GTEST_TESTS=OFF" + ;;"-DBENCHMARK_ENABLE_TESTING=OFF" "-DARROW_BUILD_STATIC=OFF"))) (inputs `(("boost" ,boost) - ("rapidjson" ,rapidjson) ("brotli" ,google-brotli) - ("flatbuffers" ,flatbuffers) - ("jemalloc" ,jemalloc) + ("double-conversion" ,double-conversion) + ("snappy" ,snappy) + ("gflags" ,gflags) + ("glog" ,glog) + ("apache-thrift" ,apache-thrift "lib") + ("protobuf" ,protobuf) + ("rapidjson" ,rapidjson) + ("zlib" ,zlib) + ("bzip2" ,bzip2) + ("lz4" ,lz4) + ("zstd" ,zstd "lib") + ("re2" ,re2) + ("grpc" ,grpc) ("python-3" ,python) ("python-numpy" ,python-numpy))) + (native-inputs + `(("pkg-config" ,pkg-config))) + (outputs '("out" "lib" "include")) (home-page "https://arrow.apache.org/") (synopsis "Columnar in-memory analytics") (description "Apache Arrow is a columnar in-memory analytics layer -designed to accelerate big data. It houses a set of canonical in-memory +designed to accelerate big data. It houses a set of canonical in-memory representations of flat and hierarchical data along with multiple -language-bindings for structure manipulation. It also provides IPC and common +language-bindings for structure manipulation. It also provides IPC and common algorithm implementations.") (license license:asl2.0))) (define-public python-pyarrow (package + (inherit apache-arrow) (name "python-pyarrow") - (version "0.10.0") - (source - (origin - (method git-fetch) - (uri (git-reference - (url "https://github.com/apache/arrow") - (commit (string-append "apache-arrow-" version)))) - (file-name (git-file-name name version)) - (sha256 - (base32 - "04xkp922b8qrrnpvv9ixxnvk7151n1plzx6aqdff6frn9651zvxs")))) (build-system python-build-system) (arguments - '(#:tests? #f ; XXX There are no tests in the "python" directory + '(#:tests? #f ; XXX There are no tests in the "python" directory #:phases (modify-phases %standard-phases (delete 'build) ; XXX the build is performed again during the install phase (add-after 'unpack 'enter-source-directory (lambda _ (chdir "python") #t)) - (add-after 'unpack 'set-env + (add-after 'unpack 'make-git-checkout-writable (lambda _ - (setenv "ARROW_HOME" (assoc-ref %build-inputs "apache-arrow")) + (for-each make-file-writable (find-files ".")) #t))))) (propagated-inputs - `(("apache-arrow" ,apache-arrow) + `(("apache-arrow" ,apache-arrow "lib") ("python-numpy" ,python-numpy) ("python-pandas" ,python-pandas) ("python-six" ,python-six))) (native-inputs `(("cmake" ,cmake-minimal) + ("pkg-config" ,pkg-config) ("python-cython" ,python-cython) ("python-pytest" ,python-pytest) ("python-pytest-runner" ,python-pytest-runner) ("python-setuptools-scm" ,python-setuptools-scm))) + (outputs '("out")) (home-page "https://arrow.apache.org/docs/python/") (synopsis "Python bindings for Apache Arrow") - (description "This library provides a Pythonic API wrapper for the reference -Arrow C++ implementation, along with tools for interoperability with pandas, -NumPy, and other traditional Python scientific computing packages.") + (description + "This library provides a Pythonic API wrapper for the reference Arrow C++ +implementation, along with tools for interoperability with pandas, NumPy, and +other traditional Python scientific computing packages.") (license license:asl2.0))) (define-public python2-pyarrow @@ -3393,7 +3583,8 @@ The drivers officially supported by @code{libdbi} are: ("sqlite" ,sqlite) ("odbc" ,unixodbc) ("boost" ,boost) - ("mysql" ,mysql))) + ("mariadb:dev" ,mariadb "dev") + ("mariadb:lib" ,mariadb "lib"))) (arguments `(#:tests? #f ; Tests may require running database management systems. #:phases @@ -3401,7 +3592,8 @@ The drivers officially supported by @code{libdbi} are: (add-after 'unpack 'fix-lib-path (lambda _ (substitute* "CMakeLists.txt" - (("set\\(SOCI_LIBDIR \"lib64\"\\)") ""))))))) + (("set\\(SOCI_LIBDIR \"lib64\"\\)") "")) + #t))))) (synopsis "C++ Database Access Library") (description "SOCI is an abstraction layer for several database backends, including