80a777
### Abstract ###
91aacc
# global prerelease b4
ccbb65
ccbb65
# Fix for https://bugzilla.redhat.com/show_bug.cgi?id=1520990
ccbb65
# openldap does not re-register nss shutdown callbacks after nss_Shutdown is
ccbb65
# called.
ccbb65
%if 0%{?fedora} <= 26
ccbb65
%global openldap_version 2.4.45-2
ccbb65
%else  # F27+
ccbb65
%global openldap_version 2.4.45-4
ccbb65
%endif
cvsdist c6bdc7
80a777
Name: python-ldap
64af0a
Version: 3.1.0
27ec1c
Release: 6%{?dist}
6b89b3
License: Python
6b89b3
Summary: An object-oriented API to access LDAP directory servers
92c299
URL: http://python-ldap.org/
793c4b
Source0: https://files.pythonhosted.org/packages/source/p/%{name}/%{name}-%{version}%{?prerelease}.tar.gz
80a777
80a777
### Build Dependencies ###
92b1b9
BuildRequires: gcc
ccbb65
BuildRequires: openldap-devel >= %{openldap_version}
80a777
BuildRequires: openssl-devel
80a777
BuildRequires: cyrus-sasl-devel
92c299
BuildRequires: python2-devel
92c299
BuildRequires: python2-setuptools
92c299
BuildRequires: python3-devel
92c299
BuildRequires: python3-setuptools
92c299
# Test dependencies
92c299
BuildRequires: /usr/bin/tox
ccbb65
BuildRequires: openldap-servers >= %{openldap_version}
ccbb65
BuildRequires: openldap-clients >= %{openldap_version}
92c299
BuildRequires: python2-coverage
92c299
BuildRequires: python2-pyasn1 >= 0.3.7
92c299
BuildRequires: python2-pyasn1-modules >= 0.1.5
92c299
BuildRequires: python3-coverage
92c299
BuildRequires: python3-pyasn1 >= 0.3.7
92c299
BuildRequires: python3-pyasn1-modules >= 0.1.5
paragn e7f02e
65963d
%global _description\
65963d
python-ldap provides an object-oriented API for working with LDAP within\
65963d
Python programs.  It allows access to LDAP directory servers by wrapping the\
65963d
OpenLDAP 2.x libraries, and contains modules for other LDAP-related tasks\
cvsdist c05c91
(including processing LDIF, LDAPURLs, LDAPv3 schema, etc.).
cvsdist c6bdc7
65963d
%description %_description
65963d
92c299
65963d
%package -n python2-ldap
65963d
Summary: %summary
92c299
ccbb65
Requires: openldap >= %{openldap_version}
92c299
Requires: python2-pyasn1 >= 0.3.7
92c299
Requires: python2-pyasn1-modules >= 0.1.5
92c299
Requires: python2-setuptools
92c299
92c299
Provides: python2-ldap%{?_isa} = %{version}-%{release}
65963d
%{?python_provide:%python_provide python2-ldap}
65963d
65963d
%description -n python2-ldap %_description
65963d
92c299
92c299
%package -n     python3-ldap
92c299
Summary:        %{summary}
92c299
ccbb65
Requires:  openldap >= %{openldap_version}
92c299
Requires:  python3-pyasn1 >= 0.3.7
92c299
Requires:  python3-pyasn1-modules >= 0.1.5
92c299
Requires:  python3-setuptools
92c299
%{?python_provide:%python_provide python3-ldap}
793c4b
Obsoletes: python3-pyldap < 3
92c299
Provides:  python3-pyldap = %{version}-%{release}
92c299
Provides:  python3-pyldap%{?_isa} = %{version}-%{release}
92c299
92c299
%description -n python3-ldap %_description
92c299
92c299
cvsdist c6bdc7
%prep
92c299
%setup -qc
793c4b
pushd %{name}-%{version}%{?prerelease}
793c4b
popd
92c299
793c4b
mv %{name}-%{version}%{?prerelease} python3
92c299
cp -a python{3,2}
6b89b3
6b89b3
# Fix interpreter
92c299
find python2 -name '*.py' | xargs sed -i '1s|^#!/usr/bin/env python|#!%{__python2}|'
92c299
find python3 -name '*.py' | xargs sed -i '1s|^#!/usr/bin/env python|#!%{__python3}|'
92c299
92c299
# Disable warnings in test to work around "'U' mode is deprecated"
92c299
# https://github.com/python-ldap/python-ldap/issues/96
92c299
sed -i 's,-Werror,-Wignore,g' python3/tox.ini
92c299
6b89b3
cvsdist c6bdc7
%build
92c299
pushd python2
92c299
%py2_build
92c299
popd
92c299
pushd python3
92c299
%py3_build
92c299
popd
92c299
92c299
92c299
%check
92c299
# don't download packages
92c299
export PIP_INDEX_URL=http://host.invalid./
92c299
export PIP_NO_DEPS=yes
92c299
92c299
pushd python2
92c299
LANG=C.UTF-8 TOXENV=py27 LOGLEVEL=10 tox --sitepackages
92c299
popd
92c299
92c299
pushd python3
92c299
LANG=C.UTF-8 TOXENV=py%{python3_version_nodots} LOGLEVEL=10 tox --sitepackages
92c299
popd
92c299
cvsdist c6bdc7
cvsdist c6bdc7
%install
92c299
pushd python2
92c299
%py2_install
92c299
popd
92c299
92c299
pushd python3
92c299
%py3_install
92c299
popd
cvsdist c6bdc7
cvsdist c6bdc7
65963d
%files -n python2-ldap
92c299
%license python2/LICENCE
92c299
%doc python2/CHANGES python2/README python2/TODO python2/Demo
4ea9a9
%{python2_sitearch}/_ldap.so
4ea9a9
%{python2_sitearch}/ldapurl.py*
4ea9a9
%{python2_sitearch}/ldif.py*
4ea9a9
%{python2_sitearch}/slapdtest/
4ea9a9
%{python2_sitearch}/ldap/
4ea9a9
%{python2_sitearch}/python_ldap-%{version}%{?prerelease}-py2.7.egg-info
92c299
92c299
%files -n python3-ldap
92c299
%license python3/LICENCE
92c299
%doc python3/CHANGES python3/README python3/TODO python3/Demo
92c299
%{python3_sitearch}/_ldap.cpython-*.so
92c299
%{python3_sitearch}/ldapurl.py*
92c299
%{python3_sitearch}/ldif.py*
92c299
%{python3_sitearch}/__pycache__/*
92c299
%{python3_sitearch}/slapdtest/
92c299
%{python3_sitearch}/ldap/
793c4b
%{python3_sitearch}/python_ldap-%{version}%{?prerelease}-py%{python3_version}.egg-info
cvsdist c6bdc7
cvsdist c6bdc7
%changelog
27ec1c
* Fri Aug 16 2019 Miro Hrončok <mhroncok@redhat.com> - 3.1.0-6
27ec1c
- Rebuilt for Python 3.8
27ec1c
b53b70
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 3.1.0-5
b53b70
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
b53b70
2eb901
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 3.1.0-4
2eb901
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
2eb901
d32e4b
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 3.1.0-3
d32e4b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
d32e4b
05c043
* Mon Jun 18 2018 Miro Hrončok <mhroncok@redhat.com> - 3.1.0-2
05c043
- Rebuilt for Python 3.7
05c043
64af0a
* Fri May 25 2018 Christian Heimes <cheimes@redhat.com> - 3.1.0-1
64af0a
- New upstream release 3.1.0
64af0a
91aacc
* Wed Mar 21 2018 Christian Heimes <cheimes@redhat.com> - 3.0.0-1
91aacc
- New upstream release 3.0.0
91aacc
21ffa6
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 3.0.0-0.5.b4
21ffa6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
21ffa6
793c4b
* Wed Jan 10 2018 Christian Heimes <cheimes@redhat.com> - 3.0.0-0.4.b4
793c4b
- New upstream release 3.0.0b4 (RHBZ #1496470)
793c4b
3a67b7
* Wed Dec 20 2017 Christian Heimes <cheimes@redhat.com> - 3.0.0-0.3.b3
3a67b7
- New upstream release 3.0.0b3 (RHBZ #1496470)
3a67b7
ccbb65
* Mon Dec 11 2017 Christian Heimes <cheimes@redhat.com> - 3.0.0-0.2.b2
ccbb65
- New upstream release 3.0.0b2 (RHBZ #1496470)
ccbb65
- Require OpenLDAP with fix for NSS issue (see #1520990)
ccbb65
ccbb65
* Mon Dec 04 2017 Christian Heimes <cheimes@redhat.com> - 0:3.0.0-0.1.b1
92c299
- New upstream release 3.0.0b1 (RHBZ #1496470)
92c299
- Resolves RHBZ #1489184
92c299
- Enable unittests
92c299
- Remove dsml module
92c299
- Package python3-ldap, which obsoletes python3-pyldap
92c299
25fc6c
* Wed Nov 08 2017 Christian Heimes <cheimes@redhat.com> - 0:2.4.25-9
25fc6c
- Fix issue in pyasn1 patch
25fc6c
8b78ab
* Tue Nov 07 2017 Christian Heimes <cheimes@redhat.com> - 0:2.4.25-8
8b78ab
- Apply fix for pyasn1 >= 0.3
8b78ab
65963d
* Sat Aug 19 2017 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 0:2.4.25-7
65963d
- Python 2 binary package renamed to python2-ldap
65963d
  See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3
65963d
72a2bc
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0:2.4.25-6
72a2bc
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
72a2bc
7ea032
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0:2.4.25-5
7ea032
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
7ea032
Igor Gnatenko 2cabf2
* Fri Jul 07 2017 Igor Gnatenko <ignatenko@redhat.com> - 0:2.4.25-4
Igor Gnatenko 2cabf2
- Rebuild due to bug in RPM (RHBZ #1468476)
Igor Gnatenko 2cabf2
ce304f
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0:2.4.25-3
ce304f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
ce304f
60bca7
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0:2.4.25-2
60bca7
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
60bca7
Petr Spacek e6a830
* Wed Apr 20 2016 Petr Spacek <pspacek@redhat.com> - 2.4.25-1
Petr Spacek e6a830
- New upstream release 2.4.25
Petr Spacek e6a830
c2cbf0
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0:2.4.17-3
c2cbf0
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
c2cbf0
ec0fa0
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0:2.4.17-2
ec0fa0
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
ec0fa0
Petr Spacek 59002b
* Mon Sep 29 2014 Petr Spacek <pspacek@redhat.com> - 0:2.4.17-1
Petr Spacek 59002b
- New upstream release adds features required in bug 1122486
Petr Spacek 59002b
- Dependency on pyasn1-modules was added to fix bug 995545
Petr Spacek 59002b
Petr Spacek f4657a
* Thu Sep 25 2014 Petr Spacek <pspacek@redhat.com> - 0:2.4.16-1
Petr Spacek f4657a
- New upstream release fixes bug 1007820
Petr Spacek f4657a
- Dependency on pyasn1 was added to fix bug 995545
Petr Spacek f4657a
ee6620
* Sun Aug 17 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0:2.4.6-7
ee6620
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
ee6620
66b919
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0:2.4.6-6
66b919
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
66b919
da7634
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0:2.4.6-5
da7634
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
da7634
8d930b
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0:2.4.6-4
8d930b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
8d930b
500571
* Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0:2.4.6-3
500571
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
500571
c528bf
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0:2.4.6-2
c528bf
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
c528bf
Jeroen van Meeuwen (Ergo Project) ce60d3
* Mon Jan 02 2012 Jeroen van Meeuwen <vanmeeuwen@kolabsys.com> - 2.4.6-1
Jeroen van Meeuwen (Ergo Project) ce60d3
- New upstream release
Jeroen van Meeuwen (Ergo Project) ce60d3
bf4ab6
* Wed Feb 09 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0:2.3.12-2
bf4ab6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
bf4ab6
paragn e7f02e
* Fri Sep 24 2010 Parag Nemade <paragn at="" fedoraproject.org=""> - 0:2.3.12-1
paragn e7f02e
- Merge-review cleanup (#226343)
paragn e7f02e
a3e9de
* Thu Jul 22 2010 David Malcolm <dmalcolm@redhat.com> - 0:2.3.10-2
a3e9de
- Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild
a3e9de
9509d6
* Thu Jan 14 2010 Matthew Barnes <mbarnes@redhat.com> - 0:2.3.10-1
9509d6
- Update to 2.3.10
9509d6
- Change source URI to pypi.python.org.
9509d6
8235f3
* Fri Aug 21 2009 Tomas Mraz <tmraz@redhat.com> - 0:2.3.6-3
8235f3
- rebuilt with new openssl
8235f3
896218
* Sun Jul 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0:2.3.6-2
896218
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
896218
eab774
* Wed Apr 01 2009 Matthew Barnes <mbarnes@redhat.com> - 0:2.3.6-1
eab774
- Update to 2.3.6
eab774
2fe799
* Fri Feb 27 2009 Matthew Barnes <mbarnes@redhat.com> - 0:2.3.5-5
2fe799
- Fix a build error.
2fe799
e7da3f
* Thu Feb 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0:2.3.5-4
e7da3f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
e7da3f
a0acb6
* Fri Jan 16 2009 Tomas Mraz <tmraz@redhat.com> - 0:2.3.5-3
a0acb6
- rebuild with new openssl
a0acb6
4840fd
* Sat Nov 29 2008 Ignacio Vazquez-Abrams <ivazqueznet+rpm@gmail.com> - 0:2.3.5-2
4840fd
- Rebuild for Python 2.6
4840fd
6b89b3
* Wed Sep  3 2008 Tom "spot" Callaway <tcallawa@redhat.com> - 0:2.3.5-1
6b89b3
- fix license tag
6b89b3
- update to 2.3.5
6b89b3
e50549
* Sun Feb 17 2008 Matthew Barnes <mbarnes@redhat.com> - 0:2.3.1-3.fc9
e50549
- Rebuild with GCC 4.3
e50549
fcbbe5
* Wed Dec 05 2007 Matthew Barnes <mbarnes@redhat.com> - 0:2.3.1-2.fc9
fcbbe5
- Rebuild against new openssl.
fcbbe5
91a5ef
* Wed Oct 10 2007 Matthew Barnes <mbarnes@redhat.com> - 0:2.3.1-1.fc8
91a5ef
- Update to 2.3.1
91a5ef
80a777
* Fri Jun 08 2007 Matthew Barnes <mbarnes@redhat.com> - 0:2.3.0-1.fc8
80a777
- Update to 2.3
80a777
- Spec file cleanups.
80a777
d4dbb0
* Thu Dec  7 2006 Jeremy Katz <katzj@redhat.com> - 0:2.2.0-3
d4dbb0
- rebuild against python 2.5
d4dbb0
d4dbb0
* Wed Jul 12 2006 Jesse Keating <jkeating@redhat.com>
c504ab
- rebuild
c504ab
4a4d19
* Wed May 17 2006 Matthew Barnes <mbarnes@redhat.com> - 2.2.0-2
4a4d19
- Put back the epoch line... happy beehive?
4a4d19
91aacc
* Mon May 15 2006 Matthew Barnes <mbarnes@redhat.com> - 2.2.0-1
10ed0b
- Update to 2.2.0
10ed0b
- Update python-ldap-2.0.6-rpath.patch and rename it to
10ed0b
  python-ldap-2.2.0-dirs.patch.
10ed0b
1cc16a
* Fri Feb 10 2006 Jesse Keating <jkeating@redhat.com> - 0:2.0.6-5.2.1
1cc16a
- bump again for double-long bug on ppc(64)
1cc16a
9a3805
* Tue Feb 07 2006 Jesse Keating <jkeating@redhat.com> - 0:2.0.6-5.2
9a3805
- rebuilt for new gcc4.1 snapshot and glibc changes
9a3805
0a08b1
* Fri Dec 09 2005 Jesse Keating <jkeating@redhat.com>
0a08b1
- rebuilt
0a08b1
818c55
* Tue Nov  8 2005 Tomas Mraz <tmraz@redhat.com> - 2.0.6-5
818c55
- rebuilt with new openssl
818c55
c4ae1e
* Tue Mar 22 2005 Warren Togami <wtogami@redhat.com> - 2.0.6-4
80f8f6
- add LICENCE (#150842)
80f8f6
- simplify python reqs
80f8f6
- remove invalid rpath
9a6683
d5c301
* Wed Mar 16 2005 Dan Williams <dcbw@redhat.com> - 0:2.0.6-2
d5c301
- rebuilt to pick up new libssl.so.5
d5c301
983bb0
* Tue Feb  8 2005 David Malcolm <dmalcolm@redhat.com> - 0:2.0.6-1
983bb0
- 2.0.6
983bb0
658ffb
* Tue Nov 16 2004 Nalin Dahyabhai <nalin@redhat.com> - 0:2.0.1-3
278c58
- rebuild (#139161)
658ffb
cvsdist c05c91
* Mon Aug 30 2004 David Malcolm <dmalcolm@redhat.com> - 0:2.0.1-2
cvsdist c05c91
- Rewrote description; added requirement for openldap
cvsdist c05c91
cvsdist c6bdc7
* Tue Aug 17 2004 David Malcolm <dmalcolm@redhat.com> - 0:2.0.1-1
cvsdist c6bdc7
- imported into Red Hat's packaging system from Fedora.us; set release to 1
cvsdist c6bdc7
cvsdist c6bdc7
* Wed Jun 30 2004 Panu Matilainen <pmatilai@welho.com> 0:2.0.1-0.fdr.1
cvsdist c6bdc7
- update to 2.0.1
cvsdist c6bdc7
cvsdist c6bdc7
* Sun Dec 07 2003 Panu Matilainen <pmatilai@welho.com> 0:2.0.0-0.fdr.0.4.pre16
cvsdist c6bdc7
- fix spec permissions + release tag order (bug 1099)
cvsdist c6bdc7
cvsdist c6bdc7
* Sat Dec  6 2003 Ville Skyttä <ville.skytta at="" iki.fi=""> 0:2.0.0-0.fdr.0.pre16.3
cvsdist c6bdc7
- Stricter python version requirements.
cvsdist c6bdc7
- BuildRequire openssl-devel.
cvsdist c6bdc7
- Explicitly build *.pyo, install them as %%ghost.
cvsdist c6bdc7
- Own more installed dirs.
cvsdist c6bdc7
- Remove $RPM_BUILD_ROOT at start of %%install.
cvsdist c6bdc7
cvsdist c6bdc7
* Wed Dec 03 2003 Panu Matilainen <pmatilai@welho.com> 0:2.0.0-0.fdr.0.pre16.2
cvsdist c6bdc7
- duh, build requires python-devel, not just python...
cvsdist c6bdc7
cvsdist c6bdc7
* Wed Dec 03 2003 Panu Matilainen <pmatilai@welho.com> 0:2.0.0-0.fdr.0.pre16.1
cvsdist c6bdc7
- Initial Fedora packaging.