[libvirt] [python PATCH 0/3] rpm: misc updates to modernize spec

Daniel P. Berrangé (3): rpm: use the versioned python2 macro names rpm: add BuildRequires on gcc rpm: update min required rhel/fedora libvirt-python.spec.in | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) -- 2.17.1

The use of non-versioned python2 macro names is deprecated in Fedora Signed-off-by: Daniel P. Berrangé <berrange@redhat.com> --- libvirt-python.spec.in | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/libvirt-python.spec.in b/libvirt-python.spec.in index f3940cc..589855e 100644 --- a/libvirt-python.spec.in +++ b/libvirt-python.spec.in @@ -58,7 +58,7 @@ BuildRequires: python3-lxml # Don't want provides for python shared objects %if %{with_python2} -%{?filter_provides_in: %filter_provides_in %{python_sitearch}/.*\.so} +%{?filter_provides_in: %filter_provides_in %{python2_sitearch}/.*\.so} %endif %if %{with_python3} %{?filter_provides_in: %filter_provides_in %{python3_sitearch}/.*\.so} @@ -118,7 +118,7 @@ exit 1 %endif %if %{with_python2} -CFLAGS="$RPM_OPT_FLAGS" %{__python} setup.py build +CFLAGS="$RPM_OPT_FLAGS" %{__python2} setup.py build %endif %if %{with_python3} CFLAGS="$RPM_OPT_FLAGS" %{__python3} setup.py build @@ -126,7 +126,7 @@ CFLAGS="$RPM_OPT_FLAGS" %{__python3} setup.py build %install %if %{with_python2} -%{__python} setup.py install --skip-build --root=%{buildroot} +%{__python2} setup.py install --skip-build --root=%{buildroot} %endif %if %{with_python3} %{__python3} setup.py install --skip-build --root=%{buildroot} @@ -134,7 +134,7 @@ CFLAGS="$RPM_OPT_FLAGS" %{__python3} setup.py build %check %if %{with_python2} -%{__python} setup.py test +%{__python2} setup.py test %endif %if %{with_python3} %{__python3} setup.py test @@ -143,11 +143,11 @@ CFLAGS="$RPM_OPT_FLAGS" %{__python3} setup.py build %if %{with_python2} %files -n python2-libvirt %doc ChangeLog AUTHORS NEWS README COPYING COPYING.LESSER examples/ -%{python_sitearch}/libvirt.py* -%{python_sitearch}/libvirt_qemu.py* -%{python_sitearch}/libvirt_lxc.py* -%{python_sitearch}/libvirtmod* -%{python_sitearch}/*egg-info +%{python2_sitearch}/libvirt.py* +%{python2_sitearch}/libvirt_qemu.py* +%{python2_sitearch}/libvirt_lxc.py* +%{python2_sitearch}/libvirtmod* +%{python2_sitearch}/*egg-info %endif %if %{with_python3} -- 2.17.1

The gcc RPM is no longer part of the default build root. Signed-off-by: Daniel P. Berrangé <berrange@redhat.com> --- libvirt-python.spec.in | 1 + 1 file changed, 1 insertion(+) diff --git a/libvirt-python.spec.in b/libvirt-python.spec.in index 589855e..8709317 100644 --- a/libvirt-python.spec.in +++ b/libvirt-python.spec.in @@ -55,6 +55,7 @@ BuildRequires: python3-devel BuildRequires: python3-nose BuildRequires: python3-lxml %endif +BuildRequires: gcc # Don't want provides for python shared objects %if %{with_python2} -- 2.17.1

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com> --- libvirt-python.spec.in | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libvirt-python.spec.in b/libvirt-python.spec.in index 8709317..21dc713 100644 --- a/libvirt-python.spec.in +++ b/libvirt-python.spec.in @@ -3,8 +3,8 @@ # This spec file assumes you are building on a Fedora or RHEL version # that's still supported by the vendor. It may work on other distros # or versions, but no effort will be made to ensure that going forward -%define min_rhel 6 -%define min_fedora 25 +%define min_rhel 7 +%define min_fedora 27 %if (0%{?fedora} && 0%{?fedora} >= %{min_fedora}) || (0%{?rhel} && 0%{?rhel} >= %{min_rhel}) %define supported_platform 1 -- 2.17.1

On Mon, 2018-07-23 at 12:15 +0100, Daniel P. Berrangé wrote:
Daniel P. Berrangé (3): rpm: use the versioned python2 macro names rpm: add BuildRequires on gcc rpm: update min required rhel/fedora
libvirt-python.spec.in | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-)
Reviewed-by: Andrea Bolognani <abologna@redhat.com> -- Andrea Bolognani / Red Hat / Virtualization
participants (2)
-
Andrea Bolognani
-
Daniel P. Berrangé