spdk.spec: remove python2 references
The spec file was originally created when SPDK Python scripts still worked with python2. That changed several releases ago. So remove python2 references from the spec file to indicate that SPDK scripts only work with python3. Signed-off-by: Jim Harris <james.r.harris@intel.com> Change-Id: I413c684772e6cb45dedca8977c2c784a55026a35 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1219 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com> Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
This commit is contained in:
parent
555e186a93
commit
9d21a317dd
@ -16,13 +16,6 @@ Summary: Set of libraries and utilities for high performance user-mode storage
|
||||
%define install_sbindir %{buildroot}/%{_sbindir}
|
||||
%define install_docdir %{buildroot}/%{_docdir}/%{name}
|
||||
|
||||
# Distros that don't support python3 will use python2
|
||||
%if "%{dist}" == ".el7"
|
||||
%define use_python2 1
|
||||
%else
|
||||
%define use_python2 0
|
||||
%endif
|
||||
|
||||
License: BSD
|
||||
|
||||
# Only x86_64 is supported
|
||||
@ -62,11 +55,7 @@ developing applications with the Storage Performance Development Kit.
|
||||
|
||||
%package tools
|
||||
Summary: Storage Performance Development Kit tools files
|
||||
%if "%{use_python2}" == "0"
|
||||
Requires: %{name}%{?_isa} = %{package_version} python3 python3-configshell python3-pexpect
|
||||
%else
|
||||
Requires: %{name}%{?_isa} = %{package_version} python python-configshell pexpect
|
||||
%endif
|
||||
BuildArch: noarch
|
||||
|
||||
%description tools
|
||||
@ -122,11 +111,6 @@ find scripts -type f -regextype egrep -regex '.*(spdkcli|rpc).*[.]py' \
|
||||
find %{install_datadir}/scripts -type f -regextype egrep -regex '.*([.]py|[.]sh)' \
|
||||
-exec sed -i -E '1s@#!/usr/bin/env (.*)@#!/usr/bin/\1@' {} +
|
||||
|
||||
%if "%{use_python2}" == "1"
|
||||
find %{install_datadir}/scripts -type f -regextype egrep -regex '.*([.]py)' \
|
||||
-exec sed -i -E '1s@#!/usr/bin/python3@#!/usr/bin/python2@' {} +
|
||||
%endif
|
||||
|
||||
# synlinks to tools
|
||||
mkdir -p %{install_sbindir}
|
||||
ln -sf -r %{install_datadir}/scripts/rpc.py %{install_sbindir}/%{name}-rpc
|
||||
|
Loading…
x
Reference in New Issue
Block a user