From 28bb352a4a43e8727e1728bb920f0b7bc2bae4b7 Mon Sep 17 00:00:00 2001 From: Hai Shi Date: Mon, 30 Nov 2020 12:25:57 +0800 Subject: [PATCH 1/2] Remove the shebang of inner Tools. --- Mac/BuildScript/build-installer.py | 3 +-- Modules/_sha3/cleanup.py | 2 +- Objects/typeslots.py | 3 +-- Parser/asdl_c.py | 1 - Python/makeopcodetargets.py | 1 - Tools/clinic/clinic.py | 2 -- Tools/peg_generator/pegen/__main__.py | 2 -- 7 files changed, 3 insertions(+), 11 deletions(-) diff --git a/Mac/BuildScript/build-installer.py b/Mac/BuildScript/build-installer.py index 16816d1cf86a447..241a9d1e508b265 100755 --- a/Mac/BuildScript/build-installer.py +++ b/Mac/BuildScript/build-installer.py @@ -1,4 +1,3 @@ -#!/usr/bin/env python """ This script is used to build "official" universal installers on macOS. @@ -1615,7 +1614,7 @@ def buildDMG(): if os.path.exists(outdir): shutil.rmtree(outdir) - # We used to use the deployment target as the last characters of the + # We used to use the deployment target as the last characters of the # installer file name. With the introduction of weaklinked installer # variants, we may have two variants with the same file name, i.e. # both ending in '10.9'. To avoid this, we now use the major/minor diff --git a/Modules/_sha3/cleanup.py b/Modules/_sha3/cleanup.py index 4f53681b49e67bc..73b263de94d7e21 100755 --- a/Modules/_sha3/cleanup.py +++ b/Modules/_sha3/cleanup.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +# Usage: ./python Modules/_sha3/cleanup.py # Copyright (C) 2012 Christian Heimes (christian@python.org) # Licensed to PSF under a Contributor Agreement. # diff --git a/Objects/typeslots.py b/Objects/typeslots.py index 8ab05f91be12b0d..e9fd0b326eddc0a 100755 --- a/Objects/typeslots.py +++ b/Objects/typeslots.py @@ -1,5 +1,4 @@ -#!/usr/bin/python -# Usage: typeslots.py < Include/typeslots.h typeslots.inc +# Usage: ./python typeslots.py < Include/typeslots.h typeslots.inc import sys, re diff --git a/Parser/asdl_c.py b/Parser/asdl_c.py index 34bd7010cfb8fb1..60629c169dbc849 100755 --- a/Parser/asdl_c.py +++ b/Parser/asdl_c.py @@ -1,4 +1,3 @@ -#! /usr/bin/env python """Generate C code from an ASDL description.""" import os diff --git a/Python/makeopcodetargets.py b/Python/makeopcodetargets.py index 023c9e6c9f1adc1..bbdfc83d19cbd05 100755 --- a/Python/makeopcodetargets.py +++ b/Python/makeopcodetargets.py @@ -1,4 +1,3 @@ -#! /usr/bin/env python """Generate C code for the jump table of the threaded code interpreter (for compilers supporting computed gotos or "labels-as-values", such as gcc). """ diff --git a/Tools/clinic/clinic.py b/Tools/clinic/clinic.py index d4d779524685474..de6b49946385893 100755 --- a/Tools/clinic/clinic.py +++ b/Tools/clinic/clinic.py @@ -1,5 +1,3 @@ -#!/usr/bin/env python3 -# # Argument Clinic # Copyright 2012-2013 by Larry Hastings. # Licensed to the PSF under a contributor agreement. diff --git a/Tools/peg_generator/pegen/__main__.py b/Tools/peg_generator/pegen/__main__.py index 1dcbaad1c38870a..55c2ddd856b5d0e 100755 --- a/Tools/peg_generator/pegen/__main__.py +++ b/Tools/peg_generator/pegen/__main__.py @@ -1,5 +1,3 @@ -#!/usr/bin/env python3.8 - """pegen -- PEG Generator. Search the web for PEG Parsers for reference. From b15090941e18bf958114821adf82f46bbb1f92a9 Mon Sep 17 00:00:00 2001 From: Hai Shi Date: Sat, 5 Dec 2020 00:33:18 +0800 Subject: [PATCH 2/2] apply petr's comment --- Objects/typeslots.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Objects/typeslots.py b/Objects/typeslots.py index e9fd0b326eddc0a..41dc1c155fb1b47 100755 --- a/Objects/typeslots.py +++ b/Objects/typeslots.py @@ -1,4 +1,4 @@ -# Usage: ./python typeslots.py < Include/typeslots.h typeslots.inc +# Usage: ./python Objects/typeslots.py < Include/typeslots.h typeslots.inc import sys, re