Blame SPECS/libvirt-python.spec

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