1 |
commit: 5d7f0a42d9c50d94b66eeaa5d64e2cf10b344354 |
2 |
Author: Justin Lecher <jlec <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Oct 1 07:02:48 2015 +0000 |
4 |
Commit: Justin Lecher <jlec <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Oct 1 07:03:15 2015 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5d7f0a42 |
7 |
|
8 |
dev-python/pyldap: New package, ebuild written by me |
9 |
|
10 |
Package-Manager: portage-2.2.22 |
11 |
Signed-off-by: Justin Lecher <jlec <AT> gentoo.org> |
12 |
|
13 |
dev-python/pyldap/Manifest | 1 + |
14 |
dev-python/pyldap/metadata.xml | 13 ++++++ |
15 |
dev-python/pyldap/pyldap-2.4.20.ebuild | 75 ++++++++++++++++++++++++++++++++++ |
16 |
3 files changed, 89 insertions(+) |
17 |
|
18 |
diff --git a/dev-python/pyldap/Manifest b/dev-python/pyldap/Manifest |
19 |
new file mode 100644 |
20 |
index 0000000..6e757dc |
21 |
--- /dev/null |
22 |
+++ b/dev-python/pyldap/Manifest |
23 |
@@ -0,0 +1 @@ |
24 |
+DIST pyldap-2.4.20.tar.gz 122175 SHA256 9f3c5679e6a2c26a852d0468c538239e458a39ee86ddbbd2f1ec5c6fc73a3755 SHA512 f29df58fa1617b8b61631ad4532fde7569dd9742d141e31c1724568c0b46ed63cbc83135089196a07e4dca22d76f05f3c5a74e9b1e8034e5673196912baa8642 WHIRLPOOL 27dcf5919b83e3236b2b18b02943080fe5f5e48e5e931f27dfae45612c075e58bd798bee1f52dde8674571f377dd99479ef0f4a4e917f8c55962cce51fc150a3 |
25 |
|
26 |
diff --git a/dev-python/pyldap/metadata.xml b/dev-python/pyldap/metadata.xml |
27 |
new file mode 100644 |
28 |
index 0000000..c60eaa2 |
29 |
--- /dev/null |
30 |
+++ b/dev-python/pyldap/metadata.xml |
31 |
@@ -0,0 +1,13 @@ |
32 |
+<?xml version="1.0" encoding="UTF-8"?> |
33 |
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> |
34 |
+<pkgmetadata> |
35 |
+ <herd>python</herd> |
36 |
+ <maintainer> |
37 |
+ <email>xmw@g.o</email> |
38 |
+ <name>Michael Weber</name> |
39 |
+ <description>Upstream of the python3 port</description> |
40 |
+ </maintainer> |
41 |
+ <upstream> |
42 |
+ <remote-id type="pypi">python-ldap</remote-id> |
43 |
+ </upstream> |
44 |
+</pkgmetadata> |
45 |
|
46 |
diff --git a/dev-python/pyldap/pyldap-2.4.20.ebuild b/dev-python/pyldap/pyldap-2.4.20.ebuild |
47 |
new file mode 100644 |
48 |
index 0000000..1f121f3 |
49 |
--- /dev/null |
50 |
+++ b/dev-python/pyldap/pyldap-2.4.20.ebuild |
51 |
@@ -0,0 +1,75 @@ |
52 |
+# Copyright 1999-2015 Gentoo Foundation |
53 |
+# Distributed under the terms of the GNU General Public License v2 |
54 |
+# $Id$ |
55 |
+ |
56 |
+EAPI=5 |
57 |
+ |
58 |
+PYTHON_COMPAT=( python2_7 python3_{3,4} pypy ) |
59 |
+ |
60 |
+inherit distutils-r1 multilib |
61 |
+ |
62 |
+DESCRIPTION="Various LDAP-related Python modules" |
63 |
+HOMEPAGE="https://pypi.python.org/pypi/pyldap https://github.com/pyldap/pyldap/" |
64 |
+SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz" |
65 |
+ |
66 |
+LICENSE="PSF-2" |
67 |
+SLOT="0" |
68 |
+KEYWORDS="~alpha ~amd64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd ~x86-solaris" |
69 |
+IUSE="doc examples sasl ssl" |
70 |
+ |
71 |
+# If you need support for openldap-2.3.x, please use python-ldap-2.3.9. |
72 |
+# python team: Please do not remove python-ldap-2.3.9 from the tree. |
73 |
+# OpenSSL is an optional runtime dep. |
74 |
+# setup.py sets setuptools and misses pyasn1 and pyasn1-modules in install_requires |
75 |
+RDEPEND=" |
76 |
+ !dev-python/python-ldap[${PYTHON_USEDEP}] |
77 |
+ >net-nds/openldap-2.4.11 |
78 |
+ dev-python/pyasn1[${PYTHON_USEDEP}] |
79 |
+ dev-python/pyasn1-modules[${PYTHON_USEDEP}] |
80 |
+ sasl? ( >=dev-libs/cyrus-sasl-2.1 )" |
81 |
+DEPEND="${RDEPEND} |
82 |
+ dev-python/setuptools[${PYTHON_USEDEP}] |
83 |
+ doc? ( dev-python/sphinx[${PYTHON_USEDEP}] )" |
84 |
+ |
85 |
+python_prepare_all() { |
86 |
+ sed -e "s:^library_dirs =.*:library_dirs = /usr/$(get_libdir) /usr/$(get_libdir)/sasl2:" \ |
87 |
+ -e "s:^include_dirs =.*:include_dirs = ${EPREFIX}/usr/include ${EPREFIX}/usr/include/sasl:" \ |
88 |
+ -i setup.cfg || die "error fixing setup.cfg" |
89 |
+ |
90 |
+ local mylibs="ldap" |
91 |
+ if use sasl; then |
92 |
+ use ssl && mylibs="ldap_r" |
93 |
+ mylibs="${mylibs} sasl2" |
94 |
+ else |
95 |
+ sed -e 's/HAVE_SASL//g' -i setup.cfg || die |
96 |
+ fi |
97 |
+ use ssl && mylibs="${mylibs} ssl crypto" |
98 |
+ use elibc_glibc && mylibs="${mylibs} resolv" |
99 |
+ |
100 |
+ sed -e "s:^libs = .*:libs = lber ${mylibs}:" \ |
101 |
+ -i setup.cfg || die "error setting up libs in setup.cfg" |
102 |
+ |
103 |
+ # set test expected to fail to expectedFailure |
104 |
+ sed -e "s:^ def test_bad_urls: @unittest.expectedFailure\n def test_bad_urls:" \ |
105 |
+ -i Tests/t_ldapurl.py || die |
106 |
+ |
107 |
+ distutils-r1_python_prepare_all |
108 |
+} |
109 |
+ |
110 |
+python_compile_all() { |
111 |
+ use doc && emake -C Doc html |
112 |
+} |
113 |
+ |
114 |
+python_test() { |
115 |
+ # XXX: the tests supposedly can start local slapd |
116 |
+ # but it requires some manual config, it seems. |
117 |
+ |
118 |
+ "${PYTHON}" Tests/t_ldapurl.py || die "Tests fail with ${EPYTHON}" |
119 |
+} |
120 |
+ |
121 |
+python_install_all() { |
122 |
+ use examples && local EXAMPLES=( Demo/. ) |
123 |
+ use doc && local HTML_DOCS=( Doc/.build/html/. ) |
124 |
+ |
125 |
+ distutils-r1_python_install_all |
126 |
+} |