| |
@@ -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 @@
|
| |
|
| |
%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 <amoralej@redhat.com> - 2.4.0-1
|
| |
+ - Update to 2.4.0
|
| |
+
|
| |
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2.1.0-6
|
| |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
|
| |
|
| |
And re-add pyhthon2 subpackages when building in CentOS7.