%global srcname avocado Name: python-%{srcname} Version: 43.0 Release: 1%{?dist} Summary: Framework with tools and libraries for Automated Testing Group: Development/Tools License: GPLv2 URL: http://avocado-framework.github.io/ Source0: https://github.com/avocado-framework/%{srcname}/archive/%{version}.tar.gz#/%{srcname}-%{version}.tar.gz Patch1: python-avocado-43.0-selftest.patch BuildArch: noarch BuildRequires: python2-devel, python-setuptools, python-docutils, python-mock, python-psutil, python-sphinx, python-requests, python-aexpect, pystache, yum, python-stevedore, python-lxml, perl-Test-Harness, fabric, python-flexmock %if 0%{?el6} BuildRequires: PyYAML BuildRequires: python-argparse, python-importlib, python-logutils, python-unittest2, procps %else BuildRequires: python-yaml, procps-ng %endif %if 0%{?fedora} >= 25 BuildRequires: kmod %endif %if 0%{?rhel} >= 7 BuildRequires: kmod %endif %description Avocado is a set of tools and libraries (what people call these days a framework) to perform automated testing. %package -n python2-%{srcname} Summary: %{summary} %{?python_provide:%python_provide python2-%{srcname}} Requires: python, python-requests, fabric, pyliblzma, libvirt-python, pystache, gdb, gdb-gdbserver, python-stevedore, python-aexpect %if 0%{?el6} Requires: PyYAML Requires: python-argparse, python-importlib, python-logutils, python-unittest2, procps %else Requires: python-yaml, procps-ng %endif %description -n python2-%{srcname} Avocado is a set of tools and libraries (what people call these days a framework) to perform automated testing. %package -n python2-%{srcname}-plugins-output-html Summary: Avocado HTML report plugin %{?python_provide:%python_provide python2-%{srcname}-plugins-output-html} Requires: python2-%{srcname} == %{version}, pystache %description -n python2-%{srcname}-plugins-output-html Adds to avocado the ability to generate an HTML report at every job results directory. It also gives the user the ability to write a report on an arbitrary filesystem location. %package -n python-%{srcname}-examples Summary: Avocado Test Framework Example Tests %{?python_provide:%python_provide python-%{srcname}-examples} Requires: python-%{srcname} == %{version} %description -n python-%{srcname}-examples The set of example tests present in the upstream tree of the Avocado framework. Some of them are used as functional tests of the framework, others serve as examples of how to write tests on your own. %prep %setup -q -n %{srcname}-%{version} %patch1 -p1 %build %{__python2} setup.py build cd optional_plugins/html %{__python2} setup.py build cd ../../ %{__make} man %install %{__python2} setup.py install --root %{buildroot} --skip-build cd optional_plugins/html %{__python2} setup.py install --root %{buildroot} --skip-build cd ../../ %{__mkdir} -p %{buildroot}%{_mandir}/man1 %{__install} -m 0644 man/avocado.1 %{buildroot}%{_mandir}/man1/avocado.1 %{__install} -m 0644 man/avocado-rest-client.1 %{buildroot}%{_mandir}/man1/avocado-rest-client.1 %check selftests/run %files -n python2-%{srcname} %license LICENSE %doc README.rst %dir /etc/avocado %dir /etc/avocado/conf.d %dir /etc/avocado/sysinfo %dir /etc/avocado/scripts/job/pre.d %dir /etc/avocado/scripts/job/post.d %config(noreplace)/etc/avocado/avocado.conf %config(noreplace)/etc/avocado/conf.d/README %config(noreplace)/etc/avocado/conf.d/gdb.conf %config(noreplace)/etc/avocado/sysinfo/commands %config(noreplace)/etc/avocado/sysinfo/files %config(noreplace)/etc/avocado/sysinfo/profilers %config(noreplace)/etc/avocado/scripts/job/pre.d/README %config(noreplace)/etc/avocado/scripts/job/post.d/README %{python2_sitelib}/avocado/ %{python2_sitelib}/avocado_framework-%{version}-py%{python2_version}.egg-info %{_bindir}/avocado %{_bindir}/avocado-rest-client %{_mandir}/man1/avocado.1.gz %{_mandir}/man1/avocado-rest-client.1.gz %{_docdir}/avocado/avocado.rst %{_docdir}/avocado/avocado-rest-client.rst %exclude %{python2_sitelib}/avocado_result_html* %{_libexecdir}/avocado/avocado-bash-utils %{_libexecdir}/avocado/avocado_debug %{_libexecdir}/avocado/avocado_error %{_libexecdir}/avocado/avocado_info %{_libexecdir}/avocado/avocado_warn %files -n python2-%{srcname}-plugins-output-html %{python2_sitelib}/avocado_result_html/ %{python2_sitelib}/avocado_result_html-43.0-py2.7.egg-info %files -n python-%{srcname}-examples %{_datadir}/avocado/tests %{_datadir}/avocado/wrappers %changelog * Mon Nov 14 2016 Merlin Mathesius - 43.0-1 - Initial packaging for Fedora.