From 3546f34e525567dcc120bfa2d89802e742d64e97 Mon Sep 17 00:00:00 2001 From: Laurent Arnoud Date: Wed, 23 Apr 2025 15:16:19 +0200 Subject: [PATCH 1/2] fix: poetry example indent --- .../src/languages/python/dependencies.md | 32 +++++++++---------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/sites/upsun/src/languages/python/dependencies.md b/sites/upsun/src/languages/python/dependencies.md index 6b703aa783..6c838ad43c 100644 --- a/sites/upsun/src/languages/python/dependencies.md +++ b/sites/upsun/src/languages/python/dependencies.md @@ -183,22 +183,22 @@ applications: # The location of the application's code. source: root: "myapp" - type: 'python:{{% latest "python" %}}' - dependencies: - python3: - poetry: '*' - variables: - env: - POETRY_VIRTUALENVS_IN_PROJECT: true - POETRY_VIRTUALENVS_CREATE: true - hooks: - build: | - # Fail the build if any errors occur - set -eu - # Download the latest version of pip - python{{% latest "python" %}} -m pip install --upgrade pip - # Install dependencies - poetry install + type: 'python:{{% latest "python" %}}' + dependencies: + python3: + poetry: '*' + variables: + env: + POETRY_VIRTUALENVS_IN_PROJECT: true + POETRY_VIRTUALENVS_CREATE: true + hooks: + build: | + # Fail the build if any errors occur + set -eu + # Download the latest version of pip + python{{% latest "python" %}} -m pip install --upgrade pip + # Install dependencies + poetry install ``` <---> +++ From 3d8d422afaf0897dee01df0c0c8fb9ea8f623de7 Mon Sep 17 00:00:00 2001 From: Laurent Arnoud Date: Wed, 23 Apr 2025 15:21:53 +0200 Subject: [PATCH 2/2] docs: add uv to python dependencies --- .../platform/src/languages/python/dependencies.md | 13 +++++++++++++ sites/upsun/src/languages/python/dependencies.md | 15 +++++++++++++++ 2 files changed, 28 insertions(+) diff --git a/sites/platform/src/languages/python/dependencies.md b/sites/platform/src/languages/python/dependencies.md index 1a61c2e643..b5b06c0694 100644 --- a/sites/platform/src/languages/python/dependencies.md +++ b/sites/platform/src/languages/python/dependencies.md @@ -141,6 +141,19 @@ hooks: ``` {{< /codetabs >}} +## UV + +[uv](https://docs.astral.sh/uv/) is an extremely fast Python package and project +manager, written in Rust. + +```yaml {configFile="app"} +{{< snippet name="myapp" config="app" root="myapp" >}} +type: 'python:{{% latest "python" %}}' +dependencies: + python3: + uv: "*" +``` + ## Poetry [Poetry](https://python-poetry.org/docs/) is a tool for dependency management and packaging in Python. diff --git a/sites/upsun/src/languages/python/dependencies.md b/sites/upsun/src/languages/python/dependencies.md index 6c838ad43c..9400b374cf 100644 --- a/sites/upsun/src/languages/python/dependencies.md +++ b/sites/upsun/src/languages/python/dependencies.md @@ -141,6 +141,21 @@ hooks: ``` {{< /codetabs >}} +## UV + +[uv](https://docs.astral.sh/uv/) is an extremely fast Python package and project +manager, written in Rust. + +```yaml {configFile="app"} +applications: + # The app's name, which must be unique within the project. + myapp: + type: 'python:{{% latest "python" %}}' + dependencies: + python3: + uv: "*" +``` + ## Poetry [Poetry](https://python-poetry.org/docs/) is a tool for dependency management and packaging in Python.