[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#53019] [PATCH 6/6] gnu: Add python-aerich.
From: |
Giacomo Leidi |
Subject: |
[bug#53019] [PATCH 6/6] gnu: Add python-aerich. |
Date: |
Fri, 1 Jul 2022 23:33:02 +0200 |
* gnu/packages/databases.scm (python-aerich): New variable.
---
gnu/packages/databases.scm | 63 +++++++++++++++++++++++++++++++++++++-
1 file changed, 62 insertions(+), 1 deletion(-)
diff --git a/gnu/packages/databases.scm b/gnu/packages/databases.scm
index 9e9b584f7a..b125e87245 100644
--- a/gnu/packages/databases.scm
+++ b/gnu/packages/databases.scm
@@ -56,7 +56,7 @@
;;; Copyright © 2021 jgart <jgart@dismail.de>
;;; Copyright © 2021 Foo Chuan Wei <chuanwei.foo@hotmail.com>
;;; Copyright © 2022 Zhu Zihao <all_but_last@163.com>
-;;; Copyright © 2021 Brice Waegeneire <brice@waegenei.re>
+;;; Copyright © 2022 Giacomo Leidi <goodoldpaul@autistici.org>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -121,6 +121,7 @@ (define-module (gnu packages databases)
#:use-module (gnu packages ncurses)
#:use-module (gnu packages networking)
#:use-module (gnu packages onc-rpc)
+ #:use-module (gnu packages openstack)
#:use-module (gnu packages pantheon)
#:use-module (gnu packages parallel)
#:use-module (gnu packages pcre)
@@ -3002,6 +3003,66 @@ (define-public python-tortoise-orm
with relational data.")
(license license:asl2.0)))
+(define-public aerich
+ (package
+ (name "aerich")
+ (version "0.6.3")
+ (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
+ "1ndkl8vvn6bxh19s26k3p5mlk1sk4ziw73c07av08va6cfp5ln0j"))))
+ (build-system python-build-system)
+ (arguments
+ '(#:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'generate-setup.py
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ ;; FIXME: 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.36.1