Blame SPECS/python-ldap.spec

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