2017-07-26 20:24:55 +00:00
|
|
|
#
|
|
|
|
|
# spec file for package python-libvirt-python
|
|
|
|
|
#
|
2023-01-18 22:49:59 +00:00
|
|
|
# Copyright (c) 2023 SUSE LLC
|
2017-07-26 20:24:55 +00:00
|
|
|
#
|
|
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
|
# published by the Open Source Initiative.
|
|
|
|
|
|
2018-11-05 16:30:53 +00:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2017-07-26 20:24:55 +00:00
|
|
|
#
|
|
|
|
|
|
|
|
|
|
|
2020-02-06 23:33:50 +00:00
|
|
|
# No longer build for python2. Support was dropped upstream in the 6.0.0 release
|
|
|
|
|
%define skip_python2 1
|
|
|
|
|
|
2020-10-26 19:49:07 +00:00
|
|
|
%{?!python_module:%define python_module() python3-%{**}}
|
2017-07-26 20:24:55 +00:00
|
|
|
%define srcname libvirt-python
|
2017-09-13 14:12:54 +00:00
|
|
|
Name: python-libvirt-python
|
2019-12-03 04:37:09 +00:00
|
|
|
URL: https://libvirt.org/
|
2023-03-02 00:50:31 +00:00
|
|
|
Version: 9.1.0
|
2017-07-26 20:24:55 +00:00
|
|
|
Release: 0
|
2017-10-02 21:04:50 +00:00
|
|
|
Summary: Library providing a virtualization API
|
2018-05-02 22:52:12 +00:00
|
|
|
License: LGPL-2.1-or-later
|
2017-10-02 21:04:50 +00:00
|
|
|
Group: Development/Languages/Python
|
2017-07-26 20:24:55 +00:00
|
|
|
Source0: %{srcname}-%{version}.tar.gz
|
|
|
|
|
BuildRequires: fdupes
|
2018-01-22 10:31:49 +00:00
|
|
|
BuildRequires: libvirt-devel = %{version}
|
2017-07-26 20:24:55 +00:00
|
|
|
BuildRequires: python-rpm-macros
|
|
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
|
|
|
BuildRequires: %{python_module devel}
|
2022-05-09 17:39:48 +00:00
|
|
|
BuildRequires: %{python_module lxml}
|
2020-10-26 19:49:07 +00:00
|
|
|
BuildRequires: %{python_module pytest}
|
2022-12-01 21:54:38 +00:00
|
|
|
BuildRequires: %{python_module setuptools}
|
2017-09-13 14:12:54 +00:00
|
|
|
%ifpython2
|
2017-07-26 20:24:55 +00:00
|
|
|
Provides: libvirt-python = %{version}
|
|
|
|
|
Obsoletes: libvirt-python < %{version}
|
2017-09-13 14:12:54 +00:00
|
|
|
%endif
|
2017-07-26 20:24:55 +00:00
|
|
|
|
|
|
|
|
%python_subpackages
|
|
|
|
|
|
|
|
|
|
%description
|
|
|
|
|
The python-libvirt-python package contains a module that permits applications
|
|
|
|
|
written in the Python programming language to use the interface
|
|
|
|
|
supplied by the libvirt library to use the virtualization capabilities
|
2017-10-02 21:04:50 +00:00
|
|
|
of recent versions of Linux (v2.6.20+).
|
2017-07-26 20:24:55 +00:00
|
|
|
|
|
|
|
|
%prep
|
|
|
|
|
%setup -q -n %{srcname}-%{version}
|
|
|
|
|
|
2017-11-29 17:17:08 +00:00
|
|
|
# Unset execute bit for example scripts; it can introduce spurious
|
|
|
|
|
# RPM dependencies, like /usr/bin/python which can pull in python2
|
|
|
|
|
# for the -python3 package
|
|
|
|
|
find examples -type f -exec chmod 0644 \{\} \;
|
|
|
|
|
|
2017-07-26 20:24:55 +00:00
|
|
|
%build
|
|
|
|
|
export CFLAGS="%{optflags}"
|
|
|
|
|
%python_build
|
|
|
|
|
|
|
|
|
|
%install
|
|
|
|
|
%python_install
|
|
|
|
|
%python_expand %fdupes %{buildroot}%{$python_sitearch}
|
|
|
|
|
|
2020-10-26 19:49:07 +00:00
|
|
|
%check
|
|
|
|
|
%pytest_arch
|
|
|
|
|
|
2017-07-26 20:24:55 +00:00
|
|
|
%files %{python_files}
|
2020-11-02 22:56:56 +00:00
|
|
|
%doc README COPYING COPYING.LESSER examples/
|
2020-10-26 19:49:07 +00:00
|
|
|
%{python_sitearch}/libvirt*
|
|
|
|
|
%{python_sitearch}/libvirt_python-%{version}*info
|
|
|
|
|
%pycache_only %{python_sitearch}/__pycache__/libvirt*
|
2017-07-26 20:24:55 +00:00
|
|
|
|
|
|
|
|
%changelog
|