Skip to content

Commit

Permalink
spdk.spec: remove python2 references
Browse files Browse the repository at this point in the history
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 <[email protected]>
Change-Id: I413c684772e6cb45dedca8977c2c784a55026a35
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1219
Tested-by: SPDK CI Jenkins <[email protected]>
Reviewed-by: Ben Walker <[email protected]>
Reviewed-by: Shuhei Matsumoto <[email protected]>
Reviewed-by: Aleksey Marchuk <[email protected]>
  • Loading branch information
jimharris authored and tomzawadzki committed Mar 12, 2020
1 parent 555e186 commit 9d21a31
Showing 1 changed file with 0 additions and 16 deletions.
16 changes: 0 additions & 16 deletions pkg/spdk.spec
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 9d21a31

Please sign in to comment.