INNER CODE UNIT · Python

deploy_python_with_poetry

piku/piku · piku.py:757

def deploy_python_with_poetry(app, deltas={}):
    """Deploy a Python application using Poetry"""

    echo("=====> Starting EXPERIMENTAL poetry deployment for '{}'".format(app), fg='red')
    virtualenv_path = join(ENV_ROOT, app)
    requirements = join(APP_ROOT, app, 'pyproject.toml')
    env_file = join(APP_ROOT, app, 'ENV')
    symlink_path = join(APP_ROOT, app, '.venv')
    if not exists(symlink_path):
        echo("-----> Creating .venv symlink '{}'".format(app), fg='green')
        symlink(virtualenv_path, symlink_path, target_is_directory=True)
    # Set unbuffered output and readable UTF-8 mapping
    env = {
        **environ,
        'POETRY_VIRTUALENVS_IN_PROJECT': '1',
        'PYTHONUNBUFFERED': '1',
        'PYTHONIOENCODING': 'UTF_8:replace'
    }

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…