diff options
author | 2012-05-27 15:14:40 +0200 | |
---|---|---|
committer | 2012-05-27 15:14:40 +0200 | |
commit | 2ae420d405edc4aa3eaf997a9d0f3b0a4efb55ac (patch) | |
tree | 406711622bfc0cc766aab5d78bbedc2604aa33f3 | |
parent | gcc-4.7 fix for mail-client/thunderbird-12.0.1 (#410557) (diff) | |
download | xarthisius-2ae420d405edc4aa3eaf997a9d0f3b0a4efb55ac.tar.gz xarthisius-2ae420d405edc4aa3eaf997a9d0f3b0a4efb55ac.tar.bz2 xarthisius-2ae420d405edc4aa3eaf997a9d0f3b0a4efb55ac.zip |
[dev-python/pygpgme] initial import, work in progress
-rw-r--r-- | dev-python/pygpgme/Manifest | 4 | ||||
-rw-r--r-- | dev-python/pygpgme/files/pygpgme-0.3-interactive_tests.patch | 28 | ||||
-rw-r--r-- | dev-python/pygpgme/metadata.xml | 5 | ||||
-rw-r--r-- | dev-python/pygpgme/pygpgme-0.3.ebuild | 51 |
4 files changed, 88 insertions, 0 deletions
diff --git a/dev-python/pygpgme/Manifest b/dev-python/pygpgme/Manifest new file mode 100644 index 0000000..02c09f0 --- /dev/null +++ b/dev-python/pygpgme/Manifest @@ -0,0 +1,4 @@ +AUX pygpgme-0.3-interactive_tests.patch 974 RMD160 0c47db046c7b015e3bf59c8c515ab283a0f6fec1 SHA1 9a265864de28b0328df00d67552992c964775b6e SHA256 b12b675c107ced38227dd69dac5f9513b4bcd849cb22863926d6cb35559d1e72 +DIST pygpgme-0.3.tar.gz 50100 RMD160 7d15991622ee7adf643d9d658c5da718c6b1bfd0 SHA1 f8df35bd2705ac2e1642209fba732e6a42d03fd4 SHA256 5fd887c407015296a8fd3f4b867fe0fcca3179de97ccde90449853a3dfb802e1 +EBUILD pygpgme-0.3.ebuild 1263 RMD160 f2e61c81cc007551577c4447e669735dbf6e7a4d SHA1 2ab4e8b8cb5f26c57d4d8256ae595ead9034bec4 SHA256 c25f052a31f9ec9e6c0dbd6d8ea194f803580cefc5ba41819a502198d7fc965b +MISC metadata.xml 160 RMD160 e730f96ab97c5be577a6d6d05f04990374a0dffb SHA1 2aa5e6be9c265c0e7bceb78ee9fd20df5f818e36 SHA256 6cd954a9de2307c57d32b25fa3599dee2908a4ddc6a98594f593d53577307a3a diff --git a/dev-python/pygpgme/files/pygpgme-0.3-interactive_tests.patch b/dev-python/pygpgme/files/pygpgme-0.3-interactive_tests.patch new file mode 100644 index 0000000..664fdd5 --- /dev/null +++ b/dev-python/pygpgme/files/pygpgme-0.3-interactive_tests.patch @@ -0,0 +1,28 @@ +--- a/tests/test_encrypt_decrypt.py ++++ b/tests/test_encrypt_decrypt.py +@@ -125,6 +125,7 @@ + ctx.decrypt(ciphertext, plaintext) + self.assertEqual(plaintext.getvalue(), b'Hello World\n') + ++ @unittest.skip("skip interactive") + def test_encrypt_symmetric(self): + plaintext = BytesIO(b'Hello World\n') + ciphertext = BytesIO() +--- a/tests/test_passphrase.py ++++ b/tests/test_passphrase.py +@@ -30,6 +30,7 @@ + + import_keys = ['passphrase.pub', 'passphrase.sec'] + ++ @unittest.skip("skip interactive") + def test_sign_without_passphrase_cb(self): + ctx = gpgme.Context() + key = ctx.get_key('EFB052B4230BBBC51914BCBB54DCBBC8DBFB9EB3') +@@ -51,6 +52,7 @@ + self.prev_was_bad = prev_was_bad + os.write(fd, b'test\n') + ++ @unittest.skip("skip interactive") + def test_sign_with_passphrase_cb(self): + ctx = gpgme.Context() + key = ctx.get_key('EFB052B4230BBBC51914BCBB54DCBBC8DBFB9EB3') diff --git a/dev-python/pygpgme/metadata.xml b/dev-python/pygpgme/metadata.xml new file mode 100644 index 0000000..301d220 --- /dev/null +++ b/dev-python/pygpgme/metadata.xml @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <herd>python</herd> +</pkgmetadata> diff --git a/dev-python/pygpgme/pygpgme-0.3.ebuild b/dev-python/pygpgme/pygpgme-0.3.ebuild new file mode 100644 index 0000000..95d914e --- /dev/null +++ b/dev-python/pygpgme/pygpgme-0.3.ebuild @@ -0,0 +1,51 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +EAPI=3 + +SUPPORT_PYTHON_ABIS="1" +RESTRICT_PYTHON_ABIS="2.5 2.7-pypy-*" + +inherit distutils eutils + +DESCRIPTION="Python wrapper for the GPGME library" +HOMEPAGE="https://launchpad.net/pygpgme http://pypi.python.org/pypi/pygpgme" +SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz" + +LICENSE="LGPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="examples" + +DEPEND="app-crypt/gpgme" +RDEPEND="${DEPEND}" + +PYTHON_CFLAGS=("2.* + -fno-strict-aliasing") + +src_prepare() { + local gpgme_cflags=$(gpgme-config --cflags) + sed -e "s:libraries=:include_dirs=['${gpgme_cflags/\-I}'], &:" \ + -i setup.py || die + epatch "${FILESDIR}"/${P}-interactive_tests.patch + distutils_src_prepare +} + +src_test() { + testing() { + PYTHONPATH="$(ls -d build-${PYTHON_ABI}/lib.*)" "$(PYTHON)" test_all.py + } + python_execute_function testing +} + +src_install() { + distutils_src_install + if use examples; then + insinto /usr/share/doc/${PF}/examples + doins examples/encrypt.py + fi +} +#TODO +# * test fails to import gpgme despite correct PYTHONPATH, that doesn't happen +# when SUPPORT_PYTHON_ABIS is unset +# * installs /usr/lib64/python3.2/site-packages/gpgme/_gpgme.cpython-32.so ??? |