From 9d21a317ddb5a2b37437ff1e5541bcae55ae0caa Mon Sep 17 00:00:00 2001 From: Jim Harris Date: Tue, 10 Mar 2020 11:06:39 -0700 Subject: [PATCH] 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 Change-Id: I413c684772e6cb45dedca8977c2c784a55026a35 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1219 Tested-by: SPDK CI Jenkins Reviewed-by: Ben Walker Reviewed-by: Shuhei Matsumoto Reviewed-by: Aleksey Marchuk --- pkg/spdk.spec | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/pkg/spdk.spec b/pkg/spdk.spec index 415f6fb44..2c0f32bab 100644 --- a/pkg/spdk.spec +++ b/pkg/spdk.spec @@ -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