fabfile.py 文件源码

python
阅读 23 收藏 0 点赞 0 评论 0

项目:hadroid 作者: hadroid 项目源码 文件源码
def install_package():
    """Install the Hadroid Python package."""
    with tempfile.NamedTemporaryFile() as src_files:
        local('git ls-files --exclude-standard > {}'.format(src_files.name))
        rsync_project(
            remote_dir=env.code_path,
            local_dir='./',
            extra_opts=('--rsync-path="sudo -u {} rsync" --files-from={}'
                        .format(env.app_user, src_files.name)),
            delete=True,
            default_opts='-thrvz')
    with sudosu(user=env.app_user), python.virtualenv(env.venv_path), \
            cd(env.code_path):
        with settings(warn_only=True):
            sudo('pip uninstall -y hadroid')
        sudo('pip install -e .')
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号