[Distutils] Experience of setuptools' cache design

Phillip J. Eby pje at telecommunity.com
Fri Jan 18 18:32:00 CET 2008


At 10:13 AM 1/18/2008 -0500, Jim Fulton wrote:

>On Jan 18, 2008, at 9:49 AM, Phillip J. Eby wrote:
>...
>>>* If the default is to remain to create files on "import", I would
>>>like error checking and fall backs. If the cache directory cannot be
>>>created in $HOME, I would like the code to create it somewhere else
>>>(or not at all) instead of giving me an exception. As end user I did
>>>not request the cache-directory to be made, and therefore do not want
>>>to be given an exception caused by it not being created. Especially
>>>as I do not know what to do with such an exception. Perhaps creating
>>>it in /tmp/python-eggs-$USERNAME, for example.
>>
>>That seems like a reasonable fallback, and I'll take a look at
>>implementing it in a future release.  Thanks for the idea!
>
>
>I'm not sure which of the ideas above you are referring to but I think
>implicitly creating files at run time outside the installed package is
>a bad idea.

I'm referring to the idea of using a temporary directory as a cache.


>   I would want some way to prevent it, especially in a
>production environment.

The only way to absolutely prevent it is to install things 
unzipped.  And if you're going to do that, you might as well use 
.egg-info style eggs, since that will give better runtime 
performance.  That is, for an egg "foo-1.2-py2.5-platform.egg", you 
would unzip its contents to the target directory and then rename the 
extracted EGG-INFO directory to "foo-1.2-py2.5-platform.egg-info".



>Jim
>
>--
>Jim Fulton
>Zope Corporation
>



More information about the Distutils-SIG mailing list