diff options
author | Michał Górny <mgorny@gentoo.org> | 2013-01-20 14:32:54 +0000 |
---|---|---|
committer | Michał Górny <mgorny@gentoo.org> | 2013-01-20 14:32:54 +0000 |
commit | 479fe609c35c3d07528c1c482af57202eb3cb62e (patch) | |
tree | ea0718aef66b90de949f808e224dc5676bef0322 /dev-python | |
parent | Mask dev-lang/ruby-enterprise and its use flag. (diff) | |
download | gentoo-2-479fe609c35c3d07528c1c482af57202eb3cb62e.tar.gz gentoo-2-479fe609c35c3d07528c1c482af57202eb3cb62e.tar.bz2 gentoo-2-479fe609c35c3d07528c1c482af57202eb3cb62e.zip |
Version bump. Fix running tests in parallel. Use fast random source to make tests finish in a reasonable time.
(Portage version: 2.2.0_alpha142/cvs/Linux x86_64, signed Manifest commit with key 42B9401D)
Diffstat (limited to 'dev-python')
-rw-r--r-- | dev-python/python-gnupg/ChangeLog | 9 | ||||
-rw-r--r-- | dev-python/python-gnupg/files/python-gnupg-0.3.2-fast-random.patch | 88 | ||||
-rw-r--r-- | dev-python/python-gnupg/python-gnupg-0.3.2.ebuild | 28 |
3 files changed, 124 insertions, 1 deletions
diff --git a/dev-python/python-gnupg/ChangeLog b/dev-python/python-gnupg/ChangeLog index d6940c93a543..1f6bed628cd5 100644 --- a/dev-python/python-gnupg/ChangeLog +++ b/dev-python/python-gnupg/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for dev-python/python-gnupg # Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/dev-python/python-gnupg/ChangeLog,v 1.3 2013/01/08 19:00:42 mgorny Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-python/python-gnupg/ChangeLog,v 1.4 2013/01/20 14:32:54 mgorny Exp $ + +*python-gnupg-0.3.2 (20 Jan 2013) + + 20 Jan 2013; Michał Górny <mgorny@gentoo.org> + +files/python-gnupg-0.3.2-fast-random.patch, +python-gnupg-0.3.2.ebuild: + Version bump. Fix running tests in parallel. Use fast random source to make + tests finish in a reasonable time. *python-gnupg-0.3.1-r1 (08 Jan 2013) diff --git a/dev-python/python-gnupg/files/python-gnupg-0.3.2-fast-random.patch b/dev-python/python-gnupg/files/python-gnupg-0.3.2-fast-random.patch new file mode 100644 index 000000000000..53ad5388963c --- /dev/null +++ b/dev-python/python-gnupg/files/python-gnupg-0.3.2-fast-random.patch @@ -0,0 +1,88 @@ +From 0dc9665f3aa31ff2f4dc0d7fe6838295fa27b2df Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org> +Date: Sun, 20 Jan 2013 14:58:30 +0100 +Subject: [PATCH] Use quick random source for tests (now with doctests). + +Pass --debug-quick-random to gpg in order to enable the fast random +source. Good random is not really useful for tests while it makes them +awfully slow. +--- + gnupg.py | 12 ++++++------ + test_gnupg.py | 3 ++- + 2 files changed, 8 insertions(+), 7 deletions(-) + +diff --git a/gnupg.py b/gnupg.py +index e279116..9366961 100644 +--- a/gnupg.py ++++ b/gnupg.py +@@ -694,7 +694,7 @@ class GPG(object): + def verify(self, data): + """Verify the signature on the contents of the string 'data' + +- >>> gpg = GPG(gnupghome="keys") ++ >>> gpg = GPG(gnupghome="keys", options=['--debug-quick-random']) + >>> input = gpg.gen_key_input(Passphrase='foo') + >>> key = gpg.gen_key(input) + >>> assert key +@@ -745,7 +745,7 @@ class GPG(object): + + >>> import shutil + >>> shutil.rmtree("keys") +- >>> gpg = GPG(gnupghome="keys") ++ >>> gpg = GPG(gnupghome="keys", options=['--debug-quick-random']) + >>> input = gpg.gen_key_input() + >>> result = gpg.gen_key(input) + >>> print1 = result.fingerprint +@@ -798,7 +798,7 @@ class GPG(object): + + >>> import shutil + >>> shutil.rmtree("keys") +- >>> gpg = GPG(gnupghome="keys") ++ >>> gpg = GPG(gnupghome="keys", options=['--debug-quick-random']) + >>> result = gpg.recv_keys('pgp.mit.edu', '3FF0DB166A7476EA') + >>> assert result + +@@ -848,7 +848,7 @@ class GPG(object): + + >>> import shutil + >>> shutil.rmtree("keys") +- >>> gpg = GPG(gnupghome="keys") ++ >>> gpg = GPG(gnupghome="keys", options=['--debug-quick-random']) + >>> input = gpg.gen_key_input() + >>> result = gpg.gen_key(input) + >>> print1 = result.fingerprint +@@ -894,7 +894,7 @@ class GPG(object): + """Generate a key; you might use gen_key_input() to create the + control input. + +- >>> gpg = GPG(gnupghome="keys") ++ >>> gpg = GPG(gnupghome="keys", options=['--debug-quick-random']) + >>> input = gpg.gen_key_input() + >>> result = gpg.gen_key(input) + >>> assert result +@@ -994,7 +994,7 @@ class GPG(object): + >>> import shutil + >>> if os.path.exists("keys"): + ... shutil.rmtree("keys") +- >>> gpg = GPG(gnupghome="keys") ++ >>> gpg = GPG(gnupghome="keys", options=['--debug-quick-random']) + >>> input = gpg.gen_key_input(passphrase='foo') + >>> result = gpg.gen_key(input) + >>> print1 = result.fingerprint +diff --git a/test_gnupg.py b/test_gnupg.py +index d5aed97..5258d97 100644 +--- a/test_gnupg.py ++++ b/test_gnupg.py +@@ -96,7 +96,8 @@ class GPGTestCase(unittest.TestCase): + "Not a directory: %s" % hd) + shutil.rmtree(hd) + self.homedir = hd +- self.gpg = gnupg.GPG(gnupghome=hd, gpgbinary='gpg') ++ self.gpg = gnupg.GPG(gnupghome=hd, gpgbinary='gpg', ++ options=['--debug-quick-random']) + + def test_environment(self): + "Test the environment by ensuring that setup worked" +-- +1.8.1.1 + diff --git a/dev-python/python-gnupg/python-gnupg-0.3.2.ebuild b/dev-python/python-gnupg/python-gnupg-0.3.2.ebuild new file mode 100644 index 000000000000..2fdfa98f465d --- /dev/null +++ b/dev-python/python-gnupg/python-gnupg-0.3.2.ebuild @@ -0,0 +1,28 @@ +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-python/python-gnupg/python-gnupg-0.3.2.ebuild,v 1.1 2013/01/20 14:32:54 mgorny Exp $ + +EAPI=5 +PYTHON_COMPAT=( python{2_5,2_6,2_7,3_1,3_2,3_3} pypy{1_9,2_0} ) + +inherit distutils-r1 + +DESCRIPTION="Python wrapper for GNU Privacy Guard" +HOMEPAGE="http://code.google.com/p/python-gnupg/" +SRC_URI="http://${PN}.googlecode.com/files/${P}.tar.gz" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="" + +RDEPEND="app-crypt/gnupg" + +PATCHES=( + "${FILESDIR}"/${P}-fast-random.patch +) + +python_test() { + cd "${BUILD_DIR}" || die + "${PYTHON}" "${S}"/test_gnupg.py || die "Tests fail with ${EPYTHON}" +} |