Skip to content

Include all site packages directories in ephemeral environment overlays#15121

Merged
zanieb merged 5 commits intomainfrom
zb/fix-site-package
Aug 8, 2025
Merged

Include all site packages directories in ephemeral environment overlays#15121
zanieb merged 5 commits intomainfrom
zb/fix-site-package

Conversation

@zanieb
Copy link
Copy Markdown
Member

@zanieb zanieb commented Aug 7, 2025

Related to #15113

The case in the linked issue is that we perhaps should not be allowing uv run --with with system interpreters at all. I think we can consider that, but the issue highlighted that uv run --with for a system interpreter is broken if the base interpreter has custom site packages. This generalizes beyond system interpreters so we should probably fix our overlays.

@zanieb zanieb added the bug Something isn't working label Aug 7, 2025
@zanieb zanieb temporarily deployed to uv-test-registries August 7, 2025 01:16 — with GitHub Actions Inactive
@zanieb zanieb force-pushed the zb/fix-site-package branch from 7349da2 to 80fab6b Compare August 7, 2025 12:42
@zanieb zanieb temporarily deployed to uv-test-registries August 7, 2025 12:44 — with GitHub Actions Inactive
@zanieb zanieb temporarily deployed to uv-test-publish August 7, 2025 12:44 — with GitHub Actions Inactive
@zanieb zanieb force-pushed the zb/fix-site-package branch from 80fab6b to 95687c7 Compare August 7, 2025 13:07
@zanieb zanieb temporarily deployed to uv-test-registries August 7, 2025 13:09 — with GitHub Actions Inactive
@zanieb zanieb temporarily deployed to uv-test-publish August 7, 2025 13:09 — with GitHub Actions Inactive
@zanieb zanieb force-pushed the zb/fix-site-package branch from 95687c7 to 01e2251 Compare August 7, 2025 13:19
@zanieb zanieb temporarily deployed to uv-test-registries August 7, 2025 13:22 — with GitHub Actions Inactive
@zanieb zanieb temporarily deployed to uv-test-publish August 7, 2025 13:22 — with GitHub Actions Inactive
@zanieb zanieb force-pushed the zb/fix-site-package branch from 01e2251 to 18ec9bd Compare August 7, 2025 13:38
@zanieb zanieb temporarily deployed to uv-test-registries August 7, 2025 13:40 — with GitHub Actions Inactive
@zanieb zanieb temporarily deployed to uv-test-publish August 7, 2025 13:41 — with GitHub Actions Inactive
@zanieb zanieb temporarily deployed to uv-test-registries August 7, 2025 18:17 — with GitHub Actions Inactive
@zanieb zanieb temporarily deployed to uv-test-publish August 7, 2025 18:17 — with GitHub Actions Inactive
@zanieb
Copy link
Copy Markdown
Member Author

zanieb commented Aug 7, 2025

This is failing because we only use purelib and platlib to determine site packages but we need to actually read all of the site directories.

@zanieb zanieb force-pushed the zb/fix-site-package branch from 7d054b2 to a7114cf Compare August 8, 2025 15:28
@zanieb zanieb temporarily deployed to uv-test-registries August 8, 2025 15:31 — with GitHub Actions Inactive
@zanieb zanieb temporarily deployed to uv-test-publish August 8, 2025 15:31 — with GitHub Actions Inactive
@zanieb zanieb force-pushed the zb/fix-site-package branch from a7114cf to 91d30a2 Compare August 8, 2025 15:35
@zanieb zanieb temporarily deployed to uv-test-registries August 8, 2025 15:38 — with GitHub Actions Inactive
@zanieb zanieb temporarily deployed to uv-test-publish August 8, 2025 15:38 — with GitHub Actions Inactive
@zanieb zanieb force-pushed the zb/fix-site-package branch from 91d30a2 to 6329197 Compare August 8, 2025 15:46
@zanieb zanieb marked this pull request as ready for review August 8, 2025 15:47
- name: "Test `uv run` with system Python"
run: |
./uv run -p python3.11 -v python -c "import debian"
./uv run -p python3.11 -v --with anyio python -c "import debian"
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This would fail without this change

@zanieb zanieb force-pushed the zb/fix-site-package branch from 6329197 to 4706269 Compare August 8, 2025 15:49
@zanieb zanieb temporarily deployed to uv-test-registries August 8, 2025 15:51 — with GitHub Actions Inactive
@zanieb zanieb temporarily deployed to uv-test-publish August 8, 2025 15:51 — with GitHub Actions Inactive
@zanieb
Copy link
Copy Markdown
Member Author

zanieb commented Aug 8, 2025

Interesting, now I broke something else. Will investigate that.

@zanieb zanieb temporarily deployed to uv-test-registries August 8, 2025 17:17 — with GitHub Actions Inactive
@zanieb zanieb temporarily deployed to uv-test-publish August 8, 2025 17:17 — with GitHub Actions Inactive
@zanieb zanieb merged commit bdb4b06 into main Aug 8, 2025
95 checks passed
@zanieb zanieb deleted the zb/fix-site-package branch August 8, 2025 18:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants