unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Christopher Baines <mail@cbaines.net>
To: 58775@debbugs.gnu.org
Subject: [bug#58775] [PATCH] WIP build python-gpg from gpgme
Date: Tue, 25 Oct 2022 13:14:39 +0100	[thread overview]
Message-ID: <20221025121439.18746-1-mail@cbaines.net> (raw)

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)
-- 
2.37.3





             reply	other threads:[~2022-10-25 12:17 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-25 12:14 Christopher Baines [this message]
2022-11-26 13:08 ` [bug#58775] [PATCH] WIP build python-gpg from gpgme zimoun

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20221025121439.18746-1-mail@cbaines.net \
    --to=mail@cbaines.net \
    --cc=58775@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).