From patchwork Sun Feb 6 15:35:56 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Pierre-Henry_Fr=C3=B6hring?= X-Patchwork-Id: 37025 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 04E6927BBEA; Sun, 6 Feb 2022 15:39:45 +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=-2.9 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI, 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 C04DF27BBE9 for ; Sun, 6 Feb 2022 15:39:44 +0000 (GMT) Received: from localhost ([::1]:39818 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nGjdf-0002K6-Vc for patchwork@mira.cbaines.net; Sun, 06 Feb 2022 10:39:43 -0500 Received: from eggs.gnu.org ([209.51.188.92]:43288) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nGjdC-0002JG-AD for guix-patches@gnu.org; Sun, 06 Feb 2022 10:39:14 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:45696) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nGjd0-0006en-0N for guix-patches@gnu.org; Sun, 06 Feb 2022 10:39:13 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nGjcz-0003Ab-Sz for guix-patches@gnu.org; Sun, 06 Feb 2022 10:39:01 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#53821] [PATCH] Add the python-psycopg2-binary package. References: <20220206143813.1701863-1-contact@phfrohring.com> In-Reply-To: <20220206143813.1701863-1-contact@phfrohring.com> Resent-From: Pierre-Henry =?utf-8?b?RnLDtmhyaW5n?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 06 Feb 2022 15:39:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 53821 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 53821@debbugs.gnu.org Cc: Pierre-Henry =?utf-8?b?RnLDtmhyaW5n?= Received: via spool by 53821-submit@debbugs.gnu.org id=B53821.164416189312118 (code B ref 53821); Sun, 06 Feb 2022 15:39:01 +0000 Received: (at 53821) by debbugs.gnu.org; 6 Feb 2022 15:38:13 +0000 Received: from localhost ([127.0.0.1]:39593 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nGjcC-00039O-O6 for submit@debbugs.gnu.org; Sun, 06 Feb 2022 10:38:12 -0500 Received: from relay6-d.mail.gandi.net ([217.70.183.198]:42327) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nGjcA-000397-9s for 53821@debbugs.gnu.org; Sun, 06 Feb 2022 10:38:11 -0500 Received: (Authenticated sender: contact@phfrohring.com) by mail.gandi.net (Postfix) with ESMTPSA id 8CB5EC0002; Sun, 6 Feb 2022 15:38:03 +0000 (UTC) From: Pierre-Henry =?utf-8?b?RnLDtmhyaW5n?= Date: Sun, 6 Feb 2022 16:35:56 +0100 Message-Id: <20220206153552.1758371-1-contact@phfrohring.com> X-Mailer: git-send-email 2.34.0 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" X-getmail-retrieved-from-mailbox: Patches `(#:tests? #f)' because tests require a live PostegreSQL instance. Maxime's suggestions are taken into account in this patch: - `(#:tests? #f)' is commented in the code - superlatives in the description have been removed --- gnu/packages/python-xyz.scm | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) 2.34.0 diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm index 7c1b5e8ed3..7b2df04fd2 100644 --- a/gnu/packages/python-xyz.scm +++ b/gnu/packages/python-xyz.scm @@ -28931,4 +28931,39 @@ (define-public python-types-dataclasses "This packages provides a collection of library stubs for Python, with static types.") (license license:asl2.0))) + +(define-public python-psycopg2-binary + (package + (name "python-psycopg2-binary") + (version "2.9.3") + (source (origin + (method url-fetch) + (uri (pypi-uri "psycopg2-binary" version)) + (sha256 + (base32 + "0kpaxg3lg5wg5ww5kxmzi2z2d7arsx13ci915d8a2pf17lqza7bn")))) + (build-system python-build-system) + (native-inputs (list postgresql)) + (arguments + ;; Tests are disable because they need a live instance of PostgreSQL. + '(#:tests? #f)) + (home-page "https://psycopg.org/") + (synopsis "Python-PostgreSQL Database Adapter") + (description + "Psycopg is a PostgreSQL database adapter for the Python programming +language. Its main features are the complete implementation of the Python DB +API 2.0 specification and the thread safety (several threads can share the +same connection). It was designed for heavily multi-threaded applications +that create and destroy lots of cursors and make a large number of concurrent +“INSERT”s or “UPDATE”s. + +Psycopg 2 is mostly implemented in C as a libpq wrapper, resulting in +being both efficient and secure. It features client-side and +server-side cursors, asynchronous communication and notifications, +“COPY TO/COPY FROM” support. Many Python types are supported +out-of-the-box and adapted to matching PostgreSQL data types; +adaptation can be extended and customized thanks to a flexible objects +adaptation system. + +Psycopg 2 is both Unicode and Python 3 friendly.") + (license license:lgpl3+))) --