-
Notifications
You must be signed in to change notification settings - Fork 862
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
UV_CACHE_DIR not used for Python installation #9749
Comments
@zanieb -- Should I change this? |
We changed this in #6043 because of #6036 We don't really cache installs right now, this is just the location we download to to ensure the install is idempotent. Can you explain a bit more why this matters to you? I would like to cache downloads anyway (per #8025) in which we'd use the |
Totally forgot about that change, whoops. |
It matters for two reasons.
|
It's not a cache though, we are just downloading the file there and moving it into the install location. There is no persistence or caching. It's a misnomer. |
Yeah it's more like a scratch directory. |
Regardless, can you expand on
I still don't follow what precise issue you're talking about here. Why is it important? What happens? |
I’m not sure how familiar you are with the concept of DevDrives has Microsoft had defined them, but they are mountable volume within Windows where you would keep code caches, git repo clones, and other things that may trigger a lot of churn with enterprise security tools (AV, heuristic scanners, IDS, etc…). They are then pitching to desktop security teams to have all developers keep things isolated to these DevDrives so that they can simplify exceptions and whatnot to these locations. Since uv downloads a copy of python, it may be a good fit to have it also use the DevDrives system. Maybe not. In either case, the confusion of having it named cache is what threw me off. If it’s not really a cache, then perhaps this issue should become about changing the name of the directory to avoid confusion. |
Yep we're familiar with DevDrives (we use them in CI to improve the GitHub Actions perf!)
Makes sense, I think you want to change I've changed the name of the directory in #9756 |
Excellent! Thank you. I’ll give it a try tomorrow. |
This works for me. Thank you. |
On Windows, when running a
uv python install
while having UV_CACHE_DIR set, does not result in uv using that cache location. It instead uses the default location %APPDATA%\uv\python.cache.uv python install
should respect UV_CACHE_DIR. This is especially useful when using a DevDrive and have security tools set to either ignore or be more lenient with DevDrives.Platform: Windows 10
uv version: 0.5.7
Debug log attached. It doesn't show it, but my UV_CACHE_DIR is set to E:\Cache\uv
uv-debug.log
The text was updated successfully, but these errors were encountered: