Skip to content

"--package-cache" #878

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

Closed
qwcode opened this issue Apr 1, 2013 · 13 comments
Closed

"--package-cache" #878

qwcode opened this issue Apr 1, 2013 · 13 comments
Labels
auto-locked Outdated issues that have been locked by automation type: enhancement Improvements to functionality

Comments

@qwcode
Copy link
Contributor

qwcode commented Apr 1, 2013

this was discussed in broad terms at pycon with @dholth and @jezdez

here's the text from a gist I posted months ago. reposting it as a real issue to get discussion at some point. not sure when this would land in an actual milestone to be worked on.


"--package-cache"

  • a new "pip install" config option that offers name-based (i.e. not url-based) caching.
  • the "--download-cache" option would stay as it is, and not be altered
  • the package-cache dir would just contain packages (e.g. "nose-1.2.tar.gz", or lxml-2.5[..].whl), anything you've installed while using it.
  • the package-cache would be turned off by default, since the user assumes a certain amount of risk/responsibility in using it (no hash checking with what pypi lists)
  • the package-cache (if turned on) would be checked prior to using the PackageFinder (which searches pypi and findlinks)
    (if the req was "nose", any nose version in the package-cache would "win", unless --upgrade is specified)
  • package-cache offers an alternative to this workflow:
    • pip install -d DIR PACKAGES
    • pip install --no-index --find-links=DIR PACKAGES
  • "--package-cache" could be used with "--download-cache", but to no advantage most of the time. the only case I can imagine it would help:
    • you've never used "--package-cache" before, but you have a download-cache
    • the first attempt at using package-cache would benefit from an existing download-cache.
  • a "pip install --build-wheel" option could be created that "pip wheel"'s installed packages to the package cache if set.
@qwcode
Copy link
Contributor Author

qwcode commented Apr 1, 2013

a good mailing list thread on the --download-cache a while back with comments from me and carl
https://groups.google.com/d/msg/python-virtualenv/J92cKpftSjA/i9zSae8zV3AJ

@ptone
Copy link
Contributor

ptone commented Apr 5, 2013

+1, I think this becomes even more useful with wheel support.

I think it would be useful when using download cache to have packages get moved (with new name scheme) from download-cache -> package-cache, but if both are enabled, only store new downloads in package-cache.

Also would be good to have a "prune-cache" command that can go through and delete older versions - of course you may want to keep older versions, but the prune option can just cover the common case.

@harobed
Copy link

harobed commented May 20, 2013

a good mailing list thread on the --download-cache a while back with comments from me and carl
https://groups.google.com/d/msg/python-virtualenv/J92cKpftSjA/i9zSae8zV3AJ

In this thread, I'm agreed with Marcus Smith proposal.

@harobed
Copy link

harobed commented May 20, 2013

the package-cache dir would just contain packages (e.g. "nose-1.2.tar.gz", or lxml-2.5[..].whl), anything you've installed while using it.

Will a wheel archive be created for all installed package ?

@qwcode
Copy link
Contributor Author

qwcode commented May 28, 2013

Will a wheel archive be created for all installed package ?

not the way this was written up originally (this was pre-wheel thinking).
but I just added another bullet to the description for that idea.

@harobed
Copy link

harobed commented Aug 22, 2013

Have you already started to work on implementation of this feature ?

@harobed
Copy link

harobed commented Aug 26, 2013

@qwcode ping

@qwcode
Copy link
Contributor Author

qwcode commented Aug 26, 2013

no

@harobed
Copy link

harobed commented Aug 26, 2013

Ok, I'll may be work on this feature…

@ngrilly
Copy link

ngrilly commented Sep 11, 2013

This feature --package-cache, especially combined with --build-wheel, would be a very useful addition to pip, and ease a lot of deployment scenario.

@Tinche
Copy link

Tinche commented Apr 19, 2014

A thousand times yes! This will also make multi-project handling easier.

How about a way of installing a package from the file system into the cache? For example, after building a wheel with 'python setup.py bdist_wheel' I'd like to be able to add the generated wheel to the cache, either automatically (controlled via feature) or manually (custom pip command?). I guess 'pip install -e . --build-wheel' could be used to accomplish this using the last bullet point.

@qwcode
Copy link
Contributor Author

qwcode commented Apr 19, 2014

@Tinche see #1572 "Internal Wheel cache", which replaces this idea for the most part.

@dstufft dstufft added this to the Improve our User Experience milestone Apr 19, 2014
@dstufft
Copy link
Member

dstufft commented Apr 13, 2015

Going to close this, as it's now done(ish)!

@dstufft dstufft closed this as completed Apr 24, 2015
@lock lock bot added the auto-locked Outdated issues that have been locked by automation label Jun 5, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Jun 5, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
auto-locked Outdated issues that have been locked by automation type: enhancement Improvements to functionality
Projects
None yet
Development

No branches or pull requests

6 participants