Blame SPECS/python-ldap.spec

293d5a
### Abstract ###
293d5a
# global prerelease b4
293d5a
293d5a
# Fix for https://bugzilla.redhat.com/show_bug.cgi?id=1520990
293d5a
# openldap does not re-register nss shutdown callbacks after nss_Shutdown is
293d5a
# called.
293d5a
%if 0%{?fedora} <= 26
293d5a
%global openldap_version 2.4.45-2
293d5a
%else  # F27+
293d5a
%global openldap_version 2.4.45-4
293d5a
%endif
293d5a
293d5a
%bcond_with python2
293d5a
293d5a
Name: python-ldap
293d5a
Version: 3.3.1
293d5a
Release: 1%{?dist}
293d5a
License: Python
293d5a
Group: System Environment/Libraries
293d5a
Summary: An object-oriented API to access LDAP directory servers
293d5a
URL: http://python-ldap.org/
293d5a
Source0: https://files.pythonhosted.org/packages/source/p/%{name}/%{name}-%{version}%{?prerelease}.tar.gz
293d5a
293d5a
### Build Dependencies ###
293d5a
BuildRequires: openldap-devel >= %{openldap_version}
293d5a
BuildRequires: openssl-devel
293d5a
BuildRequires: cyrus-sasl-devel
293d5a
%if %{with python2}
293d5a
BuildRequires: python2-devel
293d5a
BuildRequires: python2-setuptools
293d5a
%endif #{with python2}
293d5a
BuildRequires: python3-devel
293d5a
BuildRequires: python3-setuptools
293d5a
# Test dependencies
293d5a
%if %{with python2}
293d5a
BuildRequires: python2-pytest
293d5a
BuildRequires: python2-coverage
293d5a
BuildRequires: python2-pyasn1 >= 0.3.7
293d5a
BuildRequires: python2-pyasn1-modules >= 0.1.5
293d5a
%endif #{with python2}
293d5a
BuildRequires: python3-pytest
293d5a
BuildRequires: openldap-servers >= %{openldap_version}
293d5a
BuildRequires: openldap-clients >= %{openldap_version}
293d5a
BuildRequires: python3-coverage
293d5a
BuildRequires: python3-pyasn1 >= 0.3.7
293d5a
BuildRequires: python3-pyasn1-modules >= 0.1.5
293d5a
293d5a
%global _description\
293d5a
python-ldap provides an object-oriented API for working with LDAP within\
293d5a
Python programs.  It allows access to LDAP directory servers by wrapping the\
293d5a
OpenLDAP 2.x libraries, and contains modules for other LDAP-related tasks\
293d5a
(including processing LDIF, LDAPURLs, LDAPv3 schema, etc.).
293d5a
293d5a
%description %_description
293d5a
293d5a
293d5a
%if %{with python2}
293d5a
%package -n python2-ldap
293d5a
Summary: %summary
293d5a
293d5a
Requires: openldap >= %{openldap_version}
293d5a
Requires: python2-pyasn1 >= 0.3.7
293d5a
Requires: python2-pyasn1-modules >= 0.1.5
293d5a
Requires: python2-setuptools
293d5a
293d5a
Provides: python2-ldap%{?_isa} = %{version}-%{release}
293d5a
%{?python_provide:%python_provide python2-ldap}
293d5a
293d5a
%description -n python2-ldap %_description
293d5a
%endif #{with python2}
293d5a
293d5a
293d5a
%package -n     python3-ldap
293d5a
Summary:        %{summary}
293d5a
293d5a
Requires:  openldap >= %{openldap_version}
293d5a
Requires:  python3-pyasn1 >= 0.3.7
293d5a
Requires:  python3-pyasn1-modules >= 0.1.5
293d5a
%if 0%{?rhel} && 0%{?rhel} >= 8
293d5a
Requires:  platform-python-setuptools
293d5a
%else
293d5a
Requires:  python3-setuptools
293d5a
%endif
293d5a
%{?python_provide:%python_provide python3-ldap}
293d5a
Obsoletes: python3-pyldap < 3
293d5a
Provides:  python3-pyldap = %{version}-%{release}
293d5a
Provides:  python3-pyldap%{?_isa} = %{version}-%{release}
293d5a
293d5a
%description -n python3-ldap %_description
293d5a
293d5a
293d5a
%prep
293d5a
%setup -qc
293d5a
pushd %{name}-%{version}%{?prerelease}
293d5a
popd
293d5a
293d5a
mv %{name}-%{version}%{?prerelease} python3
293d5a
cp -a python{3,2}
293d5a
293d5a
# Fix interpreter
293d5a
%if %{with python2}
293d5a
find python2 -name '*.py' | xargs sed -i '1s|^#!/usr/bin/env python|#!%{__python2}|'
293d5a
%endif #{with python2}
293d5a
find python3 -name '*.py' | xargs sed -i '1s|^#!/usr/bin/env python|#!%{__python3}|'
293d5a
293d5a
# Disable warnings in test to work around "'U' mode is deprecated"
293d5a
# https://github.com/python-ldap/python-ldap/issues/96
293d5a
sed -i 's,-Werror,-Wignore,g' python3/tox.ini
293d5a
293d5a
293d5a
%build
293d5a
%if %{with python2}
293d5a
pushd python2
293d5a
%py2_build
293d5a
popd
293d5a
%endif #%{with python2}
293d5a
pushd python3
293d5a
%py3_build
293d5a
popd
293d5a
293d5a
293d5a
%check
293d5a
%if %{with python2}
293d5a
pushd python2
293d5a
LANG=C.UTF-8 LOGLEVEL=10 \
293d5a
PYTHONPATH=%{buildroot}%{python2_sitearch} %{__python2} -m pytest
293d5a
popd
293d5a
%endif #{with python2}
293d5a
293d5a
pushd python3
293d5a
LANG=C.UTF-8 LOGLEVEL=10 \
293d5a
PYTHONPATH=%{buildroot}%{python3_sitearch} %{__python3} -m pytest
293d5a
popd
293d5a
293d5a
293d5a
%install
293d5a
%if %{with python2}
293d5a
pushd python2
293d5a
%py2_install
293d5a
popd
293d5a
%endif #{with python2}
293d5a
293d5a
pushd python3
293d5a
%py3_install
293d5a
popd
293d5a
293d5a
293d5a
%if %{with python2}
293d5a
%files -n python2-ldap
293d5a
%defattr(-,root,root,-)
293d5a
%license python2/LICENCE
293d5a
%doc python2/CHANGES python2/README python2/TODO python2/Demo
293d5a
%{python_sitearch}/_ldap.so
293d5a
%{python_sitearch}/ldapurl.py*
293d5a
%{python_sitearch}/ldif.py*
293d5a
%{python_sitearch}/slapdtest/
293d5a
%{python_sitearch}/ldap/
293d5a
%{python_sitearch}/python_ldap-%{version}%{?prerelease}-py2.7.egg-info
293d5a
%endif %#with python2}
293d5a
293d5a
%files -n python3-ldap
293d5a
%defattr(-,root,root,-)
293d5a
%license python3/LICENCE
293d5a
%doc python3/CHANGES python3/README python3/TODO python3/Demo
293d5a
%{python3_sitearch}/_ldap.cpython-*.so
293d5a
%{python3_sitearch}/ldapurl.py*
293d5a
%{python3_sitearch}/ldif.py*
293d5a
%{python3_sitearch}/__pycache__/*
293d5a
%{python3_sitearch}/slapdtest/
293d5a
%{python3_sitearch}/ldap/
293d5a
%{python3_sitearch}/python_ldap-%{version}%{?prerelease}-py%{python3_version}.egg-info
293d5a
293d5a
%changelog
293d5a
* Wed Oct 21 2020 Christian Heimes <cheimes@redhat.com> - 3.3.1-1
293d5a
- New upstream release 3.1.0
293d5a
- Reslves: rhbz#1889615
293d5a
293d5a
* Fri Nov 16 2018 Lumír Balhar <lbalhar@redhat.com> - 3.1.0-5
293d5a
- Require platform-python-setuptools instead of python3-setuptools
293d5a
- Resolves: rhbz#1650537
293d5a
293d5a
* Mon Jul 09 2018 Petr Viktorin <pviktori@redhat.com> - 3.1.0-4
293d5a
- Don't build the python2 subpackage
293d5a
  (fix for the previous commit)
293d5a
293d5a
* Wed Jun 27 2018 Petr Viktorin <pviktori@redhat.com> - 3.1.0-3
293d5a
- Conditionalize, and don't build, the python2 subpackage
293d5a
293d5a
* Wed Jun 20 2018 Petr Viktorin <pviktori@redhat.com> - 3.1.0-2
293d5a
- In %%check, use pytest directly rather than tox
293d5a
293d5a
* Fri May 25 2018 Christian Heimes <cheimes@redhat.com> - 3.1.0-1
293d5a
- New upstream release 3.1.0
293d5a
293d5a
* Wed Mar 21 2018 Christian Heimes <cheimes@redhat.com> - 3.0.0-1
293d5a
- New upstream release 3.0.0
293d5a
293d5a
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 3.0.0-0.5.b4
293d5a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
293d5a
293d5a
* Wed Jan 10 2018 Christian Heimes <cheimes@redhat.com> - 3.0.0-0.4.b4
293d5a
- New upstream release 3.0.0b4 (RHBZ #1496470)
293d5a
293d5a
* Wed Dec 20 2017 Christian Heimes <cheimes@redhat.com> - 3.0.0-0.3.b3
293d5a
- New upstream release 3.0.0b3 (RHBZ #1496470)
293d5a
293d5a
* Mon Dec 11 2017 Christian Heimes <cheimes@redhat.com> - 3.0.0-0.2.b2
293d5a
- New upstream release 3.0.0b2 (RHBZ #1496470)
293d5a
- Require OpenLDAP with fix for NSS issue (see #1520990)
293d5a
293d5a
* Mon Dec 04 2017 Christian Heimes <cheimes@redhat.com> - 0:3.0.0-0.1.b1
293d5a
- New upstream release 3.0.0b1 (RHBZ #1496470)
293d5a
- Resolves RHBZ #1489184
293d5a
- Enable unittests
293d5a
- Remove dsml module
293d5a
- Package python3-ldap, which obsoletes python3-pyldap
293d5a
293d5a
* Wed Nov 08 2017 Christian Heimes <cheimes@redhat.com> - 0:2.4.25-9
293d5a
- Fix issue in pyasn1 patch
293d5a
293d5a
* Tue Nov 07 2017 Christian Heimes <cheimes@redhat.com> - 0:2.4.25-8
293d5a
- Apply fix for pyasn1 >= 0.3
293d5a
293d5a
* Sat Aug 19 2017 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 0:2.4.25-7
293d5a
- Python 2 binary package renamed to python2-ldap
293d5a
  See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3
293d5a
293d5a
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0:2.4.25-6
293d5a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
293d5a
293d5a
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0:2.4.25-5
293d5a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
293d5a
293d5a
* Fri Jul 07 2017 Igor Gnatenko <ignatenko@redhat.com> - 0:2.4.25-4
293d5a
- Rebuild due to bug in RPM (RHBZ #1468476)
293d5a
293d5a
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0:2.4.25-3
293d5a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
293d5a
293d5a
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0:2.4.25-2
293d5a
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
293d5a
293d5a
* Wed Apr 20 2016 Petr Spacek <pspacek@redhat.com> - 2.4.25-1
293d5a
- New upstream release 2.4.25
293d5a
293d5a
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0:2.4.17-3
293d5a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
293d5a
293d5a
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0:2.4.17-2
293d5a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
293d5a
293d5a
* Mon Sep 29 2014 Petr Spacek <pspacek@redhat.com> - 0:2.4.17-1
293d5a
- New upstream release adds features required in bug 1122486
293d5a
- Dependency on pyasn1-modules was added to fix bug 995545
293d5a
293d5a
* Thu Sep 25 2014 Petr Spacek <pspacek@redhat.com> - 0:2.4.16-1
293d5a
- New upstream release fixes bug 1007820
293d5a
- Dependency on pyasn1 was added to fix bug 995545
293d5a
293d5a
* Sun Aug 17 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0:2.4.6-7
293d5a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
293d5a
293d5a
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0:2.4.6-6
293d5a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
293d5a
293d5a
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0:2.4.6-5
293d5a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
293d5a
293d5a
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0:2.4.6-4
293d5a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
293d5a
293d5a
* Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0:2.4.6-3
293d5a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
293d5a
293d5a
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0:2.4.6-2
293d5a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
293d5a
293d5a
* Mon Jan 02 2012 Jeroen van Meeuwen <vanmeeuwen@kolabsys.com> - 2.4.6-1
293d5a
- New upstream release
293d5a
293d5a
* Wed Feb 09 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0:2.3.12-2
293d5a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
293d5a
293d5a
* Fri Sep 24 2010 Parag Nemade <paragn AT fedoraproject.org> - 0:2.3.12-1
293d5a
- Merge-review cleanup (#226343)
293d5a
293d5a
* Thu Jul 22 2010 David Malcolm <dmalcolm@redhat.com> - 0:2.3.10-2
293d5a
- Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild
293d5a
293d5a
* Thu Jan 14 2010 Matthew Barnes <mbarnes@redhat.com> - 0:2.3.10-1
293d5a
- Update to 2.3.10
293d5a
- Change source URI to pypi.python.org.
293d5a
293d5a
* Fri Aug 21 2009 Tomas Mraz <tmraz@redhat.com> - 0:2.3.6-3
293d5a
- rebuilt with new openssl
293d5a
293d5a
* Sun Jul 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0:2.3.6-2
293d5a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
293d5a
293d5a
* Wed Apr 01 2009 Matthew Barnes <mbarnes@redhat.com> - 0:2.3.6-1
293d5a
- Update to 2.3.6
293d5a
293d5a
* Fri Feb 27 2009 Matthew Barnes <mbarnes@redhat.com> - 0:2.3.5-5
293d5a
- Fix a build error.
293d5a
293d5a
* Thu Feb 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0:2.3.5-4
293d5a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
293d5a
293d5a
* Fri Jan 16 2009 Tomas Mraz <tmraz@redhat.com> - 0:2.3.5-3
293d5a
- rebuild with new openssl
293d5a
293d5a
* Sat Nov 29 2008 Ignacio Vazquez-Abrams <ivazqueznet+rpm@gmail.com> - 0:2.3.5-2
293d5a
- Rebuild for Python 2.6
293d5a
293d5a
* Wed Sep  3 2008 Tom "spot" Callaway <tcallawa@redhat.com> - 0:2.3.5-1
293d5a
- fix license tag
293d5a
- update to 2.3.5
293d5a
293d5a
* Sun Feb 17 2008 Matthew Barnes <mbarnes@redhat.com> - 0:2.3.1-3.fc9
293d5a
- Rebuild with GCC 4.3
293d5a
293d5a
* Wed Dec 05 2007 Matthew Barnes <mbarnes@redhat.com> - 0:2.3.1-2.fc9
293d5a
- Rebuild against new openssl.
293d5a
293d5a
* Wed Oct 10 2007 Matthew Barnes <mbarnes@redhat.com> - 0:2.3.1-1.fc8
293d5a
- Update to 2.3.1
293d5a
293d5a
* Fri Jun 08 2007 Matthew Barnes <mbarnes@redhat.com> - 0:2.3.0-1.fc8
293d5a
- Update to 2.3
293d5a
- Spec file cleanups.
293d5a
293d5a
* Thu Dec  7 2006 Jeremy Katz <katzj@redhat.com> - 0:2.2.0-3
293d5a
- rebuild against python 2.5
293d5a
293d5a
* Wed Jul 12 2006 Jesse Keating <jkeating@redhat.com>
293d5a
- rebuild
293d5a
293d5a
* Wed May 17 2006 Matthew Barnes <mbarnes@redhat.com> - 2.2.0-2
293d5a
- Put back the epoch line... happy beehive?
293d5a
293d5a
* Mon May 15 2006 Matthew Barnes <mbarnes@redhat.com> - 2.2.0-1
293d5a
- Update to 2.2.0
293d5a
- Update python-ldap-2.0.6-rpath.patch and rename it to
293d5a
  python-ldap-2.2.0-dirs.patch.
293d5a
293d5a
* Fri Feb 10 2006 Jesse Keating <jkeating@redhat.com> - 0:2.0.6-5.2.1
293d5a
- bump again for double-long bug on ppc(64)
293d5a
293d5a
* Tue Feb 07 2006 Jesse Keating <jkeating@redhat.com> - 0:2.0.6-5.2
293d5a
- rebuilt for new gcc4.1 snapshot and glibc changes
293d5a
293d5a
* Fri Dec 09 2005 Jesse Keating <jkeating@redhat.com>
293d5a
- rebuilt
293d5a
293d5a
* Tue Nov  8 2005 Tomas Mraz <tmraz@redhat.com> - 2.0.6-5
293d5a
- rebuilt with new openssl
293d5a
293d5a
* Tue Mar 22 2005 Warren Togami <wtogami@redhat.com> - 2.0.6-4
293d5a
- add LICENCE (#150842)
293d5a
- simplify python reqs
293d5a
- remove invalid rpath
293d5a
293d5a
* Wed Mar 16 2005 Dan Williams <dcbw@redhat.com> - 0:2.0.6-2
293d5a
- rebuilt to pick up new libssl.so.5
293d5a
293d5a
* Tue Feb  8 2005 David Malcolm <dmalcolm@redhat.com> - 0:2.0.6-1
293d5a
- 2.0.6
293d5a
293d5a
* Tue Nov 16 2004 Nalin Dahyabhai <nalin@redhat.com> - 0:2.0.1-3
293d5a
- rebuild (#139161)
293d5a
293d5a
* Mon Aug 30 2004 David Malcolm <dmalcolm@redhat.com> - 0:2.0.1-2
293d5a
- Rewrote description; added requirement for openldap
293d5a
293d5a
* Tue Aug 17 2004 David Malcolm <dmalcolm@redhat.com> - 0:2.0.1-1
293d5a
- imported into Red Hat's packaging system from Fedora.us; set release to 1
293d5a
293d5a
* Wed Jun 30 2004 Panu Matilainen <pmatilai@welho.com> 0:2.0.1-0.fdr.1
293d5a
- update to 2.0.1
293d5a
293d5a
* Sun Dec 07 2003 Panu Matilainen <pmatilai@welho.com> 0:2.0.0-0.fdr.0.4.pre16
293d5a
- fix spec permissions + release tag order (bug 1099)
293d5a
293d5a
* Sat Dec  6 2003 Ville Skyttä <ville.skytta at iki.fi> 0:2.0.0-0.fdr.0.pre16.3
293d5a
- Stricter python version requirements.
293d5a
- BuildRequire openssl-devel.
293d5a
- Explicitly build *.pyo, install them as %%ghost.
293d5a
- Own more installed dirs.
293d5a
- Remove $RPM_BUILD_ROOT at start of %%install.
293d5a
293d5a
* Wed Dec 03 2003 Panu Matilainen <pmatilai@welho.com> 0:2.0.0-0.fdr.0.pre16.2
293d5a
- duh, build requires python-devel, not just python...
293d5a
293d5a
* Wed Dec 03 2003 Panu Matilainen <pmatilai@welho.com> 0:2.0.0-0.fdr.0.pre16.1
293d5a
- Initial Fedora packaging.