c0fa7d
# -*- rpm-spec -*-
c0fa7d
c0fa7d
# This spec file assumes you are building on a Fedora or RHEL version
c0fa7d
# that's still supported by the vendor. It may work on other distros
c0fa7d
# or versions, but no effort will be made to ensure that going forward
1e9ab7
%define min_rhel 8
1e9ab7
%define min_fedora 33
c0fa7d
c0fa7d
%if (0%{?fedora} && 0%{?fedora} >= %{min_fedora}) || (0%{?rhel} && 0%{?rhel} >= %{min_rhel})
c0fa7d
    %define supported_platform 1
c0fa7d
%else
c0fa7d
    %define supported_platform 0
c0fa7d
%endif
c0fa7d
c0fa7d
Summary: The libvirt virtualization API python3 binding
c0fa7d
Name: libvirt-python
88e8a5
Version: 8.0.0
c2ec55
Release: 2%{?dist}%{?extra_release}
7c1684
Source0: https://libvirt.org/sources/python/%{name}-%{version}.tar.gz
7c1684
Url: https://libvirt.org
c0fa7d
License: LGPLv2+
c0fa7d
BuildRequires: git
c2ec55
BuildRequires: libvirt-devel >= 8.0.0-9
c0fa7d
BuildRequires: python3-devel
7c1684
BuildRequires: python3-pytest
c0fa7d
BuildRequires: python3-lxml
c0fa7d
BuildRequires: gcc
c0fa7d
c0fa7d
# Don't want provides for python shared objects
c0fa7d
%{?filter_provides_in: %filter_provides_in %{python3_sitearch}/.*\.so}
c0fa7d
%{?filter_setup}
c0fa7d
c0fa7d
%description
c0fa7d
The libvirt-python package contains a module that permits applications
c0fa7d
written in the Python programming language to use the interface
c0fa7d
supplied by the libvirt library to use the virtualization capabilities
c0fa7d
of recent versions of Linux (and other OSes).
c0fa7d
c0fa7d
%package -n python3-libvirt
c0fa7d
Summary: The libvirt virtualization API python3 binding
c0fa7d
Url: http://libvirt.org
c0fa7d
License: LGPLv2+
c0fa7d
%{?python_provide:%python_provide python3-libvirt}
c0fa7d
Provides: libvirt-python3 = %{version}-%{release}
c0fa7d
Obsoletes: libvirt-python3 <= 3.6.0-1%{?dist}
c0fa7d
c0fa7d
%description -n python3-libvirt
c0fa7d
The python3-libvirt package contains a module that permits applications
c0fa7d
written in the Python 3.x programming language to use the interface
c0fa7d
supplied by the libvirt library to use the virtualization capabilities
c0fa7d
of recent versions of Linux (and other OSes).
c0fa7d
c0fa7d
%prep
c0fa7d
%autosetup -S git_am -N
c0fa7d
c0fa7d
git config gc.auto 0
c0fa7d
c0fa7d
%autopatch
c0fa7d
c0fa7d
c0fa7d
# Unset execute bit for example scripts; it can introduce spurious
c0fa7d
# RPM dependencies, like /usr/bin/python3
c0fa7d
# for the -python3 package
c0fa7d
find examples -type f -exec chmod 0644 \{\} \;
c0fa7d
c0fa7d
%build
c0fa7d
%if ! %{supported_platform}
c0fa7d
echo "This RPM requires either Fedora >= %{min_fedora} or RHEL >= %{min_rhel}"
c0fa7d
exit 1
c0fa7d
%endif
c0fa7d
c0fa7d
%py3_build
c0fa7d
c0fa7d
%install
c0fa7d
%py3_install
c0fa7d
c0fa7d
%check
c0fa7d
%{__python3} setup.py test
c0fa7d
c0fa7d
%files -n python3-libvirt
7c1684
%doc ChangeLog AUTHORS README COPYING COPYING.LESSER examples/
c0fa7d
%{python3_sitearch}/libvirt.py*
c0fa7d
%{python3_sitearch}/libvirtaio.py*
c0fa7d
%{python3_sitearch}/libvirt_qemu.py*
c0fa7d
%{python3_sitearch}/libvirt_lxc.py*
c0fa7d
%{python3_sitearch}/__pycache__/libvirt.cpython-*.py*
c0fa7d
%{python3_sitearch}/__pycache__/libvirt_qemu.cpython-*.py*
c0fa7d
%{python3_sitearch}/__pycache__/libvirt_lxc.cpython-*.py*
c0fa7d
%{python3_sitearch}/__pycache__/libvirtaio.cpython-*.py*
c0fa7d
%{python3_sitearch}/libvirtmod*
c0fa7d
%{python3_sitearch}/*egg-info
c0fa7d
c0fa7d
%changelog
c2ec55
* Thu Jun 30 2022 Jiri Denemark <jdenemar@redhat.com> - 8.0.0-2
c2ec55
- [RFE] RFE backport allow enabling ZEROCOPY live migration to libvirt-python on RHEL8 to be consumed by VDSM (rhbz#2092756)
c2ec55
88e8a5
* Fri Jan 14 2022 Jiri Denemark <jdenemar@redhat.com> - 8.0.0-1
88e8a5
- Rebased to libvirt-python-8.0.0 (rhbz#2012806)
88e8a5
185102
* Fri Dec  3 2021 Jiri Denemark <jdenemar@redhat.com> - 7.10.0-1
185102
- Rebased to libvirt-python-7.10.0 (rhbz#2012806)
185102
47c20a
* Thu Nov  4 2021 Jiri Denemark <jdenemar@redhat.com> - 7.9.0-1
47c20a
- Rebased to libvirt-python-7.9.0 (rhbz#2012806)
47c20a
1e9ab7
* Wed Oct 20 2021 Jiri Denemark <jdenemar@redhat.com> - 7.8.0-1
1e9ab7
- Rebased to libvirt-python-7.8.0 (rhbz#2012806)
1e9ab7
7c1684
* Thu Sep 2 2021 Danilo C. L. de Paula <ddepaula@redhat.com> - 7.6.0-1.el8
7c1684
- Resolves: bz#2000225
7c1684
  (Rebase virt:rhel module:stream based on AV-8.6)
7c1684
c0fa7d
* Mon Apr 27 2020 Danilo C. L. de Paula <ddepaula@redhat.com> - 6.0.0
c0fa7d
- Resolves: bz#1810193
c0fa7d
  (Upgrade components in virt:rhel module:stream for RHEL-8.3 release)
c0fa7d
c0fa7d
* Fri Jun 28 2019 Danilo de Paula <ddepaula@redhat.com> - 4.5.0-2
c0fa7d
- Rebuild all virt packages to fix RHEL's upgrade path
c0fa7d
- Resolves: rhbz#1695587
c0fa7d
  (Ensure modular RPM upgrade path)
c0fa7d
c0fa7d
* Tue Jul  3 2018 Jiri Denemark <jdenemar@redhat.com> - 4.5.0-1
c0fa7d
- Rebased to libvirt-python-4.5.0
c0fa7d
c0fa7d
* Fri May 25 2018 Jiri Denemark <jdenemar@redhat.com> - 4.3.0-1
c0fa7d
- Rebased to libvirt-python-4.3.0
c0fa7d
c0fa7d
* Mon Mar  5 2018 Daniel P. Berrange <berrange@redhat.com> - 4.1.0-1
c0fa7d
- Update to 4.1.0 release
c0fa7d
c0fa7d
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 4.0.0-2
c0fa7d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
c0fa7d
c0fa7d
* Fri Jan 19 2018 Daniel P. Berrange <berrange@redhat.com> - 4.0.0-1
c0fa7d
- Update to 4.0.0 release
c0fa7d
c0fa7d
* Tue Dec  5 2017 Daniel P. Berrange <berrange@redhat.com> - 3.10.0-1
c0fa7d
- Update to 3.10.0 release
c0fa7d
c0fa7d
* Fri Nov  3 2017 Daniel P. Berrange <berrange@redhat.com> - 3.9.0-1
c0fa7d
- Update to 3.9.0 release
c0fa7d
c0fa7d
* Wed Oct  4 2017 Daniel P. Berrange <berrange@redhat.com> - 3.8.0-1
c0fa7d
- Update to 3.8.0 release
c0fa7d
c0fa7d
* Mon Sep  4 2017 Daniel P. Berrange <berrange@redhat.com> - 3.7.0-1
c0fa7d
- Update to 3.7.0 release
c0fa7d
c0fa7d
* Fri Aug 11 2017 Daniel P. Berrange <berrange@redhat.com> - 3.6.0-2
c0fa7d
- Rename sub-RPMs to python2-libvirt & python3-libvirt
c0fa7d
- Re-add py3 conditionals for benefit of RHEL/CentOS builds
c0fa7d
c0fa7d
* Thu Aug 10 2017 Daniel P. Berrange <berrange@redhat.com> - 3.6.0-1
c0fa7d
- Update to 3.6.0 release
c0fa7d
- Always build py3 package
c0fa7d
c0fa7d
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 3.5.0-4
c0fa7d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
c0fa7d
c0fa7d
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 3.5.0-3
c0fa7d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
c0fa7d
c0fa7d
* Fri Jul 07 2017 Igor Gnatenko <ignatenko@redhat.com> - 3.5.0-2
c0fa7d
- Rebuild due to bug in RPM (RHBZ #1468476)
c0fa7d
c0fa7d
* Thu Jul  6 2017 Daniel P. Berrange <berrange@redhat.com> - 3.5.0-1
c0fa7d
- Update to 3.5.0 release
c0fa7d
c0fa7d
* Mon Jun  5 2017 Daniel P. Berrange <berrange@redhat.com> - 3.4.0-1
c0fa7d
- Update to 3.4.0 release
c0fa7d
c0fa7d
* Mon May  8 2017 Daniel P. Berrange <berrange@redhat.com> - 3.3.0-1
c0fa7d
- Update to 3.3.0 release
c0fa7d
c0fa7d
* Mon Apr  3 2017 Daniel P. Berrange <berrange@redhat.com> - 3.2.0-1
c0fa7d
- Update to 3.2.0 release
c0fa7d
c0fa7d
* Fri Mar  3 2017 Daniel P. Berrange <berrange@redhat.com> - 3.1.0-1
c0fa7d
- Update to 3.1.0 release
c0fa7d
c0fa7d
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 3.0.0-2
c0fa7d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
c0fa7d
c0fa7d
* Thu Jan 19 2017 Daniel P. Berrange <berrange@redhat.com> - 3.0.0-1
c0fa7d
- Update to 3.0.0 release