From patchwork Mon Mar 14 22:36:15 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Giacomo Leidi X-Patchwork-Id: 37808 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 52B9627BBEA; Mon, 14 Mar 2022 22:40:31 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-3.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL, SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 0DD6627BBE9 for ; Mon, 14 Mar 2022 22:40:31 +0000 (GMT) Received: from localhost ([::1]:41912 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nTtMc-0008IK-74 for patchwork@mira.cbaines.net; Mon, 14 Mar 2022 18:40:30 -0400 Received: from eggs.gnu.org ([209.51.188.92]:39538) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nTtMF-0007hQ-HS for guix-patches@gnu.org; Mon, 14 Mar 2022 18:40:09 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:52905) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nTtME-0001gL-7R for guix-patches@gnu.org; Mon, 14 Mar 2022 18:40:06 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nTtME-0004UI-56 for guix-patches@gnu.org; Mon, 14 Mar 2022 18:40:06 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#53019] [PATCH 9/9] gnu: Add python-aerich. Resent-From: Giacomo Leidi Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 14 Mar 2022 22:40:06 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 53019 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 53019@debbugs.gnu.org Cc: Giacomo Leidi Received: via spool by 53019-submit@debbugs.gnu.org id=B53019.164729758217154 (code B ref 53019); Mon, 14 Mar 2022 22:40:06 +0000 Received: (at 53019) by debbugs.gnu.org; 14 Mar 2022 22:39:42 +0000 Received: from localhost ([127.0.0.1]:46794 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nTtLq-0004SU-3B for submit@debbugs.gnu.org; Mon, 14 Mar 2022 18:39:42 -0400 Received: from confino.investici.org ([212.103.72.250]:53035) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nTtLa-0004Qf-BM for 53019@debbugs.gnu.org; Mon, 14 Mar 2022 18:39:26 -0400 Received: from mx1.investici.org (unknown [127.0.0.1]) by confino.investici.org (Postfix) with ESMTP id 4KHWgF22jpz10x6; Mon, 14 Mar 2022 22:39:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=autistici.org; s=stigmate; t=1647297561; bh=fODR2Vxz2U/SwbKhyIL/jH879nd19UWjUZHydJCeB90=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=O83CDOd3vfq/4avGcdSFF+SnUA/5JUIWajZqwBwnX1vEQN5ZxL5hYpNvVYPJplYg+ HVYzFwkwXP1nN/HvZvtbhzvEsdnQTxFBSGqNmPCoHsnhKn+W7N0gfZxMkr958FZMIM GZk535LriJ2iY9635tEYX1kgsIpvH6Jpp1x5n7ys= Received: from [212.103.72.250] (mx1.investici.org [212.103.72.250]) (Authenticated sender: goodoldpaul@autistici.org) by localhost (Postfix) with ESMTPSA id 4KHWgF1TQLz10vj; Mon, 14 Mar 2022 22:39:21 +0000 (UTC) Date: Mon, 14 Mar 2022 23:36:15 +0100 Message-Id: <20220314223614.17668-9-goodoldpaul@autistici.org> X-Mailer: git-send-email 2.34.0 In-Reply-To: <20220314223614.17668-1-goodoldpaul@autistici.org> References: <20220314223614.17668-1-goodoldpaul@autistici.org> MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" Reply-to: Giacomo Leidi X-ACL-Warn: , Giacomo Leidi via Guix-patches X-Patchwork-Original-From: Giacomo Leidi via Guix-patches via From: Giacomo Leidi X-getmail-retrieved-from-mailbox: Patches * 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 e9467a3e79..b3e333bc21 100644 --- a/gnu/packages/databases.scm +++ b/gnu/packages/databases.scm @@ -56,6 +56,7 @@ ;;; Copyright © 2021 jgart ;;; Copyright © 2021 Foo Chuan Wei ;;; Copyright © 2022 Zhu Zihao +;;; Copyright © 2022 Giacomo Leidi ;;; ;;; This file is part of GNU Guix. ;;; @@ -118,6 +119,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) @@ -3015,6 +3017,65 @@ (define-public python-tortoise-orm with relational data.") (license license:asl2.0))) +(define-public aerich + (package + (name "aerich") + (version "0.6.2") + (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 + "1bhx37svdln1aramddnpc8572bf81639h6jiyqvskzjkc1lvv60r")))) + (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-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")