我在python 2.7中编写游戏,想要编写游戏开发环境的"bootstrap"脚本,然后调用铲子.如果未检测到virtualenvwrapper,我将使用virtualenv bootstrap解决方案.但是,如果virtualenvwrapper 被检测到,我想用它代替.
问题是virtualenvwrapper内联shell函数不是由我的引导脚本继承的.据我所知,这排除了像"mkvirtualenv NotOrion"这样的运行.由于环境变量"VIRTUALENVWRAPPER_VIRTUALENV" 的设置(在我的情况下,从MacPorts的:/opt/local/bin/virtualenv-2.7),我试图用它直接代替:
#!/usr/bin/env bash
# Name your first "bootstrap" environment:
ENV_NAME=NotOrion
# Options for your first environment:
ENV_OPTS='--no-site-packages --distribute'
unset PYTHONDONTWRITEBYTECODE
function create_virtualenvwrapper_venv {
echo "installing into virtualenvwrapper directory"
cd $WORKON_HOME
$VIRTUALENVWRAPPER_VIRTUALENV $ENV_OPTS $ENV_NAME
cd -
#mkvirtualenv $ENV_NAME
#workon $ENV_NAME
}
function create_standalone_venv {
# not run/snipped
}
if [ -z "$VIRTUALENVWRAPPER_VIRTUALENV" ]; then
create_standalone_venv
else
create_virtualenvwrapper_venv
fi
pip install shovel
shovel help …Run Code Online (Sandbox Code Playgroud) 我正在查看stackstorm docker-compose 文件,其中几乎所有容器都有一行根据 dns_search: .docker-compose 文档,dns_search用于配置搜索域。
我习惯于在透明地将域添加到不合格的短域的情况下看到这种情况。例如,如果我添加dns_search: mydomain.com,我希望“host1”透明地解析为“host1.mydomain.com”。
我以前从未见过这个集合是单个点.。做这个配置的作用/目的是什么?