Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

setuptools download cache path

Can I set download cache path for setuptools? I can do that with pip by setting environment variable PIP_DOWNLOAD_CACHE (How to cache downloaded PIP packages), but I don't know, what to do with setuptools.

I want everytime, when I run:

python setup.py develop

the setuptools caches the downloaded files, so I don't have to download it again.

like image 539
Tarzan Avatar asked Feb 21 '14 04:02

Tarzan


1 Answers

You can use the options -a, -d and -f to create and use a cache directory. This is what the help text for them says:

--always-copy (-a)             Copy all needed packages to install dir
--install-dir (-d)             install package to DIR
--find-links (-f)              additional URL(s) to search for packages

You first use python setup.py develop -a -d CACHEDIR to cache the needed packages in the directory of your choice, then use that directory as a source in the future with python setup.py develop -f CACHEDIR.

You may need to add any flags you normally use to one, the other, or both invocations, depending on the flag in question.

like image 99
otus Avatar answered Oct 12 '22 06:10

otus