]>
Commit | Line | Data |
---|---|---|
e6641613 ER |
1 | # |
2 | # Conditional build: | |
d68677dd | 3 | %bcond_with tests # do not perform "make test" |
e6641613 | 4 | |
26fdd4c3 | 5 | %define module ldap |
43419cb9 JB |
6 | Summary: LDAP client API for Python |
7 | Summary(pl.UTF-8): API klienckie LDAP dla Pythona | |
e6641613 | 8 | Name: python-%{module} |
d68677dd JR |
9 | Version: 2.4.32 |
10 | Release: 1 | |
230a14c8 | 11 | Epoch: 1 |
43419cb9 | 12 | License: Python-like |
9716bb47 | 13 | Group: Libraries/Python |
d68677dd JR |
14 | Source0: https://pypi.python.org/packages/67/d9/fa0ea70d1792875745116ad62ac8d4bcb07550b15cded591bb57df6a6d9a/%{name}-%{version}.tar.gz |
15 | # Source0-md5: 7c46c8a04acc227a778c7900c87cdfc7 | |
cdde2ccc | 16 | Patch0: %{name}-sasl2.patch |
4c8655fe | 17 | URL: http://python-ldap.sourceforge.net/ |
e5c1bcf0 | 18 | BuildRequires: rpmbuild(macros) >= 1.710 |
271575cb | 19 | BuildRequires: cyrus-sasl >= 2.1.0 |
fac291d8 | 20 | BuildRequires: openldap-devel >= 2.4.6 |
21 | BuildRequires: python-devel >= 1:2.5 | |
43419cb9 | 22 | BuildRequires: python-modules >= 1:2.5 |
fac291d8 | 23 | BuildRequires: rpm-pythonprov |
e6641613 | 24 | Requires: python-modules |
4c8655fe | 25 | Provides: ldapmodule |
4c8655fe JK |
26 | Obsoletes: ldapmodule |
27 | Obsoletes: python-ldapmodule | |
fac291d8 | 28 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
4c8655fe JK |
29 | |
30 | %description | |
43419cb9 JB |
31 | python-ldap provides an object-oriented API to access LDAP directory |
32 | servers from Python programs. Mainly it wraps the OpenLDAP client libs | |
33 | for that purpose. | |
34 | ||
35 | Additionally the package contains modules for other LDAP-related stuff | |
36 | (e.g. processing LDIF, LDAPURLs, LDAPv3 sub-schema, etc.). | |
4c8655fe | 37 | |
e18fb2ee | 38 | %description -l pl.UTF-8 |
43419cb9 JB |
39 | Moduł python-ldap dostarcza zorientowane obiektowo API pozwalające na |
40 | dostęp do usług katalogowych LDAP z poziomu programów w Pythonie. | |
41 | Głównie obudowuje w tym celu biblioteki klienckie OpenLDAP. | |
42 | ||
43 | Dodatkowo pakiet zawiera moduły do innych zadań związanych z LDAP (jak | |
44 | przetwarzanie LDIF, LDAPURL, podschematy LDAPv3 itp.). | |
4c8655fe | 45 | |
c7fa9053 | 46 | %prep |
4c8655fe | 47 | %setup -q |
271575cb | 48 | %patch0 -p1 |
4c8655fe JK |
49 | |
50 | %build | |
3f480fed | 51 | %py_build |
e6641613 | 52 | |
04ae41e8 ER |
53 | %if %{with tests} |
54 | %{__python} setup.py test | |
55 | ||
bc02c391 | 56 | LDAPNOINIT=1 \ |
d68677dd | 57 | PYTHONPATH=$(echo build-2/lib.linux-*/) \ |
bc02c391 | 58 | %{__python} -c "import ldap; print ldap.__version__; ldapo = ldap.initialize('ldap://localhost')" |
04ae41e8 | 59 | %endif |
4c8655fe JK |
60 | |
61 | %install | |
62 | rm -rf $RPM_BUILD_ROOT | |
e6641613 | 63 | #PYTHONPATH=$RPM_BUILD_ROOT%{py_sitedir} |
3f480fed | 64 | %py_install |
4c8655fe | 65 | |
e6641613 | 66 | %py_postclean |
4c8655fe | 67 | |
4c8655fe JK |
68 | %clean |
69 | rm -rf $RPM_BUILD_ROOT | |
70 | ||
71 | %files | |
72 | %defattr(644,root,root,755) | |
43419cb9 JB |
73 | %doc CHANGES LICENCE README TODO |
74 | %attr(755,root,root) %{py_sitedir}/_ldap.so | |
75 | %{py_sitedir}/dsml.py[co] | |
76 | %{py_sitedir}/ldapurl.py[co] | |
77 | %{py_sitedir}/ldif.py[co] | |
96ac6477 | 78 | %{py_sitedir}/ldap |
43419cb9 | 79 | %{py_sitedir}/python_ldap-%{version}-py*.egg-info |