summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustin Lecher <jlec@gentoo.org>2015-10-21 16:52:04 +0200
committerJustin Lecher <jlec@gentoo.org>2015-10-21 17:17:39 +0200
commit1b5de4ed61f8be0d73874d466d70bf6485f4abdd (patch)
tree43cf7fd83794c98320c7a825191b0628dd4bf492 /dev-python/pyldap
parentdev-python/cffi: Version Bump (diff)
downloadgentoo-1b5de4ed61f8be0d73874d466d70bf6485f4abdd.tar.gz
gentoo-1b5de4ed61f8be0d73874d466d70bf6485f4abdd.tar.bz2
gentoo-1b5de4ed61f8be0d73874d466d70bf6485f4abdd.zip
dev-python/pyldap: Version Bump
Package-Manager: portage-2.2.23 Signed-off-by: Justin Lecher <jlec@gentoo.org>
Diffstat (limited to 'dev-python/pyldap')
-rw-r--r--dev-python/pyldap/Manifest1
-rw-r--r--dev-python/pyldap/pyldap-2.4.21.ebuild75
2 files changed, 76 insertions, 0 deletions
diff --git a/dev-python/pyldap/Manifest b/dev-python/pyldap/Manifest
index 6e757dca7b0e..7849ceef4645 100644
--- a/dev-python/pyldap/Manifest
+++ b/dev-python/pyldap/Manifest
@@ -1 +1,2 @@
DIST pyldap-2.4.20.tar.gz 122175 SHA256 9f3c5679e6a2c26a852d0468c538239e458a39ee86ddbbd2f1ec5c6fc73a3755 SHA512 f29df58fa1617b8b61631ad4532fde7569dd9742d141e31c1724568c0b46ed63cbc83135089196a07e4dca22d76f05f3c5a74e9b1e8034e5673196912baa8642 WHIRLPOOL 27dcf5919b83e3236b2b18b02943080fe5f5e48e5e931f27dfae45612c075e58bd798bee1f52dde8674571f377dd99479ef0f4a4e917f8c55962cce51fc150a3
+DIST pyldap-2.4.21.tar.gz 124575 SHA256 7a2b1dc31679466db11320b91bd2058574ba25ef27224967040918046ff4c450 SHA512 14aa87421017cd8ba4dc9c9787995ab28c0a656bc665c82de0eaaf4dfe312c731e98bb30f8de5200f23518e9d18d0265eed8a77c1aa58a0551e2d06dbc91a292 WHIRLPOOL 466ed66c77be629b0184efabb2ca5129e0d7d7b9a600f122b875287157c6b7ceb4af9d325c1f17e9f49233739fe8071373d900b0b435a730480eabf365178565
diff --git a/dev-python/pyldap/pyldap-2.4.21.ebuild b/dev-python/pyldap/pyldap-2.4.21.ebuild
new file mode 100644
index 000000000000..55a781d83313
--- /dev/null
+++ b/dev-python/pyldap/pyldap-2.4.21.ebuild
@@ -0,0 +1,75 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 python3_{3,4} pypy )
+
+inherit distutils-r1 multilib
+
+DESCRIPTION="Various LDAP-related Python modules"
+HOMEPAGE="https://pypi.python.org/pypi/pyldap https://github.com/pyldap/pyldap/"
+SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
+
+LICENSE="PSF-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd ~x86-solaris"
+IUSE="doc examples sasl ssl"
+
+# If you need support for openldap-2.3.x, please use python-ldap-2.3.9.
+# python team: Please do not remove python-ldap-2.3.9 from the tree.
+# OpenSSL is an optional runtime dep.
+# setup.py sets setuptools and misses pyasn1 and pyasn1-modules in install_requires
+RDEPEND="
+ >net-nds/openldap-2.4.11
+ dev-python/pyasn1[${PYTHON_USEDEP}]
+ dev-python/pyasn1-modules[${PYTHON_USEDEP}]
+ sasl? ( >=dev-libs/cyrus-sasl-2.1 )"
+DEPEND="${RDEPEND}
+ dev-python/setuptools[${PYTHON_USEDEP}]
+ doc? ( dev-python/sphinx[${PYTHON_USEDEP}] )"
+RDEPEND+=" !dev-python/python-ldap"
+
+python_prepare_all() {
+ sed -e "s:^library_dirs =.*:library_dirs = /usr/$(get_libdir) /usr/$(get_libdir)/sasl2:" \
+ -e "s:^include_dirs =.*:include_dirs = ${EPREFIX}/usr/include ${EPREFIX}/usr/include/sasl:" \
+ -i setup.cfg || die "error fixing setup.cfg"
+
+ local mylibs="ldap"
+ if use sasl; then
+ use ssl && mylibs="ldap_r"
+ mylibs="${mylibs} sasl2"
+ else
+ sed -e 's/HAVE_SASL//g' -i setup.cfg || die
+ fi
+ use ssl && mylibs="${mylibs} ssl crypto"
+ use elibc_glibc && mylibs="${mylibs} resolv"
+
+ sed -e "s:^libs = .*:libs = lber ${mylibs}:" \
+ -i setup.cfg || die "error setting up libs in setup.cfg"
+
+ # set test expected to fail to expectedFailure
+ sed -e "s:^ def test_bad_urls: @unittest.expectedFailure\n def test_bad_urls:" \
+ -i Tests/t_ldapurl.py || die
+
+ distutils-r1_python_prepare_all
+}
+
+python_compile_all() {
+ use doc && emake -C Doc html
+}
+
+python_test() {
+ # XXX: the tests supposedly can start local slapd
+ # but it requires some manual config, it seems.
+
+ "${PYTHON}" Tests/t_ldapurl.py || die "Tests fail with ${EPYTHON}"
+}
+
+python_install_all() {
+ use examples && local EXAMPLES=( Demo/. )
+ use doc && local HTML_DOCS=( Doc/.build/html/. )
+
+ distutils-r1_python_install_all
+}