Conditionalize python2 dependencies for cross-release compatibility of SPEC

This commit is contained in:
Merlin Mathesius 2018-06-05 08:26:58 -05:00
commit 1087f35c47

View file

@ -34,7 +34,7 @@
Name: python-%{pkgname}
Version: 52.1
Release: 4%{?gitrel}%{?dist}
Release: 5%{?gitrel}%{?dist}
Summary: Framework with tools and libraries for Automated Testing
Group: Development/Tools
# Found licenses:
@ -53,15 +53,21 @@ Source0: https://github.com/avocado-framework/%{srcname}/archive/%{commit}.tar.g
Patch0: avocado-selftest-doublefree-disable.patch
Patch1: avocado-selftest-fix-cmdline-check.patch
BuildArch: noarch
BuildRequires: python2-pystache
BuildRequires: python2-aexpect
BuildRequires: python2-devel
BuildRequires: python2-docutils
BuildRequires: python2-flexmock
BuildRequires: python2-lxml
BuildRequires: python2-mock
BuildRequires: python2-resultsdb_api
%if 0%{?fedora} > 27 || 0%{?rhel} > 7
BuildRequires: python2-flexmock
BuildRequires: python2-lxml
BuildRequires: python2-pystache
%else
BuildRequires: python-flexmock
BuildRequires: python-lxml
BuildRequires: pystache
%endif
%if 0%{?fedora} >= 29
BuildRequires: python2-fabric3
%else
@ -69,8 +75,12 @@ BuildRequires: fabric
%endif
%if 0%{?with_tests}
BuildRequires: python2-libvirt
BuildRequires: perl(TAP::Parser)
%if 0%{?fedora} >= 27 || 0%{?rhel} >= 7
BuildRequires: python2-libvirt
%else
BuildRequires: libvirt-python
%endif
%if 0%{?rhel} && 0%{?rhel} <= 7
BuildRequires: python-yaml
%else
@ -127,9 +137,13 @@ License: GPLv2 and MIT
Requires: gdb
Requires: gdb-gdbserver
Requires: pyliblzma
Requires: python2-pystache
Requires: python2
%if 0%{?fedora} > 27 || 0%{?rhel} > 7
Requires: python2-pystache
%else
Requires: pystache
%endif
%if 0%{?fedora} >= 29
Requires: python2-fabric3
%else
@ -164,7 +178,12 @@ these days a framework) to perform automated testing.
Summary: Avocado HTML report plugin
%{?python_provide:%python_provide python2-%{pkgname}-plugins-output-html}
Requires: python2-%{pkgname} == %{version}-%{release}
%if 0%{?fedora} > 27 || 0%{?rhel} > 7
Requires: python2-pystache
%else
Requires: pystache
%endif
%description -n python2-%{pkgname}-plugins-output-html
Adds to avocado the ability to generate an HTML report at every job results
@ -195,7 +214,11 @@ Summary: Avocado Runner for libvirt VM Execution
%{?python_provide:%python_provide python2-%{pkgname}-plugins-runner-vm}
Requires: python2-%{pkgname} == %{version}-%{release}
Requires: python2-%{pkgname}-plugins-runner-remote == %{version}-%{release}
%if 0%{?fedora} >= 27 || 0%{?rhel} >= 7
Requires: python2-libvirt
%else
Requires: libvirt-python
%endif
%description -n python2-%{pkgname}-plugins-runner-vm
Allows Avocado to run jobs on a libvirt based VM, by means of
@ -436,6 +459,9 @@ find %{buildroot}%{_docdir}/avocado -type f -name '*.py' -exec %{__chmod} -c -x
%changelog
* Mon Jun 04 2018 Merlin Mathesius <mmathesi@redhat.com> - 52.1-5
- Conditionalize python2 dependencies for cross-release compatibility of SPEC
* Mon May 14 2018 Merlin Mathesius <mmathesi@redhat.com> - 52.1-4
- Dependency fabric has been renamed to python2-fabric3