Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

PyPI local cache for Jenkins/local builds

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.

like image 404
jvc26 Avatar asked Jan 19 '13 18:01

jvc26


1 Answers

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;

like image 108
second Avatar answered Sep 24 '22 09:09

second