-
Notifications
You must be signed in to change notification settings - Fork 913
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
Add pip cache dir
#1646
Comments
Yeah we should add this, it's trivial. |
As part of this, I'll probably move |
Out of scope for this issue, could be useful to add some other ❯ pip cache --help
Usage:
pip3 cache dir
pip3 cache info
pip3 cache list [<pattern>] [--format=[human, abspath]]
pip3 cache remove <pattern>
pip3 cache purge
Description:
Inspect and manage pip's wheel cache.
Subcommands:
- dir: Show the cache directory.
- info: Show information about the cache.
- list: List filenames of packages stored in the cache.
- remove: Remove one or more package from the cache.
- purge: Remove all items from the cache.
``<pattern>`` can be a glob expression or a package name.
Cache Options:
--format <list_format> Select the output format among: human (default) or abspath Especially ❯ pip cache info
Package index page cache location (pip v23.3+): /Users/hugo/Library/Caches/pip/http-v2
Package index page cache location (older pips): /Users/hugo/Library/Caches/pip/http
Package index page cache size: 187.6 MB
Number of HTTP files: 870
Locally built wheels location: /Users/hugo/Library/Caches/pip/wheels
Locally built wheels size: 5.9 MB
Number of locally built wheels: 10 Shall I open a new issue for |
Yeah feel free to create a separate issue for |
Thanks, I created #1655 and sneaked |
Ah, heh, related 😁 actions/setup-python#818 |
Short version
Add a cross-platform way to find out the uv cache directory (like pip has) for use on GitHub Actions.
Long version
If we want to cache things installed by
uv pip install
on GitHub Actions, we need to do something like this:Adapted from https://github.com/actions/cache/blob/main/examples.md#multiple-oss-in-a-workflow
Or:
Adapted from https://github.com/actions/cache/blob/main/examples.md#multiple-oss-in-a-workflow-with-a-matrix
Or we may be able to choose a common directory using the
--cache-dir
flag orUV_CACHE_DIR
environment variable.Originally we had to do the same thing with pip (hence the examples at actions/cache).
But then pip 20.1 added a
pip cache dir
command (pypa/pip#7350 / pypa/pip#8095):If we add
uv pip cache dir
, we would similarly be able to simplify the config:Adapted from https://github.com/actions/cache/blob/main/examples.md#using-pip-to-get-cache-location
The text was updated successfully, but these errors were encountered: