![Long Li](/assets/img/avatar_default.png)
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>
64 lines
1.3 KiB
RPMSpec
64 lines
1.3 KiB
RPMSpec
#
|
|
# SPDX-License-Identifier: BSD-3-Clause
|
|
#
|
|
# Copyright (c) 2016, Contributing Member(s) of Distributed Management
|
|
# Task Force, Inc.. All rights reserved.
|
|
|
|
Summary: Redfish Tool Package
|
|
Name: Redfishtool
|
|
Version: 1.1.0
|
|
Release: %{?_tis_dist}.%{tis_patch_ver}
|
|
#For full text see link: https://github.com/DMTF/Redfishtool/blob/master/LICENSE.md
|
|
License: BSD-3-Clause.
|
|
Group: base
|
|
Packager: StarlingX
|
|
URL: https://github.com/DMTF/Redfishtool
|
|
|
|
Source0: %{name}-%{version}.tar.gz
|
|
|
|
BuildArch: noarch
|
|
|
|
Patch01: 0001-Adapt-redfishtool-to-python2.patch
|
|
Patch02: 0002-Change-python-to-python3-explicitly.patch
|
|
|
|
BuildRequires: python3-setuptools
|
|
|
|
Requires: python3-requests
|
|
|
|
%description
|
|
Redfish Tool Package
|
|
|
|
%define pythonroot %python3_sitearch
|
|
%define debug_package %{nil}
|
|
|
|
%prep
|
|
%setup
|
|
%patch01 -p1
|
|
%patch02 -p1
|
|
|
|
# Remove bundled egg-info
|
|
rm -rf *.egg-info
|
|
|
|
%build
|
|
%{__python3} setup.py build
|
|
|
|
%install
|
|
%{__python3} setup.py install --root=%{buildroot} \
|
|
--install-lib=%{pythonroot} \
|
|
--prefix=/usr \
|
|
--install-data=/usr/share \
|
|
--single-version-externally-managed
|
|
|
|
%post
|
|
|
|
%clean
|
|
rm -rf $RPM_BUILD_ROOT
|
|
|
|
%files
|
|
%defattr(-,root,root,-)
|
|
%doc LICENSE.md
|
|
%{pythonroot}/redfishtool/*
|
|
%{pythonroot}/redfishtool-%{version}*.egg-info
|
|
|
|
%{_bindir}/redfishtool
|