Gentoo Archives: gentoo-commits

From: Matt Thode <prometheanfire@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-python/pyldap/
Date: Sun, 27 Aug 2017 04:26:36
Message-Id: 1503807926.c899804f6114b346e43566d419dfc2a831a5f0cc.prometheanfire@gentoo
1 commit: c899804f6114b346e43566d419dfc2a831a5f0cc
2 Author: Matthew Thode <prometheanfire <AT> gentoo <DOT> org>
3 AuthorDate: Sun Aug 27 04:05:18 2017 +0000
4 Commit: Matt Thode <prometheanfire <AT> gentoo <DOT> org>
5 CommitDate: Sun Aug 27 04:25:26 2017 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c899804f
7
8 dev-python/pyldap: 2.4.37 bup
9
10 Package-Manager: Portage-2.3.6, Repoman-2.3.3
11
12 dev-python/pyldap/Manifest | 1 +
13 dev-python/pyldap/pyldap-2.4.37.ebuild | 76 ++++++++++++++++++++++++++++++++++
14 2 files changed, 77 insertions(+)
15
16 diff --git a/dev-python/pyldap/Manifest b/dev-python/pyldap/Manifest
17 index ded048581d7..29c5b98e553 100644
18 --- a/dev-python/pyldap/Manifest
19 +++ b/dev-python/pyldap/Manifest
20 @@ -1 +1,2 @@
21 DIST pyldap-2.4.28.tar.gz 130651 SHA256 d38f31018f0c15925f50aec39f7255c15463f98797af53931e0e2a9ac21f6661 SHA512 d8bdf79c63d94289f2503fefe77b4e5c3edca6bf42a6fc039cffc4ebb9db57808c5f4fbf9265d3f33b672971ba3194c35b3b6034543c4f6f7ff80497ff050a7b WHIRLPOOL ff72c9d451e9d47872f78b4cc27cd51a3f5a156ea9a49a01ade35e1e52d74a92abf69301670fcc8be6eb3e32da69d4290dd4d590ae8971eec2cc1c77491d6bdb
22 +DIST pyldap-2.4.37.tar.gz 303732 SHA256 ba402b013696d7cb39ed20b38ae8f8be0461f837d3a2818e67f3bdf0cc16987f SHA512 da66669bf9eecebc8ba05ee313453b151a01147bc44c60da4936b80777ec3b69551f77be0e6f3c260dba771920d50fa6f54f1892eb0283761beed1ee8c6d83c2 WHIRLPOOL 23f2745836087874a3bd64835c0da2da8590028ca9a5d96b294ef00ecac00d4402300f2ccc6396606442dbae76ac164c84c4bfd39cfb3dcc6d5b9273b8e69ed1
23
24 diff --git a/dev-python/pyldap/pyldap-2.4.37.ebuild b/dev-python/pyldap/pyldap-2.4.37.ebuild
25 new file mode 100644
26 index 00000000000..977643887b8
27 --- /dev/null
28 +++ b/dev-python/pyldap/pyldap-2.4.37.ebuild
29 @@ -0,0 +1,76 @@
30 +# Copyright 1999-2017 Gentoo Foundation
31 +# Distributed under the terms of the GNU General Public License v2
32 +
33 +EAPI=6
34 +
35 +PYTHON_COMPAT=( python2_7 python3_{4,5,6} pypy )
36 +
37 +inherit distutils-r1 multilib
38 +
39 +DESCRIPTION="Various LDAP-related Python modules"
40 +HOMEPAGE="https://pypi.python.org/pypi/pyldap https://github.com/pyldap/pyldap/"
41 +SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
42 +
43 +LICENSE="PSF-2"
44 +SLOT="0"
45 +KEYWORDS="~alpha ~amd64 ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd ~x86-solaris"
46 +IUSE="doc examples sasl ssl"
47 +
48 +# If you need support for openldap-2.3.x, please use python-ldap-2.3.9.
49 +# python team: Please do not remove python-ldap-2.3.9 from the tree.
50 +# OpenSSL is an optional runtime dep.
51 +# setup.py sets setuptools and misses pyasn1 and pyasn1-modules in install_requires
52 +RDEPEND="
53 + >net-nds/openldap-2.4.11
54 + dev-python/pyasn1[${PYTHON_USEDEP}]
55 + dev-python/pyasn1-modules[${PYTHON_USEDEP}]
56 + sasl? ( >=dev-libs/cyrus-sasl-2.1 )"
57 +DEPEND="${RDEPEND}
58 + dev-python/setuptools[${PYTHON_USEDEP}]
59 + doc? ( dev-python/sphinx[${PYTHON_USEDEP}] )"
60 +RDEPEND+=" !dev-python/python-ldap"
61 +
62 +python_prepare_all() {
63 + sed -e "s:^library_dirs =.*:library_dirs = /usr/$(get_libdir) /usr/$(get_libdir)/sasl2:" \
64 + -e "s:^include_dirs =.*:include_dirs = ${EPREFIX}/usr/include ${EPREFIX}/usr/include/sasl:" \
65 + -i setup.cfg || die "error fixing setup.cfg"
66 +
67 + local mylibs="ldap"
68 + if use sasl; then
69 + use ssl && mylibs="ldap_r"
70 + mylibs="${mylibs} sasl2"
71 + else
72 + sed -e 's/HAVE_SASL//g' -i setup.cfg || die
73 + fi
74 + use ssl && mylibs="${mylibs} ssl crypto"
75 + use elibc_glibc && mylibs="${mylibs} resolv"
76 +
77 + sed -e "s:^libs = .*:libs = lber ${mylibs}:" \
78 + -i setup.cfg || die "error setting up libs in setup.cfg"
79 +
80 + # set test expected to fail to expectedFailure
81 + sed -e "s:^ def test_bad_urls: @unittest.expectedFailure\n def test_bad_urls:" \
82 + -i Tests/t_ldapurl.py || die
83 +
84 + distutils-r1_python_prepare_all
85 +}
86 +
87 +python_compile_all() {
88 + use doc && emake -C Doc html
89 +}
90 +
91 +python_test() {
92 + # XXX: the tests supposedly can start local slapd
93 + # but it requires some manual config, it seems.
94 +
95 + "${PYTHON}" Tests/t_ldapurl.py || die "Tests fail with ${EPYTHON}"
96 +}
97 +
98 +python_install_all() {
99 + use doc && local HTML_DOCS=( Doc/.build/html/. )
100 + distutils-r1_python_install_all
101 + if use examples; then
102 + dodoc -r Demo
103 + docompress -x /usr/share/doc/${PF}/Demo
104 + fi
105 +}