diff --git a/python-ldap-3.1.0.tar.gz b/python-ldap-3.1.0.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..6d79ac25ff16f3329cf37e1f18f3b62f1f64c6f0 Binary files /dev/null and b/python-ldap-3.1.0.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..d1a85af518b716562012199e6e1bf5f15d6c053a 100644 --- a/python-ldap.spec +++ b/python-ldap.spec @@ -1,75 +1,154 @@ -%define debug_package %{nil} -Name: python-ldap -Version: 3.3.1 -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 - -%description +%global with_python3 0 + +Name: python-ldap +Version: 3.1.0 +Release: 1 +License: Python-2.0 +Group: System Environment/Libraries +Summary: An object-oriented API to access LDAP directory servers +URL: http://python-ldap.org/ +Source0: https://files.pythonhosted.org/packages/source/p/%{name}/%{name}-%{version}%{?prerelease}.tar.gz + +BuildRequires: openldap-devel +BuildRequires: openssl-devel +BuildRequires: cyrus-sasl-devel +BuildRequires: python2-devel +BuildRequires: python2-setuptools +BuildRequires: python2-pip +%if 0%{?with_python3} +BuildRequires: python3-devel +BuildRequires: python3-setuptools +%endif +BuildRequires: openldap-servers +BuildRequires: openldap-clients +BuildRequires: python2-coverage +BuildRequires: python2-pyasn1 >= 0.3.7 +BuildRequires: python2-pyasn1-modules >= 0.1.5 +%if 0%{?with_python3} +BuildRequires: python3-coverage +BuildRequires: python3-pyasn1 >= 0.3.7 +BuildRequires: python3-pyasn1-modules >= 0.1.5 +%endif + +%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 python2-ldap +Summary: %summary + +Requires: openldap +Requires: python2-pyasn1 >= 0.3.7 +Requires: python2-pyasn1-modules >= 0.1.5 +Requires: python2-setuptools + +Provides: python2-ldap%{?_isa} = %{version}-%{release} +%{?python_provide:%python_provide python2-ldap} + +%description -n python2-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.). +%if 0%{?with_python3} %package -n python3-ldap -Summary: An object-oriented API to access LDAP directory servers +Summary: %{summary} -Requires: openldap >= 2.4.45-4 python3-pyasn1 >= 0.3.7 -Requires: python3-pyasn1-modules >= 0.1.5 python3-setuptools +Requires: openldap +Requires: python3-pyasn1 >= 0.3.7 +Requires: python3-pyasn1-modules >= 0.1.5 +Requires: python3-setuptools %{?python_provide:%python_provide python3-ldap} -Obsoletes: python3-pyldap < 3 -Provides: python3-pyldap = %{version}-%{release} -Provides: python3-pyldap%{?_isa} = %{version}-%{release} +Obsoletes: python3-pyldap < 3 +Provides: python3-pyldap = %{version}-%{release} +Provides: python3-pyldap%{?_isa} = %{version}-%{release} %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 +%endif %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 +%setup -qc +pushd %{name}-%{version}%{?prerelease} +popd + +mv %{name}-%{version}%{?prerelease} python3 +cp -a python{3,2} + +find python2 -name '*.py' | xargs sed -i '1s|^#!/usr/bin/env python|#!%{__python2}|' +find python3 -name '*.py' | xargs sed -i '1s|^#!/usr/bin/env python|#!%{__python3}|' + +sed -i 's,-Werror,-Wignore,g' python3/tox.ini + + %build -%_bindir/python3 setup.py build '--executable=%_bindir/python3 -s' +pushd python2 +%py2_build +popd +%if 0%{?with_python3} +pushd python3 +%py3_build +popd +%endif -%install -%_bindir/python3 setup.py install -O1 --skip-build --root %buildroot %check +export PIP_INDEX_URL=http://host.invalid./ +export PIP_NO_DEPS=yes -%files -n python3-ldap -%defattr(-,root,root) -%license LICENCE -%{_libdir}/python%{python3_version}/site-packages/* +pushd python2 +LANG=C.UTF-8 python ./setup.py test +popd -%files help -%defattr(-,root,root) -%doc CHANGES README TODO Demo +%if 0%{?with_python3} +pushd python3 +LANG=C.UTF-8 python3 ./setup.py test +popd +%endif + +%install +pushd python2 +%py2_install +popd + +%if 0%{?with_python3} +pushd python3 +%py3_install +popd +%endif + + +%files -n python2-ldap +%defattr(-,root,root,-) +%license python2/LICENCE +%doc python2/CHANGES python2/README python2/TODO python2/Demo +%{python_sitearch}/_ldap.so +%{python_sitearch}/ldapurl.py* +%{python_sitearch}/ldif.py* +%{python_sitearch}/slapdtest/ +%{python_sitearch}/ldap/ +%{python_sitearch}/python_ldap-%{version}%{?prerelease}-py2.7.egg-info + +%if 0%{?with_python3} +%files -n python3-ldap +%defattr(-,root,root,-) +%license python3/LICENCE +%doc python3/CHANGES python3/README python3/TODO python3/Demo +%{python3_sitearch}/_ldap.cpython-*.so +%{python3_sitearch}/ldapurl.py* +%{python3_sitearch}/ldif.py* +%{python3_sitearch}/__pycache__/* +%{python3_sitearch}/slapdtest/ +%{python3_sitearch}/ldap/ +%{python3_sitearch}/python_ldap-%{version}%{?prerelease}-py%{python3_version}.egg-info +%endif %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 +* Thu Apr 29 2021 openstack-sig +- Package Spec generated diff --git a/python-ldap.yaml b/python-ldap.yaml deleted file mode 100644 index a0a1ce372c178acc537a856d159c36aa728825c6..0000000000000000000000000000000000000000 --- a/python-ldap.yaml +++ /dev/null @@ -1,4 +0,0 @@ -version_control: github -src_repo: python-ldap/python-ldap -tag_prefix: python-ldap- -seperator: .