diff --git a/python-ldap-2.4.15.tar.gz b/python-ldap-2.4.15.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..5a113f7a7cc9b72c07de559065720d93583c640e Binary files /dev/null and b/python-ldap-2.4.15.tar.gz differ diff --git a/python-ldap-3.3.1.tar.gz b/python-ldap-3.3.1.tar.gz deleted file mode 100644 index 8ab0ba71aaadda0d800b56c89ef2ed5eacd53f2c..0000000000000000000000000000000000000000 Binary files a/python-ldap-3.3.1.tar.gz and /dev/null differ diff --git a/python-ldap.spec b/python-ldap.spec index 5fd5401e873ab5c9973f6a6b78c387a26a731d2d..888d2ef9a9f26a3303c594a54d4f77111384c36e 100644 --- a/python-ldap.spec +++ b/python-ldap.spec @@ -1,75 +1,84 @@ -%define debug_package %{nil} -Name: python-ldap -Version: 3.3.1 +%global _empty_manifest_terminate_build 0 +Name: python-ldap +Version: 2.4.15 Release: 1 -Summary: An object-oriented API to access LDAP directory servers -License: Python -URL: http://python-ldap.org/ -Source0: https://files.pythonhosted.org/packages/source/p/%{name}/%{name}-%{version}.tar.gz - -BuildRequires: gcc openldap-devel openssl-devel cyrus-sasl-devel -BuildRequires: python3-devel python3-setuptools openldap-servers - +Summary: Python modules for implementing LDAP clients +License: Python-2.0 +URL: http://www.python-ldap.org/ +Source0: https://files.pythonhosted.org/packages/d5/01/2bedaa76dfd1b7df4a236b4f49ec43a9084fcd977492e99ef5e7d9498e37/python-ldap-2.4.15.tar.gz %description -python-ldap provides an object-oriented API for working with LDAP within\ -Python programs. It allows access to LDAP directory servers by wrapping the\ -OpenLDAP 2.x libraries, and contains modules for other LDAP-related tasks\ -(including processing LDIF, LDAPURLs, LDAPv3 schema, etc.). - -%package -n python3-ldap -Summary: An object-oriented API to access LDAP directory servers +python-ldap: + python-ldap provides an object-oriented API to access LDAP directory servers + from Python programs. Mainly it wraps the OpenLDAP 2.x libs for that purpose. + Additionally the package contains modules for other LDAP-related stuff + (e.g. processing LDIF, LDAPURLs, LDAPv3 schema, LDAPv3 extended operations + and controls, etc.). -Requires: openldap >= 2.4.45-4 python3-pyasn1 >= 0.3.7 -Requires: python3-pyasn1-modules >= 0.1.5 python3-setuptools -%{?python_provide:%python_provide python3-ldap} -Obsoletes: python3-pyldap < 3 -Provides: python3-pyldap = %{version}-%{release} -Provides: python3-pyldap%{?_isa} = %{version}-%{release} +%package -n python2-ldap +Summary: Python modules for implementing LDAP clients +Provides: python2-ldap +BuildRequires: python2-devel +BuildRequires: python2-setuptools +BuildRequires: openldap-devel +%description -n python2-ldap +python-ldap: + python-ldap provides an object-oriented API to access LDAP directory servers + from Python programs. Mainly it wraps the OpenLDAP 2.x libs for that purpose. + Additionally the package contains modules for other LDAP-related stuff + (e.g. processing LDIF, LDAPURLs, LDAPv3 schema, LDAPv3 extended operations + and controls, etc.). -%description -n python3-ldap -python-ldap provides an object-oriented API for working with LDAP within\ -Python programs. It allows access to LDAP directory servers by wrapping the\ -OpenLDAP 2.x libraries, and contains modules for other LDAP-related tasks\ -(including processing LDIF, LDAPURLs, LDAPv3 schema, etc.). - -%package_help +%package help +Summary: Development documents and examples for python-ldap +Provides: python2-ldap-doc +%description help +python-ldap: + python-ldap provides an object-oriented API to access LDAP directory servers + from Python programs. Mainly it wraps the OpenLDAP 2.x libs for that purpose. + Additionally the package contains modules for other LDAP-related stuff + (e.g. processing LDIF, LDAPURLs, LDAPv3 schema, LDAPv3 extended operations + and controls, etc.). %prep -%autosetup -n %{name}-%{version} -find . -name '*.py' | xargs sed -i '1s|^#!/usr/bin/env python|#!%{__python3}|' -sed -i 's,-Werror,-Wignore,g' tox.ini +%autosetup -n python-ldap-2.4.15 + %build -%_bindir/python3 setup.py build '--executable=%_bindir/python3 -s' +%py2_build %install -%_bindir/python3 setup.py install -O1 --skip-build --root %buildroot +%py2_install +install -d -m755 %{buildroot}/%{_pkgdocdir} +if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi +if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi +if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi +if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi +pushd %{buildroot} +if [ -d usr/lib ]; then + find usr/lib -type f -printf "/%h/%f\n" >> filelist.lst +fi +if [ -d usr/lib64 ]; then + find usr/lib64 -type f -printf "/%h/%f\n" >> filelist.lst +fi +if [ -d usr/bin ]; then + find usr/bin -type f -printf "/%h/%f\n" >> filelist.lst +fi +if [ -d usr/sbin ]; then + find usr/sbin -type f -printf "/%h/%f\n" >> filelist.lst +fi +touch doclist.lst +if [ -d usr/share/man ]; then + find usr/share/man -type f -printf "/%h/%f.gz\n" >> doclist.lst +fi +popd +mv %{buildroot}/filelist.lst . +mv %{buildroot}/doclist.lst . %check +%files -n python2-ldap -f filelist.lst -%files -n python3-ldap -%defattr(-,root,root) -%license LICENCE -%{_libdir}/python%{python3_version}/site-packages/* - -%files help -%defattr(-,root,root) -%doc CHANGES README TODO Demo +%files help -f doclist.lst +%{_docdir}/* %changelog -* Tue Feb 02 2021 xihaochen - 3.3.1-1 -- Type:requirements -- Id:NA -- SUG:NA -- DESC:update python-ldap to 3.3.1 - -* Wed Oct 14 2020 shixuantong - 3.1.0-4 -- delete useless buildrequires - -* Tue Jun 23 2020 wangchong - 3.1.0-3 -- replace numbers with macros - -* Mon Jun 22 2020 wangchong - 3.1.0-2 -- fix the build error - -* Tue Feb 11 2020 huzunhao - 3.1.0-1 -- Package init +* Wed May 12 2021 openstack-sig +- Package Spec generated