Setuptools entry_points/console_scripts have specific Python version in shebang

我的梦境 提交于 2019-12-07 11:43:53

问题


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.

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

回答1:


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


来源:https://stackoverflow.com/questions/28575431/setuptools-entry-points-console-scripts-have-specific-python-version-in-shebang

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!