commit: c899804f6114b346e43566d419dfc2a831a5f0cc
Author: Matthew Thode <prometheanfire <AT> gentoo <DOT> org>
AuthorDate: Sun Aug 27 04:05:18 2017 +0000
Commit: Matt Thode <prometheanfire <AT> gentoo <DOT> org>
CommitDate: Sun Aug 27 04:25:26 2017 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c899804f
dev-python/pyldap: 2.4.37 bup
Package-Manager: Portage-2.3.6, Repoman-2.3.3
dev-python/pyldap/Manifest | 1 +
dev-python/pyldap/pyldap-2.4.37.ebuild | 76 ++++++++++++++++++++++++++++++++++
2 files changed, 77 insertions(+)
diff --git a/dev-python/pyldap/Manifest b/dev-python/pyldap/Manifest
index ded048581d7..29c5b98e553 100644
--- a/dev-python/pyldap/Manifest
+++ b/dev-python/pyldap/Manifest
@@ -1 +1,2 @@
DIST pyldap-2.4.28.tar.gz 130651 SHA256
d38f31018f0c15925f50aec39f7255c15463f98797af53931e0e2a9ac21f6661 SHA512
d8bdf79c63d94289f2503fefe77b4e5c3edca6bf42a6fc039cffc4ebb9db57808c5f4fbf9265d3f33b672971ba3194c35b3b6034543c4f6f7ff80497ff050a7b
WHIRLPOOL
ff72c9d451e9d47872f78b4cc27cd51a3f5a156ea9a49a01ade35e1e52d74a92abf69301670fcc8be6eb3e32da69d4290dd4d590ae8971eec2cc1c77491d6bdb
+DIST pyldap-2.4.37.tar.gz 303732 SHA256
ba402b013696d7cb39ed20b38ae8f8be0461f837d3a2818e67f3bdf0cc16987f SHA512
da66669bf9eecebc8ba05ee313453b151a01147bc44c60da4936b80777ec3b69551f77be0e6f3c260dba771920d50fa6f54f1892eb0283761beed1ee8c6d83c2
WHIRLPOOL
23f2745836087874a3bd64835c0da2da8590028ca9a5d96b294ef00ecac00d4402300f2ccc6396606442dbae76ac164c84c4bfd39cfb3dcc6d5b9273b8e69ed1
diff --git a/dev-python/pyldap/pyldap-2.4.37.ebuild
b/dev-python/pyldap/pyldap-2.4.37.ebuild
new file mode 100644
index 00000000000..977643887b8
--- /dev/null
+++ b/dev-python/pyldap/pyldap-2.4.37.ebuild
@@ -0,0 +1,76 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+PYTHON_COMPAT=( python2_7 python3_{4,5,6} 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 ~arm64 ~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 doc && local HTML_DOCS=( Doc/.build/html/. )
+ distutils-r1_python_install_all
+ if use examples; then
+ dodoc -r Demo
+ docompress -x /usr/share/doc/${PF}/Demo
+ fi
+}