aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEfraim Flashner <efraim@flashner.co.il>2024-09-12 09:14:11 +0300
committerEfraim Flashner <efraim@flashner.co.il>2024-09-12 11:26:05 +0300
commitb555d987b9b89a694bd1f412a5d40d3b73b144ba (patch)
tree71a86547af435b92a5d69d078da128f966905733
parent73158a5f6299a07a1581f0f33c5e86be660f6270 (diff)
downloadguix-b555d987b9b89a694bd1f412a5d40d3b73b144ba.tar
guix-b555d987b9b89a694bd1f412a5d40d3b73b144ba.tar.gz
gnu: python-pygpgme: Update to 0.4.
* gnu/packages/gnupg.scm (python-pygpgme): Update to 0.4. [source]: Remove patches. [build-system]: Switch to the pyproject build system. [arguments]: Remove custom phases. [native-inputs]: Remove gnupg-1. Add gnupg. [home-page]: Update home-page. * gnu/packages/patches/pygpgme-disable-problematic-tests.patch, gnu/packages/patches/python-pygpgme-fix-pinentry-tests.patch: Remove files. * gnu/local.mk (dist_patch_DATA): Remove patches. Change-Id: I0986e0f87a1b824bce5cc24f34467132d14296e4
-rw-r--r--gnu/local.mk2
-rw-r--r--gnu/packages/gnupg.scm25
-rw-r--r--gnu/packages/patches/pygpgme-disable-problematic-tests.patch37
-rw-r--r--gnu/packages/patches/python-pygpgme-fix-pinentry-tests.patch69
4 files changed, 7 insertions, 126 deletions
diff --git a/gnu/local.mk b/gnu/local.mk
index ed630041ff..e244219a3c 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1979,7 +1979,6 @@ dist_patch_DATA = \
%D%/packages/patches/pulseview-glib-2.68.patch \
%D%/packages/patches/pybugz-encode-error.patch \
%D%/packages/patches/pybugz-stty.patch \
- %D%/packages/patches/pygpgme-disable-problematic-tests.patch \
%D%/packages/patches/pyqt-configure.patch \
%D%/packages/patches/pytest-fix-unstrable-exception-test.patch \
%D%/packages/patches/python-2-deterministic-build-info.patch \
@@ -2024,7 +2023,6 @@ dist_patch_DATA = \
%D%/packages/patches/python-paste-remove-timing-test.patch \
%D%/packages/patches/python-pyan3-fix-absolute-path-bug.patch \
%D%/packages/patches/python-pyan3-fix-positional-arguments.patch \
- %D%/packages/patches/python-pygpgme-fix-pinentry-tests.patch \
%D%/packages/patches/python-pysmt-fix-pow-return-type.patch \
%D%/packages/patches/python-pysmt-fix-smtlib-serialization-test.patch \
%D%/packages/patches/python-pytorch-fix-codegen.patch \
diff --git a/gnu/packages/gnupg.scm b/gnu/packages/gnupg.scm
index 092476ea54..2e97c2244a 100644
--- a/gnu/packages/gnupg.scm
+++ b/gnu/packages/gnupg.scm
@@ -4,7 +4,7 @@
;;; Copyright © 2014, 2018 Eric Bavier <bavier@member.fsf.org>
;;; Copyright © 2014, 2015, 2016, 2020 Mark H Weaver <mhw@netris.org>
;;; Copyright © 2015 Paul van der Walt <paul@denknerd.org>
-;;; Copyright © 2015, 2016, 2017, 2018, 2019, 2020, 2021 Efraim Flashner <efraim@flashner.co.il>
+;;; Copyright © 2015-2021, 2024 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2015, 2016, 2017, 2019 Ricardo Wurmus <rekado@elephly.net>
;;; Copyright © 2016 Christine Lemmer-Webber <cwebber@dustycloud.org>
;;; Copyright © 2016, 2017 Nikita <nikita@n0.is>
@@ -87,6 +87,7 @@
#:use-module (guix build-system gnu)
#:use-module (guix build-system perl)
#:use-module (guix build-system python)
+ #:use-module (guix build-system pyproject)
#:use-module (ice-9 match)
#:use-module (guix build-system meson)
#:use-module (srfi srfi-1))
@@ -634,32 +635,20 @@ distributed separately.")
(define-public python-pygpgme
(package
(name "python-pygpgme")
- (version "0.3")
+ (version "0.4")
(source
(origin
(method url-fetch)
(uri (pypi-uri "pygpgme" version))
(sha256
(base32
- "1q82p3gs6lwq8j8dxk4pvrwk3jpww1zqcjrzznl9clh10z28gn2z"))
- ;; Unfortunately, we have to disable some tests due to some gpg-agent
- ;; goofiness... see:
- ;; https://bugs.launchpad.net/pygpgme/+bug/999949
- (patches (search-patches "pygpgme-disable-problematic-tests.patch"
- "python-pygpgme-fix-pinentry-tests.patch"))))
- (arguments
- `(#:phases
- (modify-phases %standard-phases
- (add-before 'build 'make-build
- (lambda _ (invoke "make" "build")))
- (replace 'check
- (lambda _ (invoke "make" "check"))))))
- (build-system python-build-system)
+ "1px1c5nqsls3fxg0zkyd9sgc5rxpdagvsadnp8fd5bmgrrjka5ws"))))
+ (build-system pyproject-build-system)
(native-inputs
- (list gnupg-1))
+ (list gnupg))
(inputs
(list gpgme))
- (home-page "https://launchpad.net/pygpgme")
+ (home-page "https://github.com/jhenstridge/pygpgme")
(synopsis "Python module for working with OpenPGP messages")
(description
"PyGPGME is a Python module that lets you sign, verify, encrypt and
diff --git a/gnu/packages/patches/pygpgme-disable-problematic-tests.patch b/gnu/packages/patches/pygpgme-disable-problematic-tests.patch
deleted file mode 100644
index 2129d2f973..0000000000
--- a/gnu/packages/patches/pygpgme-disable-problematic-tests.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-These tests require a gpg agent to run, and are difficult to get to work right
-in Guix's environment. For more details, see:
- https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=713074
- https://bugs.launchpad.net/pygpgme/+bug/999949
-
---- pygpgme-0.3/tests/test_encrypt_decrypt.py 2012-02-28 19:10:28.000000000 -0800
-+++ pygpgme-0.3/tests/test_encrypt_decrypt.py 2016-02-05 10:21:58.966685384 -0800
-@@ -125,7 +125,7 @@
- ctx.decrypt(ciphertext, plaintext)
- self.assertEqual(plaintext.getvalue(), b'Hello World\n')
-
-- def test_encrypt_symmetric(self):
-+ def skip_test_encrypt_symmetric(self):
- plaintext = BytesIO(b'Hello World\n')
- ciphertext = BytesIO()
- def passphrase(uid_hint, passphrase_info, prev_was_bad, fd):
-
---- pygpgme-0.3/tests/test_passphrase.py 2012-02-28 19:04:17.000000000 -0800
-+++ pygpgme-0.3/tests/test_passphrase.py 2016-02-05 10:21:47.990630956 -0800
-@@ -30,7 +30,7 @@
-
- import_keys = ['passphrase.pub', 'passphrase.sec']
-
-- def test_sign_without_passphrase_cb(self):
-+ def skip_test_sign_without_passphrase_cb(self):
- ctx = gpgme.Context()
- key = ctx.get_key('EFB052B4230BBBC51914BCBB54DCBBC8DBFB9EB3')
- ctx.signers = [key]
-@@ -51,7 +51,7 @@
- self.prev_was_bad = prev_was_bad
- os.write(fd, b'test\n')
-
-- def test_sign_with_passphrase_cb(self):
-+ def skip_test_sign_with_passphrase_cb(self):
- ctx = gpgme.Context()
- key = ctx.get_key('EFB052B4230BBBC51914BCBB54DCBBC8DBFB9EB3')
- ctx.signers = [key]
diff --git a/gnu/packages/patches/python-pygpgme-fix-pinentry-tests.patch b/gnu/packages/patches/python-pygpgme-fix-pinentry-tests.patch
deleted file mode 100644
index 1f7a4cadb7..0000000000
--- a/gnu/packages/patches/python-pygpgme-fix-pinentry-tests.patch
+++ /dev/null
@@ -1,69 +0,0 @@
-Fix test failure of test_XXX caused by upgrade of gpgme from 1.6.0 to
-1.8.0:
-
-======================================================================
-FAIL: test_encrypt_to_signonly (tests.test_encrypt_decrypt.EncryptDecryptTestCase)
-----------------------------------------------------------------------
-Traceback (most recent call last):
- File "/tmp/guix-build-python2-pygpgme-0.3.drv-0/pygpgme-0.3/tests/test_encrypt_decrypt.py", line 185, in test_encrypt_to_signonly
- self.assertEqual(exc.args[0], gpgme.ERR_SOURCE_UNKNOWN)
-AssertionError: 7 != 0
-
-----------------------------------------------------------------------
-
-Patch copied from the Debian package pygpgme-0.3-1.2:
-
-https://sources.debian.net/src/pygpgme/0.3-1.2/debian/patches/0005-Fix-test-failures-with-pinentry.patch/
-
-From: "Dr. Tobias Quathamer" <toddy@debian.org>
-Date: Thu, 24 Nov 2016 12:20:54 +0100
-Subject: Fix test failures with pinentry
-
----
- tests/test_encrypt_decrypt.py | 5 +++--
- tests/test_passphrase.py | 2 ++
- 2 files changed, 5 insertions(+), 2 deletions(-)
-
-diff --git a/tests/test_encrypt_decrypt.py b/tests/test_encrypt_decrypt.py
-index 21ae83e..05707e1 100644
---- a/tests/test_encrypt_decrypt.py
-+++ b/tests/test_encrypt_decrypt.py
-@@ -132,6 +132,7 @@ class EncryptDecryptTestCase(GpgHomeTestCase):
- os.write(fd, b'Symmetric passphrase\n')
- ctx = gpgme.Context()
- ctx.armor = True
-+ ctx.pinentry_mode = gpgme.PINENTRY_MODE_LOOPBACK
- ctx.passphrase_cb = passphrase
- ctx.encrypt(None, 0, plaintext, ciphertext)
- self.assertTrue(
-@@ -182,8 +183,8 @@ class EncryptDecryptTestCase(GpgHomeTestCase):
- ctx.encrypt([recipient], gpgme.ENCRYPT_ALWAYS_TRUST,
- plaintext, ciphertext)
- except gpgme.GpgmeError as exc:
-- self.assertEqual(exc.args[0], gpgme.ERR_SOURCE_UNKNOWN)
-- self.assertEqual(exc.args[1], gpgme.ERR_GENERAL)
-+ self.assertEqual(exc.args[0], gpgme.ERR_SOURCE_GPGME)
-+ self.assertEqual(exc.args[1], gpgme.ERR_UNUSABLE_PUBKEY)
- else:
- self.fail('gpgme.GpgmeError not raised')
-
-diff --git a/tests/test_passphrase.py b/tests/test_passphrase.py
-index 35b3c59..05e6811 100644
---- a/tests/test_passphrase.py
-+++ b/tests/test_passphrase.py
-@@ -34,6 +34,7 @@ class PassphraseTestCase(GpgHomeTestCase):
- ctx = gpgme.Context()
- key = ctx.get_key('EFB052B4230BBBC51914BCBB54DCBBC8DBFB9EB3')
- ctx.signers = [key]
-+ ctx.pinentry_mode = gpgme.PINENTRY_MODE_LOOPBACK
- plaintext = BytesIO(b'Hello World\n')
- signature = BytesIO()
-
-@@ -55,6 +56,7 @@ class PassphraseTestCase(GpgHomeTestCase):
- ctx = gpgme.Context()
- key = ctx.get_key('EFB052B4230BBBC51914BCBB54DCBBC8DBFB9EB3')
- ctx.signers = [key]
-+ ctx.pinentry_mode = gpgme.PINENTRY_MODE_LOOPBACK
- ctx.passphrase_cb = self.passphrase_cb
- plaintext = BytesIO(b'Hello World\n')
- signature = BytesIO()