3
如何在使用构建脚本构建脚本时为Python指定参数?在脚本的shebang行中添加Python参数(脚本使用buildout和zc.recipe.egg:脚本)
这里是我的buildout.cfg:
[buildout]
parts = python
develop = .
[python]
recipe = zc.recipe.egg:scripts
eggs = myproject
而且setup.py:
from setuptools import setup, find_packages
setup(
name = 'myproject',
packages = find_packages(),
entry_points = """
[console_scripts]
myscript = myproject:main
""",
)
我得到这个配置以下家当:
$ pip install .
$ head -n1 /usr/local/bin/myscript
#!/usr/bin/python
而且我想这样的:
#!/usr/bin/python -u
如何操作?我尝试将arguments = -u
和interpreter = python -u
添加到buildout.cfg
。它没有工作。