CentOS 8: Upgrade libvirt-python to version 4.7.0-1.fc28
(1)Release Version Upgrade (2)Matching code changes with el7 to el8 (3)Build-python-wheel.patch changed python2 to python3 Story: 2006729 Task: 37673 Depends-On: https://review.opendev.org/#/c/696481/ Depends-On: https://review.opendev.org/#/c/696050/ Change-Id: Ic05bc0a9d9ca8b24d91bd924c9a487afc370dc4f Signed-off-by: Dongqi Chen <chen.dq@neusoft.com>
This commit is contained in:
parent
9035cd1be8
commit
7533dbebfc
@ -1 +1 @@
|
||||
TIS_PATCH_VER=3
|
||||
TIS_PATCH_VER=1
|
||||
|
@ -3,9 +3,10 @@ From: Don Penney <don.penney@windriver.com>
|
||||
Date: Wed, 17 Oct 2018 15:25:33 -0400
|
||||
Subject: [PATCH 2/2] Build python wheel
|
||||
|
||||
Signed-off-by: Dongqi Chen <chen.dq@neusoft.com>
|
||||
---
|
||||
SPECS/libvirt-python.spec | 18 ++++++++++++++++++
|
||||
1 file changed, 18 insertions(+)
|
||||
SPECS/libvirt-python.spec | 16 ++++++++++++++++
|
||||
1 file changed, 16 insertions(+)
|
||||
|
||||
diff --git a/SPECS/libvirt-python.spec b/SPECS/libvirt-python.spec
|
||||
index 475bb0a..4d7fced 100644
|
||||
@ -19,22 +20,16 @@ index 475bb0a..4d7fced 100644
|
||||
Url: http://libvirt.org
|
||||
License: LGPLv2+
|
||||
BuildRequires: libvirt-devel == %{version}
|
||||
@@ -44,10 +45,14 @@ BuildRequires: libvirt-devel == %{version}
|
||||
BuildRequires: python2-devel
|
||||
BuildRequires: python2-nose
|
||||
BuildRequires: python2-lxml
|
||||
+BuildRequires: python2-pip
|
||||
+BuildRequires: python2-wheel
|
||||
%else
|
||||
BuildRequires: python-devel
|
||||
BuildRequires: python-nose
|
||||
BuildRequires: python-lxml
|
||||
+BuildRequires: python2-pip
|
||||
+BuildRequires: python2-wheel
|
||||
@@ -54,6 +55,8 @@ BuildRequires: python-lxml
|
||||
BuildRequires: python3-devel
|
||||
BuildRequires: python3-nose
|
||||
BuildRequires: python3-lxml
|
||||
+BuildRequires: python3-pip
|
||||
+BuildRequires: python3-wheel
|
||||
%endif
|
||||
%endif
|
||||
%if %{with_python3}
|
||||
@@ -106,6 +111,7 @@ of recent versions of Linux (and other OSes).
|
||||
BuildRequires: gcc
|
||||
|
||||
@@ -106,6 +109,7 @@ of recent versions of Linux (and other OSes).
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
@ -42,24 +37,24 @@ index 475bb0a..4d7fced 100644
|
||||
|
||||
# Unset execute bit for example scripts; it can introduce spurious
|
||||
# RPM dependencies, like /usr/bin/python which can pull in python2
|
||||
@@ -120,6 +126,7 @@ exit 1
|
||||
|
||||
%if %{with_python2}
|
||||
CFLAGS="$RPM_OPT_FLAGS" %{__python2} setup.py build
|
||||
+CFLAGS="$RPM_OPT_FLAGS" %{__python2} setup.py bdist_wheel
|
||||
@@ -123,6 +127,7 @@ CFLAGS="$RPM_OPT_FLAGS" %{__python2} setup.py build
|
||||
%endif
|
||||
%if %{with_python3}
|
||||
CFLAGS="$RPM_OPT_FLAGS" %{__python3} setup.py build
|
||||
@@ -128,6 +135,8 @@ CFLAGS="$RPM_OPT_FLAGS" %{__python3} setup.py build
|
||||
+CFLAGS="$RPM_OPT_FLAGS" %{__python3} setup.py bdist_wheel
|
||||
%endif
|
||||
|
||||
%install
|
||||
%if %{with_python2}
|
||||
%{__python2} setup.py install --skip-build --root=%{buildroot}
|
||||
+mkdir -p $RPM_BUILD_ROOT/wheels
|
||||
+install -m 644 dist/*.whl $RPM_BUILD_ROOT/wheels/
|
||||
@@ -131,6 +136,8 @@ CFLAGS="$RPM_OPT_FLAGS" %{__python3} setup.py build
|
||||
%endif
|
||||
%if %{with_python3}
|
||||
%{__python3} setup.py install --skip-build --root=%{buildroot}
|
||||
@@ -166,4 +175,13 @@ CFLAGS="$RPM_OPT_FLAGS" %{__python3} setup.py build
|
||||
+mkdir -p $RPM_BUILD_ROOT/wheels
|
||||
+install -m 644 dist/*.whl $RPM_BUILD_ROOT/wheels/
|
||||
%endif
|
||||
|
||||
%check
|
||||
@@ -166,4 +173,13 @@ CFLAGS="$RPM_OPT_FLAGS" %{__python3} setup.py build
|
||||
%{python3_sitearch}/*egg-info
|
||||
%endif
|
||||
|
||||
@ -74,5 +69,5 @@ index 475bb0a..4d7fced 100644
|
||||
+
|
||||
%changelog
|
||||
--
|
||||
1.8.3.1
|
||||
2.7.4
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user