mitogen-hq/mitogen

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

开放

#811 创建于 2021年2月14日

 (5 条评论) (2 个反应) (0 位负责人)Python (193 个派生)batch import
affects-0.2affects-0.3cigood first issuepython3

仓库指标

星标
 (2,210 个星标)
PR 合并指标
 (平均合并 22天 19小时) (30 天内合并 7 个 PR)

描述

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.

贡献者指南