CentOS8: Redfishtool should use python3
change python to python3 explicitly to fix RPM build Story: 2006729 Task: 37899 Change-Id: Iea9a056950d836541ce7ce316cbf817971d77c70 Signed-off-by: Long Li <lilong-neu@neusoft.com>
This commit is contained in:
parent
a7fd513689
commit
125b16157e
@ -19,29 +19,31 @@ Source0: %{name}-%{version}.tar.gz
|
||||
BuildArch: noarch
|
||||
|
||||
Patch01: 0001-Adapt-redfishtool-to-python2.patch
|
||||
Patch02: 0002-Change-python-to-python3-explicitly.patch
|
||||
|
||||
BuildRequires: python-setuptools
|
||||
BuildRequires: python3-setuptools
|
||||
|
||||
Requires: python-requests
|
||||
Requires: python3-requests
|
||||
|
||||
%description
|
||||
Redfish Tool Package
|
||||
|
||||
%define pythonroot /usr/lib64/python2.7/site-packages
|
||||
%define pythonroot %python3_sitearch
|
||||
%define debug_package %{nil}
|
||||
|
||||
%prep
|
||||
%setup
|
||||
%patch01 -p1
|
||||
%patch02 -p1
|
||||
|
||||
# Remove bundled egg-info
|
||||
rm -rf *.egg-info
|
||||
|
||||
%build
|
||||
%{__python} setup.py build
|
||||
%{__python3} setup.py build
|
||||
|
||||
%install
|
||||
%{__python} setup.py install --root=%{buildroot} \
|
||||
%{__python3} setup.py install --root=%{buildroot} \
|
||||
--install-lib=%{pythonroot} \
|
||||
--prefix=/usr \
|
||||
--install-data=/usr/share \
|
||||
|
@ -0,0 +1,34 @@
|
||||
From 820ad50e1d2e013ff7835ab3acb3809f5eee3d8e Mon Sep 17 00:00:00 2001
|
||||
From: Long Li <lilong-neu@neusoft.com>
|
||||
Date: Thu, 26 Dec 2019 09:53:28 +0800
|
||||
Subject: [PATCH] Change python to python3 explicitly
|
||||
|
||||
Signed-off-by: Long Li <lilong-neu@neusoft.com>
|
||||
---
|
||||
redfishtool.py | 2 +-
|
||||
scripts/redfishtool | 2 +-
|
||||
2 files changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/redfishtool.py b/redfishtool.py
|
||||
index b7b1b3c..7f585ab 100644
|
||||
--- a/redfishtool.py
|
||||
+++ b/redfishtool.py
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!/usr/bin/python
|
||||
+#!/usr/bin/python3
|
||||
# Copyright Notice:
|
||||
# Copyright 2016 DMTF. All rights reserved.
|
||||
# License: BSD 3-Clause License. For full text see link: https://github.com/DMTF/Redfishtool/blob/master/LICENSE.md
|
||||
diff --git a/scripts/redfishtool b/scripts/redfishtool
|
||||
index 3bc1eb0..7bed4fe 100644
|
||||
--- a/scripts/redfishtool
|
||||
+++ b/scripts/redfishtool
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!/usr/bin/python
|
||||
+#!/usr/bin/python3
|
||||
# Copyright Notice:
|
||||
# Copyright 2016 DMTF. All rights reserved.
|
||||
# License: BSD 3-Clause License. For full text see link: https://github.com/DMTF/Redfishtool/blob/master/LICENSE.md
|
||||
--
|
||||
1.8.3.1
|
||||
|
Loading…
Reference in New Issue
Block a user