]> git.pld-linux.org Git - packages/python-ldap.git/blob - python-ldap.spec
e2487020f93fec48dfd3ea4e3d28298a3f7ddaed
[packages/python-ldap.git] / python-ldap.spec
1 #
2 # Conditional build:
3 %bcond_without  tests   # do not perform "make test"
4
5 %define         module  ldap
6 Summary:        LDAP client API for Python
7 Summary(pl.UTF-8):      API klienckie LDAP dla Pythona
8 Name:           python-%{module}
9 Version:        2.4.18
10 Release:        1
11 Epoch:          1
12 License:        Python-like
13 Group:          Libraries/Python
14 Source0:        http://pypi.python.org/packages/source/p/python-ldap/%{name}-%{version}.tar.gz
15 # Source0-md5:  9bee878cc3582d7184b0a48083446efb
16 Patch0:         %{name}-sasl2.patch
17 Patch1:         build.patch
18 URL:            http://python-ldap.sourceforge.net/
19 BuildRequires:  cyrus-sasl >= 2.1.0
20 BuildRequires:  openldap-devel >= 2.4.6
21 BuildRequires:  python-devel >= 1:2.5
22 BuildRequires:  python-modules >= 1:2.5
23 BuildRequires:  rpm-pythonprov
24 Requires:       python-modules
25 Provides:       ldapmodule
26 Obsoletes:      ldapmodule
27 Obsoletes:      python-ldapmodule
28 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
29
30 %description
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.).
37
38 %description -l pl.UTF-8
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.).
45
46 %prep
47 %setup -q
48 %patch0 -p1
49 %patch1 -p1
50
51 %build
52 CC="%{__cc}" \
53 CFLAGS="%{rpmcflags}" \
54 %{__python} setup.py build
55
56 %if %{with tests}
57 %{__python} setup.py test
58
59 LDAPNOINIT=1 \
60 PYTHONPATH=$(echo build/lib.linux-*/) \
61 %{__python} -c "import ldap; print ldap.__version__; ldapo = ldap.initialize('ldap://localhost')"
62 %endif
63
64 %install
65 rm -rf $RPM_BUILD_ROOT
66 #PYTHONPATH=$RPM_BUILD_ROOT%{py_sitedir}
67 %{__python} setup.py install \
68         --skip-build \
69         --optimize=2 \
70         --root=$RPM_BUILD_ROOT
71
72 %py_postclean
73
74 %clean
75 rm -rf $RPM_BUILD_ROOT
76
77 %files
78 %defattr(644,root,root,755)
79 %doc CHANGES LICENCE README TODO
80 %attr(755,root,root) %{py_sitedir}/_ldap.so
81 %{py_sitedir}/dsml.py[co]
82 %{py_sitedir}/ldapurl.py[co]
83 %{py_sitedir}/ldif.py[co]
84 %{py_sitedir}/ldap
85 %{py_sitedir}/python_ldap-%{version}-py*.egg-info
This page took 0.054205 seconds and 2 git commands to generate.