python should be called via env to support virtualenvs
Signed-off-by: Alexander Couzens lynxis@fe80.eu --- scripts/acpi_extract.py | 2 +- scripts/acpi_extract_preprocess.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/scripts/acpi_extract.py b/scripts/acpi_extract.py index 3ed863b..baa6bec 100755 --- a/scripts/acpi_extract.py +++ b/scripts/acpi_extract.py @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/env python # Copyright (C) 2011 Red Hat, Inc., Michael S. Tsirkin mst@redhat.com # # This file may be distributed under the terms of the GNU GPLv3 license. diff --git a/scripts/acpi_extract_preprocess.py b/scripts/acpi_extract_preprocess.py index 2698118..31913bd 100755 --- a/scripts/acpi_extract_preprocess.py +++ b/scripts/acpi_extract_preprocess.py @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/env python # Copyright (C) 2011 Red Hat, Inc., Michael S. Tsirkin mst@redhat.com # # This file may be distributed under the terms of the GNU GPLv3 license.
python is ambiguous. it could mean python2 or python3.
Signed-off-by: Alexander Couzens lynxis@fe80.eu --- Makefile | 2 +- scripts/acpi_extract.py | 2 +- scripts/acpi_extract_preprocess.py | 2 +- scripts/buildrom.py | 2 +- scripts/buildversion.py | 2 +- scripts/checkrom.py | 2 +- scripts/checkstack.py | 2 +- scripts/checksum.py | 2 +- scripts/encodeint.py | 2 +- scripts/layoutrom.py | 2 +- scripts/readserial.py | 2 +- scripts/transdump.py | 2 +- scripts/vgafixup.py | 2 +- 13 files changed, 13 insertions(+), 13 deletions(-)
diff --git a/Makefile b/Makefile index 4930b3a..05006f8 100644 --- a/Makefile +++ b/Makefile @@ -22,7 +22,7 @@ LD=$(CROSS_PREFIX)ld OBJCOPY=$(CROSS_PREFIX)objcopy OBJDUMP=$(CROSS_PREFIX)objdump STRIP=$(CROSS_PREFIX)strip -PYTHON=python +PYTHON=python2 CPP=cpp IASL:=iasl LD32BIT_FLAG:=-melf_i386 diff --git a/scripts/acpi_extract.py b/scripts/acpi_extract.py index baa6bec..ad71927 100755 --- a/scripts/acpi_extract.py +++ b/scripts/acpi_extract.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python2 # Copyright (C) 2011 Red Hat, Inc., Michael S. Tsirkin mst@redhat.com # # This file may be distributed under the terms of the GNU GPLv3 license. diff --git a/scripts/acpi_extract_preprocess.py b/scripts/acpi_extract_preprocess.py index 31913bd..a935d05 100755 --- a/scripts/acpi_extract_preprocess.py +++ b/scripts/acpi_extract_preprocess.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python2 # Copyright (C) 2011 Red Hat, Inc., Michael S. Tsirkin mst@redhat.com # # This file may be distributed under the terms of the GNU GPLv3 license. diff --git a/scripts/buildrom.py b/scripts/buildrom.py index 0499049..467397f 100755 --- a/scripts/buildrom.py +++ b/scripts/buildrom.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python2 # Fill in checksum/size of an option rom, and pad it to proper length. # # Copyright (C) 2009 Kevin O'Connor kevin@koconnor.net diff --git a/scripts/buildversion.py b/scripts/buildversion.py index 4692898..7d7cf14 100755 --- a/scripts/buildversion.py +++ b/scripts/buildversion.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python2 # Generate version information for a program # # Copyright (C) 2015 Kevin O'Connor kevin@koconnor.net diff --git a/scripts/checkrom.py b/scripts/checkrom.py index aced5e2..80cc31e 100755 --- a/scripts/checkrom.py +++ b/scripts/checkrom.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python2 # Script to check a bios image and report info on it. # # Copyright (C) 2008 Kevin O'Connor kevin@koconnor.net diff --git a/scripts/checkstack.py b/scripts/checkstack.py index 5d9b0bf..535d0c4 100755 --- a/scripts/checkstack.py +++ b/scripts/checkstack.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python2 # Script that tries to find how much stack space each function in an # object is using. # diff --git a/scripts/checksum.py b/scripts/checksum.py index 773fa7a..67fafb7 100755 --- a/scripts/checksum.py +++ b/scripts/checksum.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python2 # Script to report the checksum of a file. # # Copyright (C) 2009 Kevin O'Connor kevin@koconnor.net diff --git a/scripts/encodeint.py b/scripts/encodeint.py index 0d34aee..0cafe11 100755 --- a/scripts/encodeint.py +++ b/scripts/encodeint.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python2 # Encode an integer in little endian format in a file. # # Copyright (C) 2011 Kevin O'Connor kevin@koconnor.net diff --git a/scripts/layoutrom.py b/scripts/layoutrom.py index 6616721..9a0b811 100755 --- a/scripts/layoutrom.py +++ b/scripts/layoutrom.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python2 # Script to analyze code and arrange ld sections. # # Copyright (C) 2008-2014 Kevin O'Connor kevin@koconnor.net diff --git a/scripts/readserial.py b/scripts/readserial.py index a7383e8..0c9d11e 100755 --- a/scripts/readserial.py +++ b/scripts/readserial.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python2 # Script that can read from a serial device and show timestamps. # # Copyright (C) 2009 Kevin O'Connor kevin@koconnor.net diff --git a/scripts/transdump.py b/scripts/transdump.py index 665f04a..1250111 100755 --- a/scripts/transdump.py +++ b/scripts/transdump.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python2
# This script is useful for taking the output of memdump() and # converting it back into binary output. This can be useful, for diff --git a/scripts/vgafixup.py b/scripts/vgafixup.py index 2053cd5..152994c 100644 --- a/scripts/vgafixup.py +++ b/scripts/vgafixup.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python2 # Work around x86emu bugs by replacing problematic instructions. # # Copyright (C) 2012 Kevin O'Connor kevin@koconnor.net
On Thu, May 19, 2016 at 02:25:20AM +0200, Alexander Couzens wrote:
python is ambiguous. it could mean python2 or python3.
The scripts were written to run with either python2 or python3. Did you run into a compatibility issue?
-Kevin
On Thu, May 19, 2016 at 02:25:19AM +0200, Alexander Couzens wrote:
python should be called via env to support virtualenvs
Is this a general cleanup, or did you run into a specific problem? These scripts are typically run from the makefile which runs them with the interpreter specified: $(PYTHON) scrits/acpi_extract.py ...
Thanks, -Kevin