Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use path file instead of
sitecustomize.py
(#7161)
## Summary Use a path file (`.pth`) instead of `sitecustomize.py` for configuring path in emphemeral virtualenvs, overlaying the ephemeral venv on top of the base `.venv`. `sitecustomize.py` is a module in the python installation and as such a unique resource - homebrew pythons on macos already install such a file and thus uv's `sitecustomize.py`, placed in the ephemeral env, did not have any effect. I don't find any documentation explicitly saying that addsitedir is valid in `.pth` files but from trial it seems to be - and there is the precedent of the existing _virtualenv.pth _virtualenv.py pair that do nontrivial operations. ## Test Plan - Testing on ephemeral venv, resolving to base venv including editable install in base: done (py3.7, 3.12) - Testing on homebrew python/macos: done (py3.11) - tests: run_editable Fixes #7152
- Loading branch information