7edd2b
# -*- rpm-spec -*-
7edd2b
7edd2b
# This spec file assumes you are building on a Fedora or RHEL version
7edd2b
# that's still supported by the vendor. It may work on other distros
7edd2b
# or versions, but no effort will be made to ensure that going forward
7edd2b
%define min_rhel 8
7edd2b
%define min_fedora 33
7edd2b
7edd2b
%if (0%{?fedora} && 0%{?fedora} >= %{min_fedora}) || (0%{?rhel} && 0%{?rhel} >= %{min_rhel})
7edd2b
    %define supported_platform 1
7edd2b
%else
7edd2b
    %define supported_platform 0
7edd2b
%endif
7edd2b
7edd2b
Summary: The libvirt virtualization API python3 binding
7edd2b
Name: libvirt-python
4904ea
Version: 9.0.0
4904ea
Release: 1%{?dist}%{?extra_release}
7edd2b
Source0: https://libvirt.org/sources/python/%{name}-%{version}.tar.gz
7edd2b
Url: https://libvirt.org
7edd2b
License: LGPLv2+
7edd2b
BuildRequires: git
4904ea
BuildRequires: libvirt-devel >= 9.0.0-2
7edd2b
BuildRequires: python3-devel
7edd2b
BuildRequires: python3-pytest
7edd2b
BuildRequires: python3-lxml
4904ea
BuildRequires: python3-setuptools
7edd2b
BuildRequires: gcc
7edd2b
7edd2b
# Don't want provides for python shared objects
7edd2b
%{?filter_provides_in: %filter_provides_in %{python3_sitearch}/.*\.so}
7edd2b
%{?filter_setup}
7edd2b
7edd2b
%description
7edd2b
The libvirt-python package contains a module that permits applications
7edd2b
written in the Python programming language to use the interface
7edd2b
supplied by the libvirt library to use the virtualization capabilities
7edd2b
of recent versions of Linux (and other OSes).
7edd2b
7edd2b
%package -n python3-libvirt
7edd2b
Summary: The libvirt virtualization API python3 binding
7edd2b
Url: http://libvirt.org
7edd2b
License: LGPLv2+
7edd2b
%{?python_provide:%python_provide python3-libvirt}
7edd2b
Provides: libvirt-python3 = %{version}-%{release}
7edd2b
Obsoletes: libvirt-python3 <= 3.6.0-1%{?dist}
7edd2b
7edd2b
%description -n python3-libvirt
7edd2b
The python3-libvirt package contains a module that permits applications
7edd2b
written in the Python 3.x programming language to use the interface
7edd2b
supplied by the libvirt library to use the virtualization capabilities
7edd2b
of recent versions of Linux (and other OSes).
7edd2b
7edd2b
%prep
7edd2b
%autosetup -S git_am -N
7edd2b
7edd2b
git config gc.auto 0
7edd2b
7edd2b
%autopatch
7edd2b
7edd2b
7edd2b
# Unset execute bit for example scripts; it can introduce spurious
7edd2b
# RPM dependencies, like /usr/bin/python3
7edd2b
# for the -python3 package
7edd2b
find examples -type f -exec chmod 0644 \{\} \;
7edd2b
7edd2b
%build
7edd2b
%if ! %{supported_platform}
7edd2b
echo "This RPM requires either Fedora >= %{min_fedora} or RHEL >= %{min_rhel}"
7edd2b
exit 1
7edd2b
%endif
7edd2b
7edd2b
%py3_build
7edd2b
7edd2b
%install
7edd2b
%py3_install
7edd2b
7edd2b
%check
7edd2b
%{__python3} setup.py test
7edd2b
7edd2b
%files -n python3-libvirt
7edd2b
%doc ChangeLog AUTHORS README COPYING COPYING.LESSER examples/
7edd2b
%{python3_sitearch}/libvirt.py*
7edd2b
%{python3_sitearch}/libvirtaio.py*
7edd2b
%{python3_sitearch}/libvirt_qemu.py*
7edd2b
%{python3_sitearch}/libvirt_lxc.py*
7edd2b
%{python3_sitearch}/__pycache__/libvirt.cpython-*.py*
7edd2b
%{python3_sitearch}/__pycache__/libvirt_qemu.cpython-*.py*
7edd2b
%{python3_sitearch}/__pycache__/libvirt_lxc.cpython-*.py*
7edd2b
%{python3_sitearch}/__pycache__/libvirtaio.cpython-*.py*
7edd2b
%{python3_sitearch}/libvirtmod*
7edd2b
%{python3_sitearch}/*egg-info
7edd2b
7edd2b
%changelog
4904ea
* Wed Feb  1 2023 Jiri Denemark <jdenemar@redhat.com> - 9.0.0-1
4904ea
- Rebased to libvirt-python-9.0.0 (rhbz#2124467)
4904ea
4904ea
* Thu Dec  8 2022 Jiri Denemark <jdenemar@redhat.com> - 8.10.0-1
4904ea
- Rebased to libvirt-python-8.10.0 (rhbz#2124467)
4904ea
4904ea
* Fri Nov  4 2022 Jiri Denemark <jdenemar@redhat.com> - 8.9.0-1
4904ea
- Rebased to libvirt-python-8.9.0 (rhbz#2124467)
4904ea
4904ea
* Mon Sep 26 2022 Jiri Denemark <jdenemar@redhat.com> - 8.7.0-1
4904ea
- Rebased to libvirt-python-8.7.0 (rhbz#2124467)
4904ea
0c6135
* Thu Aug 18 2022 Jiri Denemark <jdenemar@redhat.com> - 8.5.0-2
0c6135
- Add VIR_DOMAIN_IOTHREAD_THREAD_POOL_{MIN,MAX} macros (rhbz#2117475)
0c6135
0c6135
* Wed Jul 13 2022 Jiri Denemark <jdenemar@redhat.com> - 8.5.0-1
0c6135
- Rebased to libvirt-python-8.5.0 (rhbz#2060316)
0c6135
- The rebase also fixes the following bugs:
0c6135
    rhbz#2092752
0c6135
0c6135
* Thu Jun  9 2022 Jiri Denemark <jdenemar@redhat.com> - 8.4.0-1
0c6135
- Rebased to libvirt-python-8.4.0 (rhbz#2060316)
0c6135
0c6135
* Thu May 19 2022 Jiri Denemark <jdenemar@redhat.com> - 8.3.0-1
0c6135
- Rebased to libvirt-python-8.3.0 (rhbz#2060316)
0c6135
0c6135
* Fri Apr 15 2022 Jiri Denemark <jdenemar@redhat.com> - 8.2.0-1
0c6135
- Rebased to libvirt-python-8.2.0 (rhbz#2060316)
0c6135
7edd2b
* Mon Jan 17 2022 Jiri Denemark <jdenemar@redhat.com> - 8.0.0-1
7edd2b
- Rebased to libvirt-python-8.0.0 (rhbz#2001522)
7edd2b
7edd2b
* Mon Dec 13 2021 Jiri Denemark <jdenemar@redhat.com> - 7.10.0-1
7edd2b
- Rebased to libvirt-python-7.10.0 (rhbz#2001522)
7edd2b
7edd2b
* Thu Nov 11 2021 Jiri Denemark <jdenemar@redhat.com> - 7.9.0-1
7edd2b
- Rebased to libvirt-python-7.9.0 (rhbz#2001522)
7edd2b
7edd2b
* Mon Oct 18 2021 Jiri Denemark <jdenemar@redhat.com> - 7.8.0-1
7edd2b
- Rebased to libvirt-python-7.8.0 (rhbz#2001522)
7edd2b
7edd2b
* Thu Aug 12 2021 Jiri Denemark <jdenemar@redhat.com> - 7.6.0-1
7edd2b
- Rebased to libvirt-python-7.6.0 (rhbz#1950951)
7edd2b
7edd2b
* Mon Aug 09 2021 Mohan Boddu <mboddu@redhat.com> - 7.5.0-2
7edd2b
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
7edd2b
  Related: rhbz#1991688
7edd2b
7edd2b
* Fri Jul 16 2021 Jiri Denemark <jdenemar@redhat.com> - 7.5.0-1
7edd2b
- Rebased to libvirt-python-7.5.0 (rhbz#1950951)
7edd2b
7edd2b
* Wed Jun 16 2021 Jiri Denemark <jdenemar@redhat.com> - 7.4.0-1
7edd2b
- Rebased to libvirt-python-7.4.0 (rhbz#1950951)
7edd2b
7edd2b
* Mon May 31 2021 Jiri Denemark <jdenemar@redhat.com> - 7.3.0-1
7edd2b
- Rebased to libvirt-python-7.3.0 (rhbz#1950951)
7edd2b
- The rebase also fixes the following bugs:
7edd2b
    rhbz#1916800, rhbz#1950603, rhbz#1950951
7edd2b
- RHEL: Add gating.yaml for RHEL9 (rhbz#1950603)
7edd2b
7edd2b
* Fri Apr 16 2021 Mohan Boddu <mboddu@redhat.com> - 7.0.0-3
7edd2b
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
7edd2b
7edd2b
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 7.0.0-2
7edd2b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
7edd2b
7edd2b
* Mon Jan 18 2021 Cole Robinson <crobinso@redhat.com> - 7.0.0-1
7edd2b
- Update to version 7.0.0
7edd2b
7edd2b
* Tue Dec 01 2020 Cole Robinson <crobinso@redhat.com> - 6.10.0-1
7edd2b
- Update to version 6.10.0
7edd2b
7edd2b
* Tue Nov 03 2020 Cole Robinson <crobinso@redhat.com> - 6.9.0-1
7edd2b
- Update to version 6.9.0
7edd2b
7edd2b
* Thu Oct 15 2020 Daniel P. Berrangé <berrange@redhat.com> - 6.8.0-2
7edd2b
- Fix regression with snapshot handling (rhbz #1888709)
7edd2b
7edd2b
* Fri Oct 02 2020 Cole Robinson <crobinso@redhat.com> - 6.8.0-1
7edd2b
- Update to version 6.8.0
7edd2b
7edd2b
* Wed Sep 02 2020 Cole Robinson <crobinso@redhat.com> - 6.7.0-1
7edd2b
- Update to version 6.7.0
7edd2b
7edd2b
* Tue Aug 04 2020 Cole Robinson <crobinso@redhat.com> - 6.6.0-1
7edd2b
- Update to version 6.6.0
7edd2b
7edd2b
* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 6.5.0-2
7edd2b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
7edd2b
7edd2b
* Sat Jul 04 2020 Cole Robinson <crobinso@redhat.com> - 6.5.0-1
7edd2b
- Update to version 6.5.0
7edd2b
7edd2b
* Tue Jun 02 2020 Cole Robinson <crobinso@redhat.com> - 6.4.0-1
7edd2b
- Update to version 6.4.0
7edd2b
7edd2b
* Tue May 26 2020 Miro Hrončok <mhroncok@redhat.com> - 6.3.0-2
7edd2b
- Rebuilt for Python 3.9
7edd2b
7edd2b
* Tue May 05 2020 Cole Robinson <crobinso@redhat.com> - 6.3.0-1
7edd2b
- Update to version 6.3.0
7edd2b
7edd2b
* Thu Apr 02 2020 Cole Robinson <crobinso@redhat.com> - 6.2.0-1
7edd2b
- Update to version 6.2.0
7edd2b
7edd2b
* Wed Mar 04 2020 Cole Robinson <crobinso@redhat.com> - 6.1.0-1
7edd2b
- Update to version 6.1.0
7edd2b
7edd2b
* Wed Jan 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 6.0.0-2
7edd2b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
7edd2b
7edd2b
* Wed Jan 15 2020 Cole Robinson <crobinso@redhat.com> - 6.0.0-1
7edd2b
- Update to version 6.0.0