Message ID | 20200330064334.GB3329@zpidnp36 |
---|---|
State | Accepted |
Headers | show |
Series | [bug#40321] Add python-tortoise-orm | expand |
Context | Check | Description |
---|---|---|
cbaines/comparison | success | View comparision |
cbaines/git branch | success | View Git branch |
cbaines/applying patch | fail | View Laminar job |
On Mon, Mar 30, 2020 at 08:43:34AM +0200, Lars-Dominik Braun wrote: > this patchset adds python-tortoise-orm and dependencies. Thanks! Pushed as 1110a421f4c9ede6ee814e678135a1dd2ac05fc9 with some changes... I added copyright lines for you and edited some of the descriptions to fix typos and grammatical mistakes. > +(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, but the tests fail without it. Can we amend the package to just fetch from PyPi and remove this dependency?
Hi, > Thanks! Pushed as 1110a421f4c9ede6ee814e678135a1dd2ac05fc9 with some > changes... thank you. > Can we amend the package to just fetch from PyPi and remove this dependency? You mean amend tests_require in setup.py? Lars
On Tue, Mar 31, 2020 at 08:04:02AM +0200, Lars-Dominik Braun wrote: > > 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 not include the tests. If we built from that source, would the package still build, or would the test phase fail somehow?
Hi, > > You mean amend tests_require in setup.py? (that does not work by the way, because the tests really *do* require pytz) > 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: tests Traceback (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 a native input and not propagated. Lars
On Wed, Apr 01, 2020 at 08:09:39AM +0200, Lars-Dominik Braun wrote: > I guess we could pass `#:tests? #f`, but is that worth it? pytz is just a > native input and not propagated. Okay!
From 5ecd1b998615956436cd3b0b37c80f7bb149e88a Mon Sep 17 00:00:00 2001 From: Lars-Dominik Braun <ldb@leibniz-psychology.org> Date: Mon, 30 Mar 2020 08:41:12 +0200 Subject: [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(+) diff --git a/gnu/packages/databases.scm b/gnu/packages/databases.scm index 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