mitogen-hq/mitogen

Modules and script hard code /usr/bin/python in hashbang

Open

#811 geöffnet am 14. Feb. 2021

Auf GitHub ansehen
 (5 Kommentare) (2 Reaktionen) (0 zugewiesene Personen)Python (193 Forks)batch import
affects-0.2affects-0.3cigood first issuepython3

Repository-Metriken

Stars
 (2.210 Stars)
PR-Merge-Metriken
 (Durchschn. Merge 22T 19h) (7 gemergte PRs in 30 T)

Beschreibung

A number of modules, and scripts in the test suite start with

#!/usr/bin/python

In general it is better to use

#!/usr/bin/env python

because that allows execution inside a virtualenv, or when python is installed elsewhere, e.g. /usr/loca/bin/python.

There may be cases in which we really do want to hard code the path, e.g.

  • testing detection/selection of ansible_python_interpreter (correct name?)
  • mechanics of Ansible module transfer, or recognition .

If so those should be explictly noted in a comment.

Contributor Guide