“Maybe distutils package was not designed for the purpose I am using it (I am not using it to install python modules or anything), but this behavior is not well documented anyway.” Aaaah, I had no idea you were using the function directly for something unrelated to distutils’s purpose. There is no clear distinction between public and private functions in distutils, so I understand how you could find this seemingly useful function and use it in your code.
The solution is to use a public function like os.makedirs. For distutils, I don’t think a doc change is needed: the cache is an implementation detail. |