I am creating a set of Python extensions with distutils. Extensions depend on external libraries (not related to Python) that are usually created from source code using the Makefile. These external libraries are unlikely to change frequently.
To ease the pain for users, my setup.py scripts extract libraries from the Internet using urllib.urlretrieve (), parse Make files to compile a list of the corresponding source files, and build them using config.add_library (). It works great, and all is well.
My question is: what is the best / recommended way to cache downloaded source files so that distutils do not load them again and again during recovery? Is it possible to store them, for example, in the build / src.macosx-10.6-x86_64-2.7 or build / temp.macosx-10.6-x86_64-2.7 folders created by distutils? If so, how is one distutils request for the name of these folders?
Thanks in advance!
source
share