summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'dev-python/pygpgme/pygpgme-0.3.ebuild')
-rw-r--r--dev-python/pygpgme/pygpgme-0.3.ebuild51
1 files changed, 51 insertions, 0 deletions
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 ???