dev-python/pyldap: bup
authorMatthew Thode <prometheanfire@gentoo.org>
Mon, 27 Feb 2017 02:07:34 +0000 (20:07 -0600)
committerMatthew Thode <prometheanfire@gentoo.org>
Mon, 27 Feb 2017 02:15:48 +0000 (20:15 -0600)
Package-Manager: Portage-2.3.3, Repoman-2.3.1

dev-python/pyldap/Manifest
dev-python/pyldap/pyldap-2.4.28.ebuild [new file with mode: 0644]

index a665df9d5226c0a4919f6c5c4029e10c9ca21668..b7af4c6fcda39f479ea825198bc62312d6ecc7ce 100644 (file)
@@ -2,3 +2,4 @@ DIST pyldap-2.4.20.tar.gz 122175 SHA256 9f3c5679e6a2c26a852d0468c538239e458a39ee
 DIST pyldap-2.4.21.tar.gz 124575 SHA256 7a2b1dc31679466db11320b91bd2058574ba25ef27224967040918046ff4c450 SHA512 14aa87421017cd8ba4dc9c9787995ab28c0a656bc665c82de0eaaf4dfe312c731e98bb30f8de5200f23518e9d18d0265eed8a77c1aa58a0551e2d06dbc91a292 WHIRLPOOL 466ed66c77be629b0184efabb2ca5129e0d7d7b9a600f122b875287157c6b7ceb4af9d325c1f17e9f49233739fe8071373d900b0b435a730480eabf365178565
 DIST pyldap-2.4.25.1.tar.gz 124042 SHA256 fdc46e9cad1fd515017b6109edd8d35a5ab655daa2708743285e8356bb5c2bee SHA512 e28a13f4eca447dea3a2829c2523b103ebaa0e669d6772d24adc8e20505e552f9201ff37b1c71a904575e53739ef93e3b99a984f28d1bb0577a89e43e1b250e6 WHIRLPOOL 00389234dbb7eb4a18f65e448a5d5696812acd9a4fd5d9ff69f43a1e9ecbf29cb1cbd98b21d12178b34bab669f9eef3ec11192dcb4e9405ee1569d8ec81f689a
 DIST pyldap-2.4.25.tar.gz 125234 SHA256 6a81ff791ee82fc246af724904d5d38f5fac97f5698a68e2907eaa5bb00bcc79 SHA512 23c34c0510d0e44f3d5d3af7c683ff41384c7fd06213ff50b14e43db27a1d1cdcc7c63477503f049ce7cbd1584ab1da0c0a88acb74b3ca7e05f3a841565e4713 WHIRLPOOL f537212124f2719507eee111801e985b6051d77e07a143fed5f4721ef0899ed4dd95d99eabfc3dd423401575f374448ed6b45f7546385eb983926be636d60efe
+DIST pyldap-2.4.28.tar.gz 130651 SHA256 d38f31018f0c15925f50aec39f7255c15463f98797af53931e0e2a9ac21f6661 SHA512 d8bdf79c63d94289f2503fefe77b4e5c3edca6bf42a6fc039cffc4ebb9db57808c5f4fbf9265d3f33b672971ba3194c35b3b6034543c4f6f7ff80497ff050a7b WHIRLPOOL ff72c9d451e9d47872f78b4cc27cd51a3f5a156ea9a49a01ade35e1e52d74a92abf69301670fcc8be6eb3e32da69d4290dd4d590ae8971eec2cc1c77491d6bdb
diff --git a/dev-python/pyldap/pyldap-2.4.28.ebuild b/dev-python/pyldap/pyldap-2.4.28.ebuild
new file mode 100644 (file)
index 0000000..2424086
--- /dev/null
@@ -0,0 +1,74 @@
+# 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} 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 examples && local EXAMPLES=( Demo/. )
+       use doc && local HTML_DOCS=( Doc/.build/html/. )
+
+       distutils-r1_python_install_all
+}