uv plugin should compile bytecode
Metadata
Current evaluation
uv bytecode compilation was enabled by default and shipped in craft-parts 2.28.0 via merged PR #1406 (commit 28dafc19).
Resolution: closed resolved
Reason: PR #1406 set UV_COMPILE_BYTECODE=1 for uv virtual environments and was merged as commit 28dafc19. The 2.28.0 changelog confirms the feature and documents UV_COMPILE_BYTECODE=0 as an opt-out.
Evaluated by: mr-cal-bot
No scores available.
Issue body
### What needs to get done
The uv plugin should compile Python bytecode in the virtual environment by setting [`UV_COMPILE_BYTECODE=1`](https://docs.astral.sh/uv/configuration/environment/#uv_compile_bytecode) in the environment.
(This also allows a user or application to override it if they don't want to do so.)
### Why it needs to get done
The distributed package shouldn't have to compile the bytecode, especially for snaps, where the bytecode would have to be compiled on each run.
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| stealth/space-bunny-alpha | — | closed resolved | uv bytecode compilation was enabled by default and shipped in craft-parts 2.28.0 via merged PR #1406 (commit 28dafc19). | |
| stealth/space-bunny-alpha | — | closed resolved | Fixed in craft-parts#1406, merged as commit 28dafc19; the uv plugin now enables Python bytecode compilation. | |
| qwen/qwen3.6-35b-a3b | — | — | Uv plugin bytecode compilation was addressed and merged in pull request #1406. The change sets UV_COMPILE_BYTECODE=1 to precompile Python bytecode, optimizing runtime performance for snap distributions. | |
| qwen/qwen3.6-35b-a3b |
Staleness:
85
Complexity:
15
Confidence:
85
Support Request:
10
|
needs triage | Request to set UV_COMPILE_BYTECODE=1 in the uv plugin to pre-compile Python bytecode and avoid runtime compilation, particularly for snaps. Unlabelled and inactive for over a year. | |
| qwen3.6-35b-a3b-mtp-q6 |
Staleness:
85
Complexity:
10
Confidence:
80
Support Request:
10
|
needs triage | Feature request to set UV_COMPILE_BYTECODE=1 in the uv plugin environment to optimize snap packaging. Unlabelled and inactive for over 1.5 years with no maintainer response. |
Update history
| Date | Change |
|---|---|
| closed |
Related work
-
Likely Fixed By:
canonical/craft-parts#1406
(confidence 100%)
Merged fix enabling Python bytecode compilation in the uv plugin.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #1406 fix: enable python bytecode in the uv plugin | craft-parts | merged | Merged PR #1406 (commit 28dafc19) enables Python bytecode compilation in the uv plugin, with UV_COMPILE_BYTECODE=0 as an opt-out; shipped in 2.28.0. |