← Back to issue list

fix(plugins/uv): Avoid modifying already relocatable venv

View original Github issue

Metadata

Project
charmcraft
Number
#2565
Type
pull request
State
open
Author
carlcsaposs-canonical
Labels
Created
2026-02-06 15:52:49+00:00
Updated
2026-02-09 10:00:27+00:00
Closed

Current evaluation

No evaluation has been recorded for this issue yet.

Issue body

The uv plugin from craft-parts already uses `uv venv --relocatable` to create an activate script that has a portable path instead of an absolute path https://github.com/canonical/craft-parts/blob/71291d50ec95aed813215e89463866dd09aaaa5e/craft_parts/plugins/uv_plugin.py#L108 Currently, charmcraft is overriding the relocatable path set by uv with its own relocatable path (since it's expecting `activate` to contain a hardcoded absolute path, like it does with `venv`) This currently doesn't cause any issues, but could break in the future if the format of the activate script created by `uv venv` changes (since charmcraft is using `sed` to update the script) Use the relocatable option provided by uv's public API instead of patching a private implementation detail

Evaluation history

No evaluation history available.