023db2d
# Disable the shebangs checks on scripts that currently don't
023db2d
# define a Python version. The point here is that these scripts
023db2d
# will be copied to guest VM instances, which may be running
023db2d
# operating systems that can have either Python 2 or Python 3,
023db2d
# but it's impossible to know for sure at packaging time.
023db2d
%global __brp_mangle_shebangs_exclude_from virtlab.py|jenkins.py
023db2d
023db2d
%global with_python2 1
023db2d
%if 0%{?fedora} > 30 || 0%{?rhel} > 7
023db2d
%global with_python2 0
023db2d
%endif
023db2d
023db2d
%global with_python3 0
023db2d
%if 0%{?fedora} > 30 || 0%{?rhel} > 7
023db2d
%global with_python3 1
023db2d
%endif
023db2d
023db2d
023db2d
%if %{with_python3}
023db2d
%global __python %{__python3}
023db2d
%else
023db2d
%global __python %{__python2}
023db2d
%endif
023db2d
023db2d
Summary: Python based regression tests for libvirt API
03086c1
Name: libvirt-test-API
023db2d
Version: 1.1
8ef9063
Release: 11%{?dist}
023db2d
License: GPLv2
023db2d
URL: https://github.com/libvirt/libvirt-test-API
023db2d
Source0: %{url}/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
023db2d
023db2d
023db2d
BuildRequires: mock
023db2d
023db2d
%if %{with_python3}
023db2d
BuildRequires: python3-devel
023db2d
BuildRequires: python3-lxml
023db2d
BuildRequires: python3-pytest
023db2d
BuildRequires: python3-setuptools
023db2d
BuildRequires: python3-six
023db2d
BuildRequires: python3-attrs
023db2d
BuildRequires: python3-libvirt
023db2d
BuildRequires: python3-pexpect
023db2d
023db2d
Requires: python3-six
023db2d
Requires: python3-lxml
023db2d
Requires: python3-libvirt
023db2d
023db2d
023db2d
%else
023db2d
BuildRequires: python2-devel
023db2d
BuildRequires: python2-pytest
023db2d
BuildRequires: python2-setuptools
023db2d
BuildRequires: python2-attrs
023db2d
BuildRequires: python-six
023db2d
BuildRequires: python2-pexpect
023db2d
023db2d
Requires: python-six
023db2d
Requires: python-lxml
023db2d
%endif
023db2d
023db2d
Requires: libvirt
023db2d
Requires: qemu-kvm
023db2d
Requires: qemu-img
023db2d
Requires: virt-install
023db2d
023db2d
%if 0%{?rhel} && 0%{?rhel} < 8
023db2d
Requires: libvirt-python
023db2d
%endif
023db2d
023db2d
BuildArch: noarch
023db2d
023db2d
%description
023db2d
Libvirt-test-API is designed to test the functionality of libvirt
023db2d
through Python bindings of libvirt API. It supports writing cases
023db2d
by using the Python language. It supports testing for KVM and
023db2d
Xen either paravirt (for which only Fedora and Red Hat Enterprise
023db2d
Linux guests are currently supported) as well as fully virtualized guests.
023db2d
023db2d
%package        doc
aa9e7cb
Summary:        Documentation files for libvirt-test-API
023db2d
BuildArch:      noarch
023db2d
023db2d
%description    doc
aa9e7cb
This package installs the detailed documentation of libvirt-test-API
023db2d
023db2d
%prep
023db2d
%setup -q -n %{name}-%{version}
023db2d
023db2d
%build
023db2d
%py_build
023db2d
023db2d
%install
023db2d
%py_install
023db2d
023db2d
%check
023db2d
%{__python} setup.py test
023db2d
023db2d
%files
023db2d
%doc README.md
023db2d
%license LICENSE
023db2d
%{_bindir}/%{name}
aa9e7cb
%{python_sitelib}/libvirt_test_API*
023db2d
%{python_sitelib}/libvirttestapi*
aa9e7cb
%{_datadir}/libvirt-test-API*
023db2d
023db2d
%files doc
023db2d
%license LICENSE
023db2d
%doc docs/
023db2d
023db2d
%changelog
8ef9063
* Thu Jul 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 1.1-11
8ef9063
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
8ef9063
2479fac
* Thu Jun 15 2023 Python Maint <python-maint@redhat.com> - 1.1-10
2479fac
- Rebuilt for Python 3.12
2479fac
2a267e5
* Thu Jan 19 2023 Fedora Release Engineering <releng@fedoraproject.org> - 1.1-9
2a267e5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
2a267e5
0670655
* Thu Jul 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1.1-8
0670655
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
0670655
6476717
* Wed Jun 15 2022 Python Maint <python-maint@redhat.com> - 1.1-7
6476717
- Rebuilt for Python 3.11
6476717
1397a97
* Thu Jan 20 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1.1-6
1397a97
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
1397a97
47d76bc
* Thu Jul 22 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.1-5
47d76bc
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
47d76bc
9f3a886
* Fri Jun 04 2021 Python Maint <python-maint@redhat.com> - 1.1-4
9f3a886
- Rebuilt for Python 3.10
9f3a886
5e1d4ea
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.1-3
5e1d4ea
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
5e1d4ea
eeb7611
* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.1-2
eeb7611
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
eeb7611
023db2d
* Tue Jun 16 2020 Lily Nie <lnie@redhat.com> - 1.1-1
023db2d
- add an elaborate user guide
023db2d
023db2d
* Sat Apr 18 2020 Lily Nie <lnie@redhat.com> - 1.0-1
023db2d
- New release