[Distutils] buildout/distribute (?) issue with Python 3 on Windows

Marius Gedminas marius at pov.lt
Wed Feb 13 12:30:55 CET 2013


On Wed, Feb 13, 2013 at 11:07:05AM +0000, Chris Withers wrote:
> Hi All,
> 
> Anyone seen anything like this?

No.

> 
> 
> An internal error occured due to a bug in either zc.buildout or in a
> recipe being used:
> Traceback (most recent call last):
>   File "c:\users\jenkins\.buildout\eggs\zc.buildout-2.0.0-py3.3.egg\zc\buildout\buildout.py",
> line 1808, in main
>     getattr(buildout, command)(args)
>   File "c:\users\jenkins\.buildout\eggs\zc.buildout-2.0.0-py3.3.egg\zc\buildout\buildout.py",
> line 606, in install
>     installed_files = self[part]._call(recipe.install)
>   File "c:\users\jenkins\.buildout\eggs\zc.buildout-2.0.0-py3.3.egg\zc\buildout\buildout.py",
> line 1333, in _call
>     return f()
>   File "c:\users\jenkins\.buildout\eggs\zc.recipe.egg-2.0.0a3-py3.3.egg\zc\recipe\egg\egg.py",
> line 162, in install
>     relative_paths=self._relative_paths,
>   File "c:\users\jenkins\.buildout\eggs\zc.buildout-2.0.0-py3.3.egg\zc\buildout\easy_install.py",
> line 916, in scripts
>     contents = dist.get_metadata('scripts/' + name)
>   File "c:\users\jenkins\.buildout\eggs\distribute-0.6.34-py3.3.egg\pkg_resources.py",
> line 1217, in get_metadata
>     return self._get(self._fn(self.egg_info,name)).decode("utf-8")
>   File "c:\users\jenkins\.buildout\eggs\distribute-0.6.34-py3.3.egg\pkg_resources.py",
> line 1327, in _get
>     stream = open(path, 'rb')
> PermissionError: [Errno 13] Permission denied: 'c:\\users\\jenkins\\.buildout\\eggs\\coverage-3.6-py3.3-win32.egg\\EGG-INFO\\scripts\\__pycache__'

Heh.

> Full log here:
> 
> http://jenkins.simplistix.co.uk/job/testfixtures-buildout/PYTHON=3.3,label=windows/175/console
> 
> Ideas welcome...

I think something like this

diff --git a/src/zc/buildout/easy_install.py b/src/zc/buildout/easy_install.py
index 1c81593..60fab6e 100644
--- a/src/zc/buildout/easy_install.py
+++ b/src/zc/buildout/easy_install.py
@@ -913,6 +913,8 @@ def scripts(reqs, working_set, executable, dest=None,
             # /EGG-INFO/scripts/.
             if dist.metadata_isdir('scripts'):
                 for name in dist.metadata_listdir('scripts'):
+                    if dist.metadata_isdir(name):
+                        continue
                     contents = dist.get_metadata('scripts/' + name)
                     distutils_scripts.append((name, contents))
         else:

IOW bug in buildout, please file.

Marius Gedminas
-- 
Always proofread carefully to see if you any words out.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 190 bytes
Desc: Digital signature
URL: <http://mail.python.org/pipermail/distutils-sig/attachments/20130213/6439d9e5/attachment.pgp>


More information about the Distutils-SIG mailing list