我正在使用 zc.buildout 生成一个名为“test”的脚本。我正在使用该脚本来调用我自己的测试运行器。(用于构建的可用测试运行器尚未使用 Python 2.7 中的新“发现”功能。)
无论如何,这是我的 .cfg 文件中的相关部分:
[test]
recipe = buildout_script
template = runtests.sh.in
target = test
这是我的 runtests.sh.in 模板的样子
#!/bin/bash
python %(directory)s/src/runtests.py
这是放置在我的 bin 文件夹中的结果输出bin/test
。
!/bin/bash
python /Users/myname/projects/myproject/trunk/www/src/desktop/src/runtests.py
当我执行这个脚本时,它使用的是系统 Python 而不是我 bin 文件夹中的 Python。
我的 .cfg 文件中的相关部分是:
[python]
recipe = zc.recipe.egg
interpreter = python
eggs = ${buildout:eggs}
如何让我的脚本使用 bin/python 而不是系统 python?