element-hq / element-hq/synapse
Make the debian packages we build use `uv` to install dependencies
- Dominant language
- Python
- Stars
- 4.6k
- Forks
- 600
- Avg merge
- 5d 22h
- Merged PRs (30d)
- 51
Description
*See [parent issue](https://github.com/element-hq/synapse/issues/19566) for more context*
### Current state
`debian/build_virtualenv` builds a `.deb` package by:
1. Creating a temp venv, installing `poetry==2.2.1` + `poetry-plugin-export==1.9.0`
2. Running `poetry export --extras all --extras test -o exported_requirements.txt`
3. Appending `systemd-python==235` (with hash) to the exported requirements
4. Using `dh_virtualenv` with `--requirements=exported_requirements.txt` and `--no-deps`
### Changes needed
- Replace `poetry export` with `uv export --no-emit-project --frozen --extra all --extra test` (or similar) to generate the requirements from `uv.lock`
- This removes the need to install Poetry at all in the build — just need `uv` (much faster)
- The `systemd-python==235` append should still work the same way
- The rest of the `dh_virtualenv` invocation remains unchanged
- `debian/clean` references `exported_requirements.txt` — no change needed there
Contributor guide
Research direction
Start by reading debian/build_virtualenv and the current uv.lock export configuration; compare the existing Poetry setup with the requested uv export options. Keep the systemd-python append and dh_virtualenv invocation unchanged, leave debian/clean as-is, and confirm the generated requirements come from uv.lock with the all and test extras.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- build-system
- Issue type
- Refactor
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 55/100