setuptools Entry_points/console_scripts 在 shebang 中有特定的 Python 版本

2024-03-23

我正在 RHEL6(使用 Python2.6)上生成 Python 包,并尝试将其部署到 RHEL7 服务器(Python2.7)。该包包括使用entry_points/console_scripts生成的脚本。

但是,生成的脚本在 shebang 中具有特定的 python2.6 版本,如下所示:

#!/usr/bin/env python2.6

我如何覆盖或禁用它,以便它只生成:

#!/usr/bin/env python

entry_points = {
    'console_scripts':[
        ...        
        ]
},
options = {
    'build_scripts': {
        'executable': '/usr/bin/env python',
    },
},     
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

setuptools Entry_points/console_scripts 在 shebang 中有特定的 Python 版本 的相关文章

随机推荐