devpi icon indicating copy to clipboard operation
devpi copied to clipboard

Docs on using devpi as a PyPI mirror - no information on managing the mirror

Open pfmoore opened this issue 6 years ago • 3 comments

This information may be available somewhere, but I'm not entirely sure where, and I'm not sure where I could ask other than here (the mailing list seems pretty quiet).

I want to set up devpi as a local PyPI mirror on my laptop, which is only occasionally connected to the internet. The initial setup is easy, and is all documented, so that's fine. But I couldn't find any information on how to "prime" the mirror with a selected set of packages - the docs talk about running "pip install" and that will add the requested packages to the mirror, but there's nothing explaining how I'd ask the mirror to cache a specific package without trying to install it.

Also, I'd like to be able to build wheels for some packages that don't publish wheels on PyPI and make those available too (for use on my PC that doesn't have a compiler set up). Again, there's no documentation explaining how you'd do that.

If this information is too specialised for the docs, then where would be a good place to ask for help? As I said, the mailing list appears relatively dead (no posts for about 3 months) and there's no other community support links in the docs.

pfmoore avatar Feb 27 '19 14:02 pfmoore

There is no specific way to prime the cache. It's mostly meant to allow installing again in case the internet is down or slow. That's why the docs talk about "pip install". Think of it as more like a cache than a mirror.

For wheels you upload them to an index you created and add the package name to the mirror_whitelist option (or set it to * if you understand what that does). That index should inherit from root/pypi. After that you use that index as your pip install source and when a package with the version you uploaded is requested, pip will see the wheel. This has come up often enough now, that it should be added to the docs. Feel free to make a PR when you got it working.

fschulze avatar Feb 27 '19 14:02 fschulze

The mailinglist is still in use, just very low traffic.

fschulze avatar Feb 27 '19 14:02 fschulze

Thanks for the explanation. I'll see if I can get something working (it might take a while, I have limited time for this) and if I do I'll create a PR.

pfmoore avatar Feb 27 '19 14:02 pfmoore