3 # This spec file assumes you are building on a Fedora or RHEL version
4 # that's still supported by the vendor. It may work on other distros
5 # or versions, but no effort will be made to ensure that going forward
9 %if (0%{?fedora} && 0%{?fedora} >= %{min_fedora}) || (0%{?rhel} && 0%{?rhel} >= %{min_rhel})
10 %define supported_platform
1
12 %define supported_platform
0
15 Summary: The libvirt virtualization API python3 binding
19 Source0: https
://libvirt.org
/sources
/python
/%{name}-%{version}.tar.gz
20 Url
: https
://libvirt.org
21 License: LGPL
-2.1-or
-later
22 BuildRequires
: libvirt
-devel
== %{version}
23 BuildRequires
: python3
-devel
24 BuildRequires
: python3
-pytest
25 BuildRequires
: python3
-lxml
26 BuildRequires
: python3
-setuptools
29 # Don't want provides for python shared objects
30 %{?filter_provides_in: %filter_provides_in %{python3_sitearch}/.*\.so}
34 The libvirt
-python package contains a module that permits applications
35 written
in the Python programming language to use the interface
36 supplied by the libvirt library to use the virtualization capabilities
37 of recent versions of Linux
(and other OSes
).
39 %package -n python3
-libvirt
40 Summary: The libvirt virtualization API python3 binding
41 Url
: http
://libvirt.org
43 %{?python_provide:%python_provide python3-libvirt}
44 Provides: libvirt
-python3
= %{version}-%{release}
45 Obsoletes
: libvirt
-python3
<= 3.6.0-1%{?dist}
47 %description -n python3
-libvirt
48 The python3
-libvirt package contains a module that permits applications
49 written
in the Python
3.x programming language to use the interface
50 supplied by the libvirt library to use the virtualization capabilities
51 of recent versions of Linux
(and other OSes
).
56 # Unset execute bit for example scripts; it can introduce spurious
57 # RPM dependencies, like /usr/bin/python3
58 # for the -python3 package
59 find examples
-type f
-exec chmod
0644 \
{\
} \
;
62 %if ! %{supported_platform}
63 echo "This RPM requires either Fedora
>= %{min_fedora} or RHEL >= %{min_rhel}"
75 %files -n python3
-libvirt
76 %doc ChangeLog AUTHORS README COPYING examples
/
77 %{python3_sitearch}/libvirt.py
*
78 %{python3_sitearch}/libvirtaio.py
*
79 %{python3_sitearch}/libvirt_qemu.py
*
80 %{python3_sitearch}/libvirt_lxc.py
*
81 %{python3_sitearch}/__pycache__
/libvirt.cpython
-*.py
*
82 %{python3_sitearch}/__pycache__
/libvirt_qemu.cpython
-*.py
*
83 %{python3_sitearch}/__pycache__
/libvirt_lxc.cpython
-*.py
*
84 %{python3_sitearch}/__pycache__
/libvirtaio.cpython
-*.py
*
85 %{python3_sitearch}/libvirtmod
*
86 %{python3_sitearch}/*egg
-info