From patchwork Tue Oct 25 12:14:39 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christopher Baines X-Patchwork-Id: 44105 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 7467827BBEB; Tue, 25 Oct 2022 13:17:05 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-3.9 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,URIBL_BLOCKED autolearn=ham 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 8207827BBEA for ; Tue, 25 Oct 2022 13:17:04 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1onIpm-0006Sg-5B; Tue, 25 Oct 2022 08:15:06 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1onIpj-0005ug-NT for guix-patches@gnu.org; Tue, 25 Oct 2022 08:15:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1onIpj-0005Dk-3o for guix-patches@gnu.org; Tue, 25 Oct 2022 08:15:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1onIpi-0005OD-Ee for guix-patches@gnu.org; Tue, 25 Oct 2022 08:15:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#58775] [PATCH] WIP build python-gpg from gpgme Resent-From: Christopher Baines Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 25 Oct 2022 12:15:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 58775 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 58775@debbugs.gnu.org X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.166670009020678 (code B ref -1); Tue, 25 Oct 2022 12:15:02 +0000 Received: (at submit) by debbugs.gnu.org; 25 Oct 2022 12:14:50 +0000 Received: from localhost ([127.0.0.1]:50629 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1onIpV-0005NR-OL for submit@debbugs.gnu.org; Tue, 25 Oct 2022 08:14:49 -0400 Received: from lists.gnu.org ([209.51.188.17]:41992) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1onIpT-0005NJ-2P for submit@debbugs.gnu.org; Tue, 25 Oct 2022 08:14:47 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1onIpS-00045z-Dg for guix-patches@gnu.org; Tue, 25 Oct 2022 08:14:46 -0400 Received: from mira.cbaines.net ([2a01:7e00:e000:2f8:fd4d:b5c7:13fb:3d27]) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1onIpQ-0005Bv-KR for guix-patches@gnu.org; Tue, 25 Oct 2022 08:14:46 -0400 Received: from localhost (unknown [IPv6:2a02:8010:68c1:0:fc93:27fb:8412:c8b7]) by mira.cbaines.net (Postfix) with ESMTPSA id D2ED127BBE9 for ; Tue, 25 Oct 2022 13:14:39 +0100 (BST) Received: from localhost (localhost [local]) by localhost (OpenSMTPD) with ESMTPA id 571d5d0c for ; Tue, 25 Oct 2022 12:14:39 +0000 (UTC) From: Christopher Baines Date: Tue, 25 Oct 2022 13:14:39 +0100 Message-Id: <20221025121439.18746-1-mail@cbaines.net> X-Mailer: git-send-email 2.37.3 MIME-Version: 1.0 Received-SPF: pass client-ip=2a01:7e00:e000:2f8:fd4d:b5c7:13fb:3d27; envelope-from=mail@cbaines.net; helo=mira.cbaines.net X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, UNPARSEABLE_RELAY=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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: , Sender: "Guix-patches" Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches The python-gpg package using PyPI source code seems out of date, and doesn't build on 32bit systems like i686-linux and armhf-linux. Maybe we should use the source from gpgme? --- gnu/packages/gnupg.scm | 48 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) diff --git a/gnu/packages/gnupg.scm b/gnu/packages/gnupg.scm index ce9ef48796..3a8be9a544 100644 --- a/gnu/packages/gnupg.scm +++ b/gnu/packages/gnupg.scm @@ -431,6 +431,54 @@ (define-public gpgme (properties '((ftp-server . "ftp.gnupg.org") (ftp-directory . "/gcrypt/gpgme"))))) +(define-public python-gpg-latest + (package + (inherit gpgme) + (name "python-gpg") + (arguments + (list + #:modules + '((guix build gnu-build-system) + (guix build utils) + (ice-9 ftw) + (ice-9 match)) #:configure-flags #~(list "--enable-languages=python") + #:make-flags #~(list (string-append "LDFLAGS=-Wl,-rpath=" #$gpgme "/lib")) + #:phases + #~(modify-phases %standard-phases + (add-after 'install 'remove-all-but-python + (lambda _ + (for-each + (lambda (name) + (delete-file-recursively + (string-append #$output "/" name))) + (scandir #$output + (match-lambda + ("." #f) + (".." #f) + ("lib" #f) + (_ #t)))) + (for-each + (lambda (name) + (delete-file-recursively + (string-append #$output "/lib/" name))) + (scandir (string-append #$output "/lib") + (match-lambda + ("." #f) + (".." #f) + (name (not (string-prefix? "python" name))))))))))) + (inputs + (modify-inputs (package-inputs gpgme) + (append gpgme))) + (native-inputs + (modify-inputs (package-native-inputs gpgme) + (append swig) + (append python))) + (home-page (package-home-page gpgme)) + (synopsis "Python bindings for GPGME GnuPG cryptography library") + (description "This package provides Python bindings to the GPGME GnuPG +cryptographic library.") + (license license:lgpl2.1+))) + (define-public qgpgme (package (inherit gpgme)