From e9ce72e530f1df9a12575b2ea127d1f3094edcd2 Mon Sep 17 00:00:00 2001 From: Alfredo Moralejo Date: Feb 13 2019 18:16:30 +0000 Subject: Update to 2.4.0 And re-add pyhthon2 subpackages when building in CentOS7. --- diff --git a/.gitignore b/.gitignore index 03e0114..af5e232 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ /ldappool-1.0.tar.gz /ldappool-2.1.0.tar.gz +/ldappool-2.4.0.tar.gz diff --git a/python-ldappool.spec b/python-ldappool.spec index 729fd62..6925cb1 100644 --- a/python-ldappool.spec +++ b/python-ldappool.spec @@ -1,10 +1,18 @@ +%if 0%{?rhel} == 7 +%bcond_with python3 +%bcond_without python2 +%else +%bcond_with python2 +%bcond_without python3 +%endif + %global srcname ldappool Name: python-%{srcname} -Version: 2.1.0 -Release: 6%{?dist} -Url: https://github.com/mozilla-services/ldappool +Version: 2.4.0 +Release: 1%{?dist} +Url: https://github.com/openstack/ldappool Summary: A connection pool for python-ldap License: MPLv1.1 and GPLv2+ and LGPLv2+ Source: https://files.pythonhosted.org/packages/source/l/%{srcname}/%{srcname}-%{version}.tar.gz @@ -25,41 +33,90 @@ The pool has useful features like:\ %description %_description +%if 0%{?with_python2} +%package -n python2-%{srcname} +Summary: %summary +Requires: python2-ldap +Requires: python-prettytable +BuildRequires: python2-devel +BuildRequires: python-ldap +BuildRequires: python-prettytable +BuildRequires: python2-pbr +BuildRequires: python2-stestr +BuildRequires: python2-testtools +BuildRequires: python2-testresources +%{?python_provide:%python_provide python2-%{srcname}} + +%description -n python2-%{srcname} %_description +%endif + +%if 0%{?with_python3} %package -n python3-%{srcname} Summary: %summary -Requires: python3-pyldap +Requires: python3-ldap +Requires: python3-prettytable BuildRequires: python3-devel BuildRequires: python3-pyldap BuildRequires: python3-pbr +BuildRequires: python3-stestr BuildRequires: python3-testtools BuildRequires: python3-testresources -BuildRequires: python3-testrepository %{?python_provide:%python_provide python3-%{srcname}} %description -n python3-%{srcname} %_description +%endif %prep %setup -q -n %{srcname}-%{version} %build +%if 0%{?with_python3} %py3_build +%endif + +%if 0%{?with_python2} +%py2_build +%endif %install +%if 0%{?with_python3} %py3_install +%endif + +%if 0%{?with_python2} +%py2_install +%endif %check -PYTHON=python3 %{__python3} setup.py testr +%if 0%{?with_python3} +PYTHON=python3 stestr-3 run +%endif + +%if 0%{?with_python2} +PYTHON=python2 stestr-2 run +%endif # FIXME: add license files as soon as upstream adds them # https://github.com/mozilla-services/ldappool/issues/2 +%if 0%{?with_python3} %files -n python3-%{srcname} %doc README.rst %{python3_sitelib}/%{srcname} %{python3_sitelib}/%{srcname}-%{version}-py?.?.egg-info +%endif +%if 0%{?with_python2} +%files -n python2-%{srcname} +%doc README.rst +%{python2_sitelib}/%{srcname} +%{python2_sitelib}/%{srcname}-%{version}-py?.?.egg-info +%endif %changelog +* Wed Feb 13 2019 Alfredo Moralejo - 2.4.0-1 +- Update to 2.4.0 + * Sat Feb 02 2019 Fedora Release Engineering - 2.1.0-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild diff --git a/sources b/sources index 8340b01..259fe6e 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (ldappool-2.1.0.tar.gz) = a261a4a68e159a54eae51dc19ed543398a1be61d305ba3958d4dab9ed2de9787203a418e5d754cf12c503e5a4c2e8d180d609968e6407201548d4c4886526c0c +SHA512 (ldappool-2.4.0.tar.gz) = 38d9fbd317afbcb1f8bc042d13ef5121fb62a639be6e82c9c110063d03b860ad8a581ddac0a04d0f6225709d6b08cf27e53799cd236cbc21a6bd3ef2de4ecb28