forked from gentoo/gentoo
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
2 changed files
with
76 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
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 | ||
DIST pyldap-2.4.25.tar.gz 125234 SHA256 6a81ff791ee82fc246af724904d5d38f5fac97f5698a68e2907eaa5bb00bcc79 SHA512 23c34c0510d0e44f3d5d3af7c683ff41384c7fd06213ff50b14e43db27a1d1cdcc7c63477503f049ce7cbd1584ab1da0c0a88acb74b3ca7e05f3a841565e4713 WHIRLPOOL f537212124f2719507eee111801e985b6051d77e07a143fed5f4721ef0899ed4dd95d99eabfc3dd423401575f374448ed6b45f7546385eb983926be636d60efe |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 | ||
} |