guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

07/09: gnu: Add python-gnupg.


From: Ricardo Wurmus
Subject: 07/09: gnu: Add python-gnupg.
Date: Fri, 25 Sep 2015 19:45:10 +0000

rekado pushed a commit to branch master
in repository guix.

commit 22af90291f4028d154f99dbddf268a47a3f2ea08
Author: Ricardo Wurmus <address@hidden>
Date:   Wed Sep 23 21:27:28 2015 +0200

    gnu: Add python-gnupg.
    
    * gnu/packages/gnupg.scm (python-gnupg, python2-gnupg): New variables.
---
 gnu/packages/gnupg.scm |   43 +++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 43 insertions(+), 0 deletions(-)

diff --git a/gnu/packages/gnupg.scm b/gnu/packages/gnupg.scm
index 5882617..3bd87dc 100644
--- a/gnu/packages/gnupg.scm
+++ b/gnu/packages/gnupg.scm
@@ -325,6 +325,49 @@ instead.  This way bug fixes or improvements can be done 
at a central place
 and every application benefits from this.")
     (license license:lgpl2.1+)))
 
+(define-public python-gnupg
+  (package
+    (name "python-gnupg")
+    (version "0.3.7")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "https://pypi.python.org/packages/source/p/";
+                           "python-gnupg/python-gnupg-" version ".tar.gz"))
+       (sha256
+        (base32
+         "1hg9gshk4b7raskj8mjadsjcv10axlx2z4xl4ag2f2bpi4f8chvq"))))
+    (build-system python-build-system)
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (replace 'check
+                  (lambda* (#:key inputs #:allow-other-keys)
+                    (substitute* "test_gnupg.py"
+                      ;; Test keyrings are missing, so this test fails.
+                      (("'test_scan_keys'") "True")
+                      (("def test_scan_keys") "def disabled__scan_keys")
+                      ;; Unsure why this test fails.
+                      (("'test_search_keys'") "True")
+                      (("def test_search_keys") "def disabled__search_keys"))
+                    (setenv "GPGBINARY" "gpg")
+                    (setenv "USERNAME" "guixbuilder")
+                    ;; The doctests are extremely slow and sometimes time out,
+                    ;; so we disable them.
+                    (zero? (system* "python"
+                                    "test_gnupg.py" "--no-doctests")))))))
+    (native-inputs
+     `(("gnupg" ,gnupg-1)))
+    (home-page "http://packages.python.org/python-gnupg/index.html";)
+    (synopsis "Wrapper for the GNU Privacy Guard")
+    (description
+      "This module allows easy access to GnuPG’s key management, encryption
+and signature functionality from Python programs.")
+    (license license:bsd-3)))
+
+(define-public python2-gnupg
+  (package-with-python2 python-gnupg))
+
 (define-public pius
   (package
    (name "pius")



reply via email to

[Prev in Thread] Current Thread [Next in Thread]