From d5f6a8578dca4cd2de210f3019d41cb3c3277941 Mon Sep 17 00:00:00 2001 From: Lily Nie Date: Jul 05 2020 07:44:19 +0000 Subject: rename the spec file --- diff --git a/libvirt-test-API.spec b/libvirt-test-API.spec new file mode 100644 index 0000000..433d5bb --- /dev/null +++ b/libvirt-test-API.spec @@ -0,0 +1,117 @@ +# Disable the shebangs checks on scripts that currently don't +# define a Python version. The point here is that these scripts +# will be copied to guest VM instances, which may be running +# operating systems that can have either Python 2 or Python 3, +# but it's impossible to know for sure at packaging time. +%global __brp_mangle_shebangs_exclude_from virtlab.py|jenkins.py + +%global with_python2 1 +%if 0%{?fedora} > 30 || 0%{?rhel} > 7 +%global with_python2 0 +%endif + +%global with_python3 0 +%if 0%{?fedora} > 30 || 0%{?rhel} > 7 +%global with_python3 1 +%endif + + +%if %{with_python3} +%global __python %{__python3} +%else +%global __python %{__python2} +%endif + +Summary: Python based regression tests for libvirt API +Name: libvirt-test-api +Version: 1.1 +Release: 1%{?dist} +License: GPLv2 +URL: https://github.com/libvirt/libvirt-test-API +Source0: %{url}/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz + + +BuildRequires: mock + +%if %{with_python3} +BuildRequires: python3-devel +BuildRequires: python3-lxml +BuildRequires: python3-pytest +BuildRequires: python3-setuptools +BuildRequires: python3-six +BuildRequires: python3-attrs +BuildRequires: python3-libvirt +BuildRequires: python3-pexpect + +Requires: python3-six +Requires: python3-lxml +Requires: python3-libvirt + + +%else +BuildRequires: python2-devel +BuildRequires: python2-pytest +BuildRequires: python2-setuptools +BuildRequires: python2-attrs +BuildRequires: python-six +BuildRequires: python2-pexpect + +Requires: python-six +Requires: python-lxml +%endif + +Requires: libvirt +Requires: qemu-kvm +Requires: qemu-img +Requires: virt-install + +%if 0%{?rhel} && 0%{?rhel} < 8 +Requires: libvirt-python +%endif + +BuildArch: noarch + +%description +Libvirt-test-API is designed to test the functionality of libvirt +through Python bindings of libvirt API. It supports writing cases +by using the Python language. It supports testing for KVM and +Xen either paravirt (for which only Fedora and Red Hat Enterprise +Linux guests are currently supported) as well as fully virtualized guests. + +%package doc +Summary: Documentation files for libvirt-test-api +BuildArch: noarch + +%description doc +This package installs the detailed documentation of libvirt-test-api + +%prep +%setup -q -n %{name}-%{version} + +%build +%py_build + +%install +%py_install + +%check +%{__python} setup.py test + +%files +%doc README.md +%license LICENSE +%{_bindir}/%{name} +%{python_sitelib}/libvirt_test_api* +%{python_sitelib}/libvirttestapi* +%{_datadir}/libvirt-test-api* + +%files doc +%license LICENSE +%doc docs/ + +%changelog +* Tue Jun 16 2020 Lily Nie - 1.1-1 +- add an elaborate user guide + +* Sat Apr 18 2020 Lily Nie - 1.0-1 +- New release diff --git a/libvirt-test-api.spec b/libvirt-test-api.spec deleted file mode 100644 index 433d5bb..0000000 --- a/libvirt-test-api.spec +++ /dev/null @@ -1,117 +0,0 @@ -# Disable the shebangs checks on scripts that currently don't -# define a Python version. The point here is that these scripts -# will be copied to guest VM instances, which may be running -# operating systems that can have either Python 2 or Python 3, -# but it's impossible to know for sure at packaging time. -%global __brp_mangle_shebangs_exclude_from virtlab.py|jenkins.py - -%global with_python2 1 -%if 0%{?fedora} > 30 || 0%{?rhel} > 7 -%global with_python2 0 -%endif - -%global with_python3 0 -%if 0%{?fedora} > 30 || 0%{?rhel} > 7 -%global with_python3 1 -%endif - - -%if %{with_python3} -%global __python %{__python3} -%else -%global __python %{__python2} -%endif - -Summary: Python based regression tests for libvirt API -Name: libvirt-test-api -Version: 1.1 -Release: 1%{?dist} -License: GPLv2 -URL: https://github.com/libvirt/libvirt-test-API -Source0: %{url}/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz - - -BuildRequires: mock - -%if %{with_python3} -BuildRequires: python3-devel -BuildRequires: python3-lxml -BuildRequires: python3-pytest -BuildRequires: python3-setuptools -BuildRequires: python3-six -BuildRequires: python3-attrs -BuildRequires: python3-libvirt -BuildRequires: python3-pexpect - -Requires: python3-six -Requires: python3-lxml -Requires: python3-libvirt - - -%else -BuildRequires: python2-devel -BuildRequires: python2-pytest -BuildRequires: python2-setuptools -BuildRequires: python2-attrs -BuildRequires: python-six -BuildRequires: python2-pexpect - -Requires: python-six -Requires: python-lxml -%endif - -Requires: libvirt -Requires: qemu-kvm -Requires: qemu-img -Requires: virt-install - -%if 0%{?rhel} && 0%{?rhel} < 8 -Requires: libvirt-python -%endif - -BuildArch: noarch - -%description -Libvirt-test-API is designed to test the functionality of libvirt -through Python bindings of libvirt API. It supports writing cases -by using the Python language. It supports testing for KVM and -Xen either paravirt (for which only Fedora and Red Hat Enterprise -Linux guests are currently supported) as well as fully virtualized guests. - -%package doc -Summary: Documentation files for libvirt-test-api -BuildArch: noarch - -%description doc -This package installs the detailed documentation of libvirt-test-api - -%prep -%setup -q -n %{name}-%{version} - -%build -%py_build - -%install -%py_install - -%check -%{__python} setup.py test - -%files -%doc README.md -%license LICENSE -%{_bindir}/%{name} -%{python_sitelib}/libvirt_test_api* -%{python_sitelib}/libvirttestapi* -%{_datadir}/libvirt-test-api* - -%files doc -%license LICENSE -%doc docs/ - -%changelog -* Tue Jun 16 2020 Lily Nie - 1.1-1 -- add an elaborate user guide - -* Sat Apr 18 2020 Lily Nie - 1.0-1 -- New release diff --git a/sources b/sources index fa5d2e2..0fa6022 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (libvirt-test-api-1.1.tar.gz) = 182c2ed3a2b29c672b5436ac6367024e28b0e80db4900500ea059bdd66da8757696a8891e4275a01957a6335e66288356ea22a4eeab03a68e7f37735f150ff8c +SHA512 (libvirt-test-api-1.1.tar.gz) = ff488df97196937d2a6a159b6593d7b8be20fa0fc84da1f92361b23ffbb030d70212f508b10debc3772d41593a9ab76ecf2f70272751eb26c416c1989f112190