From 4650dbfedd02f8e474c2ca775b741d1b08e40a18 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Hrn=C4=8Diar?= Date: Tue, 8 Dec 2020 21:17:33 +0100 Subject: [PATCH] Remove shebang from nonexecutable script (#192) When packaging chardet and pip (which bundles it) in Fedora, we have realized that there is a nonexecuatble file with a shebang line. It seems that the primary purpose of this file is to be imported from Python code or to be executed via python chardet/cli/chardetect.py or python -m chardet.cli.chardetect and hence the shebang appears to be unnecessary. Shebangs are hard to handle when doing downstream packaging, because it makes sense for upstream to use #!/usr/bin/env python while in the RPM package, we need to avoid that and use a more specific interpreter. Since the shebang was unused, I propose to remove it to avoid the problems. --- chardet/cli/chardetect.py | 1 - 1 file changed, 1 deletion(-) diff --git a/chardet/cli/chardetect.py b/chardet/cli/chardetect.py index f0a4cc5d..9ab62015 100755 --- a/chardet/cli/chardetect.py +++ b/chardet/cli/chardetect.py @@ -1,4 +1,3 @@ -#!/usr/bin/env python """ Script which takes one or more file paths and reports on their detected encodings