GNU bug report logs - #53019
[PATCHES] Add aerich

Previous Next

Package: guix-patches;

Reported by: Giacomo Leidi <goodoldpaul <at> autistici.org>

Date: Wed, 5 Jan 2022 01:19:01 UTC

Severity: normal

Tags: patch

Done: Christopher Baines <mail <at> cbaines.net>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Giacomo Leidi <goodoldpaul <at> autistici.org>
To: 53019 <at> debbugs.gnu.org
Cc: Giacomo Leidi <goodoldpaul <at> autistici.org>, lars <at> 6xq.net
Subject: [bug#53019] [PATCHv2 4/4] gnu: Add python-aerich.
Date: Wed,  4 Jan 2023 17:08:55 +0100
* gnu/packages/databases.scm (python-aerich): New variable.
---
 gnu/packages/databases.scm | 61 ++++++++++++++++++++++++++++++++++++++
 1 file changed, 61 insertions(+)

diff --git a/gnu/packages/databases.scm b/gnu/packages/databases.scm
index 2a24ba580d..18b0c809f4 100644
--- a/gnu/packages/databases.scm
+++ b/gnu/packages/databases.scm
@@ -59,6 +59,7 @@
 ;;; Copyright © 2022 muradm <mail <at> muradm.net>
 ;;; Copyright © 2022 Thomas Albers Raviola <thomas <at> thomaslabs.org>
 ;;; Copyright © 2021, 2022 jgart <jgart <at> dismail.de>
+;;; Copyright © 2022 Giacomo Leidi <goodoldpaul <at> autistici.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -3057,6 +3058,66 @@ (define-public python-tortoise-orm
 with relational data.")
     (license license:asl2.0)))
 
+(define-public aerich
+  (package
+    (name "aerich")
+    (version "0.7.1")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/tortoise/aerich")
+             (commit (string-append "v" version))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32
+         "0zk99c979xn5ym7v1g3v1y4h3cj7kdc7v1hf9f5h011mfs12s3df"))))
+    (build-system python-build-system)
+    (arguments
+     '(#:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'generate-setup.py
+           (lambda* (#:key inputs outputs #:allow-other-keys)
+             ;; This is an hack needed to get poetry's setup.py.
+             (setenv "POETRY_VIRTUALENVS_CREATE" "false")
+             (invoke "poetry" "build" "-f" "sdist")
+             (invoke "bash" "-c"
+                     (string-append "tar --wildcards "
+                                    "-xvf dist/*-`poetry version -s`.tar.gz "
+                                    "-O '*/setup.py' > setup.py"))))
+         (replace 'check
+           (lambda* (#:key tests? outputs #:allow-other-keys)
+             (when tests?
+               (let ((out (assoc-ref outputs "out")))
+                 (invoke "pytest" "-vv"))))))))
+    (native-inputs
+     (list
+      poetry
+      python-bandit
+      python-cryptography
+      python-isort
+      python-pydantic
+      python-pytest
+      python-pytest-asyncio
+      python-pytest-mock
+      python-pytest-xdist))
+    (propagated-inputs
+      (list python-asyncmy
+            python-asyncpg
+            python-click
+            python-ddlparse
+            python-dictdiffer
+            python-tomlkit
+            python-tortoise-orm))
+    (home-page "https://github.com/tortoise/aerich")
+    (synopsis "Database migrations tool for Tortoise ORM (Object Relational
+Mapper)")
+    (description
+      "This package provides @code{aerich}, a Python database migrations tool
+for Tortoise ORM (Object Relational Mapper).  It can be used both
+programmatically or as a standalone CLI application.")
+    (license license:asl2.0)))
+
 (define-public sqlcipher
   (package
     (name "sqlcipher")
-- 
2.38.1





This bug report was last modified 1 year and 206 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.