On Tue, Feb 02, 2016 at 14:10 +0100, Florian Schulze wrote:
On 2 Feb 2016, at 12:23, Paul Moore wrote:
I want to have a devpi instance I can use for offline use. The server will be in offline mode 99% of the time, and only online when I make a special effort. So I want a way to "preload" the PyPI cache so that packages I might need for offline use are available. I'd expect to maybe go online once a week or so (possibly less, depends on how much development activity I'm doing at the time), and refresh the cache with latest versions.
What's the best way of doing this? One option would be to do something like "pip download -r requirements.txt" to refresh all the packages in the given requirements file. I guess that would probably work, but it feels a bit clunky. And it doesn't really give me a way of doing anything more complex (for example, removing older versions of packages that I no longer need to have cached). Is there a better way to manage the cache?
Currently there is no better way. You might be able to write a small script or modify pip to only request the HEAD of the download URL. That way the devpi-server will download the package, but you don't have to download it from devpi.
If you run in this shallow mode you need to have all dependencies listed, otherwise you'll miss some and your cache is not filled enough.
I think there is no way currently to remove old versions besides going through the files directly. A plugin to devpi-server using some internals could implement that though.
I think more precise cache handling didn't come up so far because most people including me don't seem to worry too much disk space usage. Do you have an idea how you'd like to remove cached packages UI-wise? hand-selecting them? Removing all but newest versions for each package?
I guess one could try to make "devpi remove" work for mirror indexes -- it accepts version specs like pytest<2.6 etc. but currently only works on private indices.
Regards, Florian Schulze
-- You received this message because you are subscribed to the Google Groups "devpi-dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to devpi-dev+...@googlegroups.com. To post to this group, send email to devp...@googlegroups.com. Visit this group at https://groups.google.com/group/devpi-dev. For more options, visit https://groups.google.com/d/optout.