I have a Jenkins instance which builds my project with its attendant PyPI packages from requirements.txt. However, like with TravisCI builds, building from scratch each time is very time intensive, and means builds take >4-5mins which is much slower than would be ideal.
What I'm looking for is a way to cache downloaded packages locally, so when a build with the same dependencies is started, rather than having to get from PyPI it can just fetch locally, when a change in version occurs, it can fetch the upstream package as it does now.
Is there such a project out there, as Googling this evening hasn't revealed much.
pip supports this out of the box
pip install --download-cache=DIR
if an existing file is requested, it's read from the cache. This can also be done with an environment variable PIP_DOWNLOAD_CACHE
;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With