]> git.pld-linux.org Git - packages/python-ldap.git/blame - python-ldap.spec
Release 6 (by relup.sh)
[packages/python-ldap.git] / python-ldap.spec
CommitLineData
e6641613
ER
1#
2# Conditional build:
03be1595
JB
3%bcond_without python2 # CPython 2.x module
4%bcond_without python3 # CPython 3.x module
5%bcond_with tests # unit tests (require LDAP server)
e6641613 6
03be1595
JB
7Summary: LDAP client API for Python 2
8Summary(pl.UTF-8): API klienckie LDAP dla Pythona 2
9Name: python-ldap
94161998 10Version: 3.3.1
c5f8481b 11Release: 6
230a14c8 12Epoch: 1
43419cb9 13License: Python-like
9716bb47 14Group: Libraries/Python
03be1595
JB
15#Source0Download: https://pypi.org/simple/python-ldap/
16Source0: https://files.pythonhosted.org/packages/source/p/python-ldap/%{name}-%{version}.tar.gz
94161998 17# Source0-md5: 7608579722c491e42f5f63b3f88a95fb
4c8655fe 18URL: http://python-ldap.sourceforge.net/
94161998 19BuildRequires: cyrus-sasl-devel >= 2.1.0
fac291d8 20BuildRequires: openldap-devel >= 2.4.6
94161998 21BuildRequires: openssl-devel
03be1595
JB
22%if %{with tests}
23BuildRequires: openldap >= 2.4.6
24BuildRequires: openldap-servers >= 2.4.6
25%endif
26%if %{with python2}
27BuildRequires: python-devel >= 1:2.7
28BuildRequires: python-modules >= 1:2.7
5ee21101 29BuildRequires: python-setuptools
03be1595
JB
30%if %{with tests}
31BuildRequires: python-pyasn1 >= 0.3.7
32BuildRequires: python-pyasn1_modules >= 0.1.5
33%endif
34%endif
35%if %{with python2}
36BuildRequires: python3-devel >= 1:3.4
37BuildRequires: python3-modules >= 1:3.4
5ee21101 38BuildRequires: python3-setuptools
03be1595
JB
39%if %{with tests}
40BuildRequires: python3-pyasn1 >= 0.3.7
41BuildRequires: python3-pyasn1_modules >= 0.1.5
42%endif
43%endif
fac291d8 44BuildRequires: rpm-pythonprov
03be1595
JB
45BuildRequires: rpmbuild(macros) >= 1.710
46Requires: python-modules >= 1:2.7
4c8655fe 47Provides: ldapmodule
4c8655fe
JK
48Obsoletes: ldapmodule
49Obsoletes: python-ldapmodule
fac291d8 50BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
4c8655fe
JK
51
52%description
43419cb9
JB
53python-ldap provides an object-oriented API to access LDAP directory
54servers from Python programs. Mainly it wraps the OpenLDAP client libs
55for that purpose.
56
57Additionally the package contains modules for other LDAP-related stuff
58(e.g. processing LDIF, LDAPURLs, LDAPv3 sub-schema, etc.).
4c8655fe 59
e18fb2ee 60%description -l pl.UTF-8
43419cb9
JB
61Moduł python-ldap dostarcza zorientowane obiektowo API pozwalające na
62dostęp do usług katalogowych LDAP z poziomu programów w Pythonie.
63Głównie obudowuje w tym celu biblioteki klienckie OpenLDAP.
64
65Dodatkowo pakiet zawiera moduły do innych zadań związanych z LDAP (jak
66przetwarzanie LDIF, LDAPURL, podschematy LDAPv3 itp.).
4c8655fe 67
03be1595
JB
68%package -n python3-ldap
69Summary: LDAP client API for Python 3
70Summary(pl.UTF-8): API klienckie LDAP dla Pythona 3
71Group: Libraries/Python
72Requires: python3-modules >= 1:3.4
73
74%description -n python3-ldap
75python-ldap provides an object-oriented API to access LDAP directory
76servers from Python programs. Mainly it wraps the OpenLDAP client libs
77for that purpose.
78
79Additionally the package contains modules for other LDAP-related stuff
80(e.g. processing LDIF, LDAPURLs, LDAPv3 sub-schema, etc.).
81
82%description -n python3-ldap -l pl.UTF-8
83Moduł python-ldap dostarcza zorientowane obiektowo API pozwalające na
84dostęp do usług katalogowych LDAP z poziomu programów w Pythonie.
85Głównie obudowuje w tym celu biblioteki klienckie OpenLDAP.
86
87Dodatkowo pakiet zawiera moduły do innych zadań związanych z LDAP (jak
88przetwarzanie LDIF, LDAPURL, podschematy LDAPv3 itp.).
89
c7fa9053 90%prep
4c8655fe 91%setup -q
4c8655fe
JK
92
93%build
03be1595
JB
94%if %{with python2}
95%py_build %{?with_tests:test}
e6641613 96
04ae41e8 97%if %{with tests}
bc02c391 98LDAPNOINIT=1 \
d68677dd 99PYTHONPATH=$(echo build-2/lib.linux-*/) \
bc02c391 100%{__python} -c "import ldap; print ldap.__version__; ldapo = ldap.initialize('ldap://localhost')"
04ae41e8 101%endif
03be1595
JB
102%endif
103
104%if %{with python3}
105%py3_build %{?with_tests:test}
106
107%if %{with tests}
108LDAPNOINIT=1 \
109PYTHONPATH=$(echo build-3/lib.linux-*/) \
110%{__python3} -c "import ldap; print ldap.__version__; ldapo = ldap.initialize('ldap://localhost')"
111%endif
112%endif
4c8655fe
JK
113
114%install
115rm -rf $RPM_BUILD_ROOT
03be1595
JB
116
117%if %{with python2}
3f480fed 118%py_install
4c8655fe 119
03be1595 120%{__rm} -r $RPM_BUILD_ROOT%{py_sitedir}/slapdtest
e6641613 121%py_postclean
03be1595
JB
122%endif
123
124%if %{with python3}
125%py3_install
126
127%{__rm} -r $RPM_BUILD_ROOT%{py3_sitedir}/slapdtest
128%endif
4c8655fe 129
4c8655fe
JK
130%clean
131rm -rf $RPM_BUILD_ROOT
132
03be1595 133%if %{with python2}
4c8655fe
JK
134%files
135%defattr(644,root,root,755)
43419cb9
JB
136%doc CHANGES LICENCE README TODO
137%attr(755,root,root) %{py_sitedir}/_ldap.so
43419cb9
JB
138%{py_sitedir}/ldapurl.py[co]
139%{py_sitedir}/ldif.py[co]
96ac6477 140%{py_sitedir}/ldap
43419cb9 141%{py_sitedir}/python_ldap-%{version}-py*.egg-info
03be1595
JB
142%endif
143
144%if %{with python3}
145%files -n python3-ldap
146%defattr(644,root,root,755)
147%doc CHANGES LICENCE README TODO
148%attr(755,root,root) %{py3_sitedir}/_ldap.cpython-*.so
149%{py3_sitedir}/ldap
150%{py3_sitedir}/ldapurl.py
151%{py3_sitedir}/ldif.py
152%{py3_sitedir}/__pycache__/ldapurl.cpython-*.py[co]
153%{py3_sitedir}/__pycache__/ldif.cpython-*.py[co]
154%{py3_sitedir}/python_ldap-%{version}-py*.egg-info
155%endif
This page took 0.088407 seconds and 4 git commands to generate.