From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by dpdk.org (Postfix) with ESMTP id 53DB52BAC for ; Wed, 7 Dec 2016 12:18:47 +0100 (CET) Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id BF6E71555E for ; Wed, 7 Dec 2016 11:18:46 +0000 (UTC) Received: from caroline.usersys.redhat.com (dhcp129-198.brq.redhat.com [10.34.129.198]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id uB7BIj7P022682 for ; Wed, 7 Dec 2016 06:18:46 -0500 From: Martin Kletzander To: dev@dpdk.org Date: Wed, 7 Dec 2016 11:16:47 +0100 Message-Id: X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.29]); Wed, 07 Dec 2016 11:18:46 +0000 (UTC) Subject: [dpdk-dev] [PATCH] Force python scripts to run with python2 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Dec 2016 11:18:47 -0000 With python3 being the default in some distributions/installations, shebang with just "python" will make the script run under version of python that the scripts are not written for. In order to fix that and mitigate future errors, use shebang properly and specify the python version. That way the scripts will run in any distro/install, no matter what python version is set as the default. Signed-off-by: Martin Kletzander --- app/cmdline_test/cmdline_test.py | 2 +- app/cmdline_test/cmdline_test_data.py | 2 +- app/test/autotest.py | 2 +- app/test/autotest_data.py | 2 +- app/test/autotest_runner.py | 2 +- app/test/autotest_test_funcs.py | 2 +- examples/ip_pipeline/config/diagram-generator.py | 2 +- examples/ip_pipeline/config/pipeline-to-core-mapping.py | 2 +- tools/cpu_layout.py | 2 +- tools/dpdk-devbind.py | 2 +- tools/dpdk-pmdinfo.py | 2 +- 11 files changed, 11 insertions(+), 11 deletions(-) diff --git a/app/cmdline_test/cmdline_test.py b/app/cmdline_test/cmdline_test.py index 8efc5ead4439..3a3937abc8fb 100755 --- a/app/cmdline_test/cmdline_test.py +++ b/app/cmdline_test/cmdline_test.py @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/env python2 # BSD LICENSE # diff --git a/app/cmdline_test/cmdline_test_data.py b/app/cmdline_test/cmdline_test_data.py index b1945a579f24..882b7355f83d 100644 --- a/app/cmdline_test/cmdline_test_data.py +++ b/app/cmdline_test/cmdline_test_data.py @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/env python2 # BSD LICENSE # diff --git a/app/test/autotest.py b/app/test/autotest.py index b9fd6b6f5b21..4891410dbbd6 100644 --- a/app/test/autotest.py +++ b/app/test/autotest.py @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/env python2 # BSD LICENSE # diff --git a/app/test/autotest_data.py b/app/test/autotest_data.py index 9e8fd946a063..6e84eccc6a2e 100644 --- a/app/test/autotest_data.py +++ b/app/test/autotest_data.py @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/env python2 # BSD LICENSE # diff --git a/app/test/autotest_runner.py b/app/test/autotest_runner.py index 21d3be2cb2cd..1eb64d3bedd5 100644 --- a/app/test/autotest_runner.py +++ b/app/test/autotest_runner.py @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/env python2 # BSD LICENSE # diff --git a/app/test/autotest_test_funcs.py b/app/test/autotest_test_funcs.py index 14cffd014565..8ee9b280706b 100644 --- a/app/test/autotest_test_funcs.py +++ b/app/test/autotest_test_funcs.py @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/env python2 # BSD LICENSE # diff --git a/examples/ip_pipeline/config/diagram-generator.py b/examples/ip_pipeline/config/diagram-generator.py index 6b7170b00486..7a2eb3fd6319 100755 --- a/examples/ip_pipeline/config/diagram-generator.py +++ b/examples/ip_pipeline/config/diagram-generator.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python2 # BSD LICENSE # diff --git a/examples/ip_pipeline/config/pipeline-to-core-mapping.py b/examples/ip_pipeline/config/pipeline-to-core-mapping.py index c2050b82a9fb..355061405d9d 100755 --- a/examples/ip_pipeline/config/pipeline-to-core-mapping.py +++ b/examples/ip_pipeline/config/pipeline-to-core-mapping.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python2 # BSD LICENSE # diff --git a/tools/cpu_layout.py b/tools/cpu_layout.py index d38d0b5a0cfe..97038b37aa28 100755 --- a/tools/cpu_layout.py +++ b/tools/cpu_layout.py @@ -1,4 +1,4 @@ -#! /usr/bin/python +#!/usr/bin/env python2 # # BSD LICENSE # diff --git a/tools/dpdk-devbind.py b/tools/dpdk-devbind.py index f1d374d6b08c..f520f9a99d5b 100755 --- a/tools/dpdk-devbind.py +++ b/tools/dpdk-devbind.py @@ -1,4 +1,4 @@ -#! /usr/bin/python +#!/usr/bin/env python2 # # BSD LICENSE # diff --git a/tools/dpdk-pmdinfo.py b/tools/dpdk-pmdinfo.py index 3db9819c61d3..0a8fba01f0ff 100755 --- a/tools/dpdk-pmdinfo.py +++ b/tools/dpdk-pmdinfo.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python2 # ------------------------------------------------------------------------- # # Utility to dump PMD_INFO_STRING support from an object file -- 2.11.0