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

"--package-cache" #878

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

Comments

Projects
None yet
6 participants
@qwcode
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

This comment has been minimized.

Contributor

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

This comment has been minimized.

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

This comment has been minimized.

Contributor

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

This comment has been minimized.

Contributor

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

This comment has been minimized.

Contributor

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

This comment has been minimized.

Contributor

harobed commented Aug 22, 2013

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

@harobed

This comment has been minimized.

Contributor

harobed commented Aug 26, 2013

@qwcode ping

@qwcode

This comment has been minimized.

Contributor

qwcode commented Aug 26, 2013

no

@harobed

This comment has been minimized.

Contributor

harobed commented Aug 26, 2013

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

@ngrilly

This comment has been minimized.

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.

@dstufft dstufft referenced this issue Apr 18, 2014

Closed

Obsolete pip2014.com #1731

4 of 5 tasks complete
@Tinche

This comment has been minimized.

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

This comment has been minimized.

Contributor

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

This comment has been minimized.

Member

dstufft commented Apr 13, 2015

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

@dstufft dstufft closed this Apr 24, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment