[Distutils] problem with zc.buildout download-cache setting

Sydney Weidman syd at plug.ca
Tue Aug 4 18:29:59 CEST 2009


I have a buildout recipe (zc.buildout 1.3.0) for a Plone site I'm
building and it contains the line:

download-cache = downloads

but I find that when I run bin/buildout, the directory does not get
created and I get the following traceback:

[educommons at vrs OCWBuildout]$ bin/buildout -Uv
While:
  Initializing.
Error: The specified download cache:
'/home/educommons/OCWBuildout/downloads'
Doesn't exist.

The code from zc.buildout.buildout looks like:

        download_cache = options.get('download-cache')
        if download_cache:
            download_cache = os.path.join(options['directory'],
download_cache)
            if not os.path.isdir(download_cache):
                raise zc.buildout.UserError(
                    'The specified download cache:\n'
                    '%r\n'
                    "Doesn't exist.\n"
                    % download_cache)
            download_cache = os.path.join(download_cache, 'dist')
            if not os.path.isdir(download_cache):
                os.mkdir(download_cache)

            zc.buildout.easy_install.download_cache(download_cache)


It seems odd to me that if the download_cache directory doesn't exist,
that UserError is raised. Shouldn't the directory be created? What
would be the harm in that? Or am I missing something?

I realize that I could just mkdir downloads and it would work, but it
seems to defeat the simplicity of "python bootstrap.py; bin/buidout;
bin/instance start".

I'm sure this is some failure of understanding on my part, otherwise
I'm sure someone else would have encountered this issue before.

Regards,
Syd



More information about the Distutils-SIG mailing list