Setuptools entry_points/console_scripts 在 shebang 中有特定的 Python 版本 [英] Setuptools entry_points/console_scripts have specific Python version in shebang

查看:68
本文介绍了Setuptools entry_points/console_scripts 在 shebang 中有特定的 Python 版本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

I am generating a Python package on RHEL6 (with Python2.6), and trying to deploy it to a RHEL7 server (Python2.7). The package includes scripts generated with entry_points/console_scripts.

然而,生成的脚本在shebang中有特定的python2.6版本,如:

However, the generated scripts have the specific python2.6 version in the shebang, as in:

#!/usr/bin/env python2.6

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

How can I override or disable this so it just generates:

#!/usr/bin/env python

推荐答案

entry_points = {
    'console_scripts':[
        ...        
        ]
},
options = {
    'build_scripts': {
        'executable': '/usr/bin/env python',
    },
},     

这篇关于Setuptools entry_points/console_scripts 在 shebang 中有特定的 Python 版本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆