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) <noreply@anthropic.com>
This commit is contained in:
Quentin Gliech
2026-04-01 13:10:27 +02:00
co-authored by Claude Opus 4.6
parent fe062a12eb
commit 53d347afce
2 changed files with 8 additions and 5 deletions
+8 -5
View File
@@ -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.