[PATCH] Add python-tortoise-orm

DoneSubmitted by Lars-Dominik Braun.
Details
2 participants
  • Lars-Dominik Braun
  • Leo Famulari
Owner
unassigned
Severity
normal
L
L
Lars-Dominik Braun wrote on 30 Mar 08:43 +0200
(address . guix-patches@gnu.org)
20200330064334.GB3329@zpidnp36
Hi,
this patchset adds python-tortoise-orm and dependencies.
Cheers,Lars
From 909bbc3a8bfc4ba83bd1df5803de8ad567916783 Mon Sep 17 00:00:00 2001From: Lars-Dominik Braun <ldb@leibniz-psychology.org>Date: Mon, 30 Mar 2020 08:28:15 +0200Subject: [PATCH 1/5] gnu: Add python-aiounittest
* gnu/packages/check.scm (python-aiounittest): New variable--- gnu/packages/check.scm | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+)
Toggle diff (32 lines)diff --git a/gnu/packages/check.scm b/gnu/packages/check.scmindex 1b60b99ce1..e951c76737 100644--- a/gnu/packages/check.scm+++ b/gnu/packages/check.scm@@ -2509,3 +2509,25 @@ system. The code under test requires no modification to work with pyfakefs.") (define-public python2-pyfakefs (package-with-python2 python-pyfakefs))++(define-public python-aiounittest+ (package+ (name "python-aiounittest")+ (version "1.3.1")+ (source+ (origin+ (method url-fetch)+ (uri (pypi-uri "aiounittest" version))+ (sha256+ (base32+ "1q4bhmi80smaa1lknvdna0sx3915naczlfna1fp435nf6cjyrjl1"))))+ (build-system python-build-system)+ (native-inputs+ `(("python-coverage" ,python-coverage)+ ("python-nose" ,python-nose)))+ (home-page+ "https://github.com/kwarunek/aiounittest")+ (synopsis "Test asyncio code more easily")+ (description "The aiounittest is a helper library to ease of your pain (and+boilerplate), when writing a test of the asynchronous code (asyncio).")+ (license license:expat)))-- 2.20.1
From dc6c1301afbd581c6f2107146f254cf5ba2f11e6 Mon Sep 17 00:00:00 2001From: Lars-Dominik Braun <ldb@leibniz-psychology.org>Date: Mon, 30 Mar 2020 08:32:30 +0200Subject: [PATCH 2/5] gnu: Add python-aiosqlite
* gnu/packages/databases.scm (python-aiosqlite): New variable.--- gnu/packages/databases.scm | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+)
Toggle diff (36 lines)diff --git a/gnu/packages/databases.scm b/gnu/packages/databases.scmindex 9e60074dad..25c4fbc5bb 100644--- a/gnu/packages/databases.scm+++ b/gnu/packages/databases.scm@@ -2716,6 +2716,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.11.0")+ (source+ (origin+ (method url-fetch)+ (uri (pypi-uri "aiosqlite" version))+ (sha256+ (base32+ "1f3zdldp9zgrw6qz5fsp3wa5zw73cjf139pj4vf24ryv895320jg"))))+ (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")-- 2.20.1
From ce37a0c106217449df95a3130381f833e77c79c6 Mon Sep 17 00:00:00 2001From: Lars-Dominik Braun <ldb@leibniz-psychology.org>Date: Mon, 30 Mar 2020 08:37:04 +0200Subject: [PATCH 3/5] gnu: Add python-pypika
Not to be confused with python-pika, which is a different package.
* gnu/packages/databases.scm (python-pypika): New variable.--- gnu/packages/databases.scm | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+)
Toggle diff (34 lines)diff --git a/gnu/packages/databases.scm b/gnu/packages/databases.scmindex 25c4fbc5bb..669b8f9bc6 100644--- a/gnu/packages/databases.scm+++ b/gnu/packages/databases.scm@@ -3047,6 +3047,27 @@ 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.36.0")+ (source+ (origin+ (method url-fetch)+ (uri (pypi-uri "PyPika" version))+ (sha256+ (base32+ "0qzn5vygirg52dlizm6ayzdc5llq8p2krrx0kymr236lrz89wqp8"))))+ (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")-- 2.20.1
From a779601922b55eb4d054924fe005cd9d0cf84508 Mon Sep 17 00:00:00 2001From: Lars-Dominik Braun <ldb@leibniz-psychology.org>Date: Mon, 30 Mar 2020 08:39:29 +0200Subject: [PATCH 4/5] gnu: Add python-ciso8601
* gnu/packages/time.scm (python-ciso8601): New variable.--- gnu/packages/time.scm | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+)
Toggle diff (39 lines)diff --git a/gnu/packages/time.scm b/gnu/packages/time.scmindex f4dc8a2ffd..e0ef71d89a 100644--- a/gnu/packages/time.scm+++ b/gnu/packages/time.scm@@ -235,6 +235,32 @@ datetime module, available in Python 2.3+.") (define-public python2-parsedatetime (package-with-python2 python-parsedatetime)) +(define-public python-ciso8601+ (package+ (name "python-ciso8601")+ (version "2.1.3")+ (source+ (origin+ (method git-fetch)+ ;; Pypi package lacks file tests.py+ (uri (git-reference+ (url "https://github.com/closeio/ciso8601.git")+ (commit (string-append "v" version))))+ (file-name (git-file-name name version))+ (sha256+ (base32+ "0g1aiyc1ayh0rnibyy416m5mmck38ksgdm3jsy0z3rxgmgb24951"))))+ (build-system python-build-system)+ (native-inputs+ `(("python-pytz" ,python-pytz)))+ (home-page "https://github.com/closeio/ciso8601")+ (synopsis+ "Fast ISO8601 date time parser")+ (description+ "The package ciso8601 converts ISO 8601 or RFC 3339 date time strings into+Python datetime objects.")+ (license expat)))+ (define-public python-tzlocal (package (name "python-tzlocal")-- 2.20.1
From 5ecd1b998615956436cd3b0b37c80f7bb149e88a Mon Sep 17 00:00:00 2001From: Lars-Dominik Braun <ldb@leibniz-psychology.org>Date: Mon, 30 Mar 2020 08:41:12 +0200Subject: [PATCH 5/5] gnu: Add python-tortoise-orm
* gnu/packages/databases.scm (python-tortoise-orm): New variable.--- gnu/packages/databases.scm | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+)
Toggle diff (48 lines)diff --git a/gnu/packages/databases.scm b/gnu/packages/databases.scmindex 669b8f9bc6..a3b78932a3 100644--- a/gnu/packages/databases.scm+++ b/gnu/packages/databases.scm@@ -2205,6 +2205,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.3")+ (source+ (origin+ (method url-fetch)+ (uri (pypi-uri "tortoise-orm" version))+ (sha256+ (base32+ "01hbvfyxs2qd1mjc96aipwsdxxhydw8ww686r4gsf87bl6f98dvz"))))+ (build-system python-build-system)+ ;; Disable tests for now. They pull in a lot of dependencies.+ (arguments `(#:tests? #f))+ (native-inputs+ `(("python-ciso8601" ,python-ciso8601)+ ("python-asynctest" ,python-asynctest)+ ("python-nose2" ,python-nose2)))+ (propagated-inputs+ `(("python-aiosqlite" ,python-aiosqlite)+ ("python-pypika" ,python-pypika)+ ("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 it’s+design that you are working not with just tables, you work with relational+data.")+ (license license:asl2.0)))+ (define-public sqlcipher (package (name "sqlcipher")-- 2.20.1
-----BEGIN PGP SIGNATURE-----
iQGzBAABCgAdFiEEyk+M9DfXR4/aBV/UQhN3ARo3hEYFAl6BlRIACgkQQhN3ARo3hEbuUAv/c75fay642NpJeCaK1nq4G0kTUiTLQkFAi+dJOi/mU9F5MgAT2D64irZTEco4R/0r5x2NlzzGzDmUuqtT4TYW+b8UICYMEUnyrHW+UjYyrsuewgLg4ud43qIQSYvXT8X++2uOFPX0l2UAVMymjPabuRGv0brarWvNV1Sze/my0aZUGbrNFO7cUKD4tIqylB2jtzvbpHYIETVPntRv9T8GPjEDEgdJITWAOcFbtiN509j+iMPZhV+B82POxGb73mKbEzMy1qwLk1ovFdE87ykCbnWB+wtiHe0gRxN9Bo/Cz6NgEe3aagngZAcYVLebXgEH1ejvS8SVwl+zkKEKdGDPbYNisRnlrPZ/mb4b/c1+1AaWkZGv3WfafNTUenqaKvtUQ7rndWtvghhF/L/23xhiEeTL9U/RUjKSXRHi7EsBixdKLEVdkpySQZm5BhYcU2kWS1RRrHUgHEFVNd5nUrDTwhObjFC1wqXV1skOWueblnyqbJGFvZccxbVT7lwkHfWU=VRkP-----END PGP SIGNATURE-----

L
L
Leo Famulari wrote on 30 Mar 20:52 +0200
(name . Lars-Dominik Braun)(address . ldb@leibniz-psychology.org)(address . 40321-done@debbugs.gnu.org)
20200330185253.GA9276@jasmine.lan
On Mon, Mar 30, 2020 at 08:43:34AM +0200, Lars-Dominik Braun wrote:
Toggle quote (2 lines)> this patchset adds python-tortoise-orm and dependencies.
Thanks! Pushed as 1110a421f4c9ede6ee814e678135a1dd2ac05fc9 with somechanges...
I added copyright lines for you and edited some of the descriptions tofix typos and grammatical mistakes.
Toggle quote (19 lines)> +(define-public python-ciso8601> + (package> + (name "python-ciso8601")> + (version "2.1.3")> + (source> + (origin> + (method git-fetch)> + ;; Pypi package lacks file tests.py> + (uri (git-reference> + (url "https://github.com/closeio/ciso8601.git")> + (commit (string-append "v" version))))> + (file-name (git-file-name name version))> + (sha256> + (base32> + "0g1aiyc1ayh0rnibyy416m5mmck38ksgdm3jsy0z3rxgmgb24951"))))> + (build-system python-build-system)> + (native-inputs> + `(("python-pytz" ,python-pytz)))
According to README.rst, this should only be required with Python 2, butthe tests fail without it. Can we amend the package to just fetch fromPyPi and remove this dependency?
Closed
L
L
Lars-Dominik Braun wrote on 31 Mar 08:04 +0200
(name . Leo Famulari)(address . leo@famulari.name)(address . 40321-done@debbugs.gnu.org)
20200331060402.GA3052@zpidnp36
Hi,
Toggle quote (2 lines)> Thanks! Pushed as 1110a421f4c9ede6ee814e678135a1dd2ac05fc9 with some> changes...
thank you.
Toggle quote (1 lines)> Can we amend the package to just fetch from PyPi and remove this dependency?
You mean amend tests_require in setup.py?
Lars
-----BEGIN PGP SIGNATURE-----
iQGzBAABCgAdFiEEyk+M9DfXR4/aBV/UQhN3ARo3hEYFAl6C3UsACgkQQhN3ARo3hEYD6gv/ePHWSWscJv7keQ/v5uCL549Y2qauGXQegHfIZ6fivcGSicBbwxPFERcmVHou4hgRSM/klpmlc9BrbyhpcawXE1N1X5c6rHaMXB/yCUocoPF1OgUAjhc9uli0SYP6Y6NZV5dypKGyZ4x/NyymQzV2sq+CPuk4f0NjEs9m0nFK3HT4aV6kw3ysRwQaBZjpBiPUz5RzhOeDe+Ht34nA57zLlw7f3Gd47SFtWc1GhgREsDYnXL6s5MdfPImIJ2hnobmU9crSHv52Bk6ttg+JDHL9Sjs9frb4Udj3jJ65TG4Tv8hTyBHTYWIhbSS0stYg9RccDrALcfOBSt++J8jnBzm/2TjDtnAPsDRPY9OfJsUxfH2BIlmXC6CkN9ZFtmtvgGYfpVEOvlKf7zezsfcMYrZtNGJR6wvFLunlzAmA6C12hCMIe+3jGq5Y2S4w/SM4TYKzYKA7S1+LX7mgWR0noAzGfygeOa2O23Tv3rOBKmoZpKETt7TcbiMzI7EUqYJnpfeg=lj9J-----END PGP SIGNATURE-----

Closed
L
L
Leo Famulari wrote on 31 Mar 16:27 +0200
(name . Lars-Dominik Braun)(address . ldb@leibniz-psychology.org)(address . 40321-done@debbugs.gnu.org)
20200331142716.GA2134@jasmine.lan
On Tue, Mar 31, 2020 at 08:04:02AM +0200, Lars-Dominik Braun wrote:
Toggle quote (3 lines)> > Can we amend the package to just fetch from PyPi and remove this dependency?> You mean amend tests_require in setup.py?
Not sure... I noticed your comment said that the PyPi source did notinclude the tests. If we built from that source, would the package stillbuild, or would the test phase fail somehow?
-----BEGIN PGP SIGNATURE-----
iQIzBAABCAAdFiEEsFFZSPHn08G5gDigJkb6MLrKfwgFAl6DU0AACgkQJkb6MLrKfwis9w/+OZKsNnlhllwMHzuzK5RWZBdssjsidK9bKjUsYtNfvwS1P29wwEsfYTWfZB+UOfE5XNLmhLW7DTP8S4Y6Wq80wSPDkxHadvMGEFDNLojw1UtcATNcin0jRV4neuGvwztQhXoS6fEb+sOXrKY9KJIIhTDBiDrduHEOdfvoNbHB2oGhPh4ADXMTsdfx2Ajt7JLGxp48Y5ZrxhfC+YIVpkvTrhRyn9O2Zs8i0G75PbBvVOZK7HMo4KgzrjdDumEHKhIbjk9ITFMzqz4CX4z59YMK86fwf/kCLTdVB+PdFlcx1oXVb0dVp6Clp6/An0miG3CRB+V6T5wBl361ZiwAkfGGSSmij8DFFvHOAV83qc9Naf+25XPVqxR4Cd46Rqufr1a4P+gWYpUxcax5yBJduY9GGJSKgvb1bP8mJhoxtEUEPd+sbRUeceMQpaxjdaGw0RZuXaTqxsiMPLqMSMswqMbwrdf8nEfS86fB6QAbAaI8jyYJPncSDzs994zt9uSxlkXCk1Qw2VSS+V8XyfhxSQ7xuBolfXSJIn/w/urA0iEcVJuCOu5NeEwCo0PtxjxwxdBlLPCVC5Pd8nHkfEhieNW3gEMLloYpZ0BNe05NsOy+1wSepO6dX2g1sn/lwqTyrhwwcWUSySiE6zeL+hK0WgE6o8BY5IDjJiXGwsbt/0amjoc==CF7m-----END PGP SIGNATURE-----

Closed
L
L
Lars-Dominik Braun wrote on 1 Apr 08:09 +0200
(name . Leo Famulari)(address . leo@famulari.name)(address . 40321-done@debbugs.gnu.org)
20200401060939.GA3075@zpidnp36
Hi,
Toggle quote (1 lines)> > You mean amend tests_require in setup.py?
(that does not work by the way, because the tests really *do* require pytz)
Toggle quote (3 lines)> Not sure... I noticed your comment said that the PyPi source did not> include the tests. If we built from that source, would the package still> build, or would the test phase fail somehow?
Yep, the test phase fails.
---snip---======================================================================ERROR: tests (unittest.loader._FailedTest)----------------------------------------------------------------------ImportError: Failed to import test module: testsTraceback (most recent call last): File "/gnu/store/78w7y0lxar70j512iqw8x3nimzj10yga-python-3.7.4/lib/python3.7/unittest/loader.py", line 154, in loadTestsFromName module = __import__(module_name)ModuleNotFoundError: No module named 'tests'---snap---
I guess we could pass `#:tests? #f`, but is that worth it? pytz is just anative input and not propagated.
Lars
-----BEGIN PGP SIGNATURE-----
iQGzBAABCgAdFiEEyk+M9DfXR4/aBV/UQhN3ARo3hEYFAl6EMB0ACgkQQhN3ARo3hEYttQv/fYUk/VJV3qOUlj7+D/NIVPhLM0EtIQH3qglLu5zLsN1GZFuCdsFbRAwrmUMNWA694W+C8FcE1OiE/p4cp2vsRIWKQmf5KSyPKu+8wA+Wy2eAl8NHU1mCahOdzEy/6XLG6EKUvRWAWu/wAQ9ALzOcNHS8fdVd5o6E2ADmG2up+yxyg5n2s8qAlVeJqS+AGwhrNEy2Tuy/hNGYK3qygtDYRrfpgFxipx+JiAn/BJmZgfVUhvhlLiMBxluYVVkBHs6L9IHm6a7p0o3Xf23QwntAWh2YgtEOBrZR1NPLU+Lvhqd37Vaw2XMETP9TkFZ8yDmzHpfV6gwycHdymygih2MXWQYIpWvbQoNg4rz+1sftV9Dw2sLVQ/gHJkEusU/ho/B5jD6GrZFevfHV1+3kmMPpbnBjoS/JUaD/iiWBH8OEIqILSBBjBMfF3h+C8MZFrfwBWQi6/SZoKQC5PthgeP9SvNU5HGKWgFm6ah2cAKeDm6ynSaeOaXLj3rk0dAh0jPm+=s7L4-----END PGP SIGNATURE-----

Closed
L
L
Leo Famulari wrote on 1 Apr 18:09 +0200
(name . Lars-Dominik Braun)(address . ldb@leibniz-psychology.org)(address . 40321-done@debbugs.gnu.org)
20200401160911.GA27817@jasmine.lan
On Wed, Apr 01, 2020 at 08:09:39AM +0200, Lars-Dominik Braun wrote:
Toggle quote (3 lines)> I guess we could pass `#:tests? #f`, but is that worth it? pytz is just a> native input and not propagated.
Okay!
Closed
?