From 53d347afcead75b9ffaa91efdeb03b4464b16d53 Mon Sep 17 00:00:00 2001 From: Quentin Gliech Date: Wed, 1 Apr 2026 13:10:27 +0200 Subject: [PATCH] debian: Use uv instead of Poetry to export requirements Replace poetry with uv in the Debian build_virtualenv script for exporting pip-compatible requirements from the lockfile. This is part of the migration from Poetry to uv for dependency management (#19572). Co-Authored-By: Claude Opus 4.6 (1M context) --- .../{poetry_lockfile.yaml => uv_lockfile.yaml} | 0 debian/build_virtualenv | 13 ++++++++----- 2 files changed, 8 insertions(+), 5 deletions(-) rename .github/workflows/{poetry_lockfile.yaml => uv_lockfile.yaml} (100%) diff --git a/.github/workflows/poetry_lockfile.yaml b/.github/workflows/uv_lockfile.yaml similarity index 100% rename from .github/workflows/poetry_lockfile.yaml rename to .github/workflows/uv_lockfile.yaml diff --git a/debian/build_virtualenv b/debian/build_virtualenv index 7bbf52ddd9..1774aa43ba 100755 --- a/debian/build_virtualenv +++ b/debian/build_virtualenv @@ -30,15 +30,18 @@ case $(dpkg-architecture -q DEB_HOST_ARCH) in ;; esac -# Manually install Poetry and export a pip-compatible `requirements.txt` +# Use uv to export a pip-compatible `requirements.txt` from the lockfile. +# uv export reads pyproject.toml + uv.lock directly, no venv needed. TEMP_VENV="$(mktemp -d)" python3 -m venv "$TEMP_VENV" source "$TEMP_VENV/bin/activate" pip install -U pip -pip install poetry==2.2.1 poetry-plugin-export==1.9.0 -poetry export \ - --extras all \ - --extras test \ +pip install uv +uv export \ + --no-emit-project \ + --frozen \ + --extra all \ + --extra test \ -o exported_requirements.txt # Keep journald logging support in the packaged virtualenv when using # systemd.journal.JournalHandler in /etc/matrix-synapse/log.yaml.