From nobody Mon Feb 9 09:33:07 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1505822670057416.9011229490352; Tue, 19 Sep 2017 05:04:30 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id ADCB31A229E; Tue, 19 Sep 2017 12:04:28 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 4254A5D984; Tue, 19 Sep 2017 12:04:28 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id C509D3FAD0; Tue, 19 Sep 2017 12:04:27 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id v8JB9gDT017099 for ; Tue, 19 Sep 2017 07:09:42 -0400 Received: by smtp.corp.redhat.com (Postfix) id 7720860E3B; Tue, 19 Sep 2017 11:09:42 +0000 (UTC) Received: from inaba.usersys.redhat.com (unknown [10.43.2.219]) by smtp.corp.redhat.com (Postfix) with ESMTPS id F314060BEC for ; Tue, 19 Sep 2017 11:09:41 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com ADCB31A229E Authentication-Results: ext-mx02.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx02.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=libvir-list-bounces@redhat.com From: Andrea Bolognani To: libvir-list@redhat.com Date: Tue, 19 Sep 2017 13:09:33 +0200 Message-Id: <20170919110933.8721-3-abologna@redhat.com> In-Reply-To: <20170919110933.8721-1-abologna@redhat.com> References: <20170919110933.8721-1-abologna@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH v2 2/2] python: Don't hardcode interpreter path X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Tue, 19 Sep 2017 12:04:29 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" This is particularly useful on operating systems that don't ship Python as part of the base system (eg. FreeBSD) while still working just as well as it did before on Linux. While at it, make it explicit that our scripts are only going to work with Python 2, and remove the usage of unbuffered I/O, which as far as I can tell has no effect on the output files. Signed-off-by: Andrea Bolognani --- docs/apibuild.py | 2 +- docs/index.py | 2 +- docs/reformat-news.py | 2 +- src/esx/esx_vi_generator.py | 2 +- src/hyperv/hyperv_wmi_generator.py | 2 +- tests/cputestdata/cpu-cpuid.py | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/apibuild.py b/docs/apibuild.py index 87e81f5c3..a788086a6 100755 --- a/docs/apibuild.py +++ b/docs/apibuild.py @@ -1,4 +1,4 @@ -#!/usr/bin/python -u +#!/usr/bin/env python2 # # This is the API builder, it parses the C sources and build the # API formal description in XML. diff --git a/docs/index.py b/docs/index.py index 2f0ad2672..bedec8ae0 100755 --- a/docs/index.py +++ b/docs/index.py @@ -1,4 +1,4 @@ -#!/usr/bin/python -u +#!/usr/bin/env python2 # # imports the API description and fills up a database with # name relevance to modules, functions or web pages diff --git a/docs/reformat-news.py b/docs/reformat-news.py index 39499d933..89f7ccb3d 100755 --- a/docs/reformat-news.py +++ b/docs/reformat-news.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python2 =20 # reformat-news.py: Reformat the NEWS file properly # diff --git a/src/esx/esx_vi_generator.py b/src/esx/esx_vi_generator.py index bc026bd71..a2b8bef72 100755 --- a/src/esx/esx_vi_generator.py +++ b/src/esx/esx_vi_generator.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python2 =20 # # esx_vi_generator.py: generates most of the SOAP type mapping code diff --git a/src/hyperv/hyperv_wmi_generator.py b/src/hyperv/hyperv_wmi_gen= erator.py index 9c0accea0..b60335e26 100755 --- a/src/hyperv/hyperv_wmi_generator.py +++ b/src/hyperv/hyperv_wmi_generator.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python2 =20 # # hyperv_wmi_generator.py: generates most of the WMI type mapping code diff --git a/tests/cputestdata/cpu-cpuid.py b/tests/cputestdata/cpu-cpuid.py index 385d6d1a1..a2fd938c2 100755 --- a/tests/cputestdata/cpu-cpuid.py +++ b/tests/cputestdata/cpu-cpuid.py @@ -1,4 +1,4 @@ -#!/usr/bin/python2 +#!/usr/bin/env python2 =20 import sys import json --=20 2.13.5 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list