Page MenuHomePhabricator
Paste P72709

python-builder-uv.feature
ActivePublic

Authored by gkyziridis on Jan 29 2025, 8:56 AM.
Referenced Files
F58306861: python-builder-uv.feature
Jan 29 2025, 8:56 AM
Subscribers
Feature: Python builder
Blubber supports a specialized Python builder for easy and consistent
dependency installation and setup for Python projects.
Background:
Given "examples/hello-world-python" as a working directory
@set3
Scenario: Installing Python application dependencies via Poetry
Given this "blubber.yaml"
"""
version: v4
variants:
hello:
base: python:3.10-bullseye
builders:
- python:
version: python3
poetry:
version: ==1.5.1
requirements: [pyproject.toml, poetry.lock]
copies: [local]
entrypoint: [poetry, run, python3, hello.py]
"""
When you build and run the "hello" variant
Then the entrypoint will have run successfully
@set5
Scenario: Installing Python application dependencies via Uv
Given this "blubber.yaml"
"""
version: v4
variants:
hello_uv:
base: python:3.10-bullseye
builders:
- python:
version: python3
uv:
version: ==0.5.23
requirements: [pyproject.toml, uv.lock]
copies: [local]
entrypoint: [uv, run, python3, hello.py]
"""
When you build and run the "hello" variant
Then the entrypoint will have run successfully