zc.buildout今天在例行补丁期间随机爆发

时间:2017-08-01 10:12:09

标签: python python-2.7 pip setuptools buildout

立即将安全补丁部署到生产机器和zc.buildout 随意打破。我已经尝试升级pip,但这仍然无法解决问题。

$ ./bin/buildout 
mr.developer: Queued 'django-appregister' for checkout.
mr.developer: Queued 'django-countries' for checkout.
mr.developer: Queued 'django-mailer' for checkout.
mr.developer: Queued 'django-ostinato' for checkout.
mr.developer: Skipped checkout of existing package 'django-appregister'.
mr.developer: Skipped checkout of existing package 'django-countries'.
mr.developer: Skipped checkout of existing package 'django-mailer'.
mr.developer: Skipped checkout of existing package 'django-ostinato'.
Develop: '/home/evopoints/webapp/src/django-ostinato'
/usr/lib/python2.7/dist-packages/setuptools/dist.py:364: UserWarning: Normalizing '1.1.beta' to '1.1b0'
normalized_version,
warning: no previously-included files matching '*.pyc' found anywhere in distribution
Develop: '/home/evopoints/webapp/src/django-mailer'
Develop: '/home/evopoints/webapp/src/django-countries'
Develop: '/home/evopoints/webapp/src/django-appregister'
/usr/lib/python2.7/dist-packages/setuptools/dist.py:364: UserWarning: Normalizing '0.4.dev' to '0.4.dev0'
normalized_version,
Unused options for buildout: 'include-site-packages' 'unzip'.
Updating _mr.developer.
Installing python.
While:
Installing python.

An internal error occurred due to a bug in either zc.buildout or in a
recipe being used:
Traceback (most recent call last):
File "/home/evopoints/webapp/eggs/zc.buildout-2.9.4-py2.7.egg/zc/buildout/buildout.py", line 2123, in main
    getattr(buildout, command)(args)
File "/home/evopoints/webapp/eggs/zc.buildout-2.9.4-py2.7.egg/zc/buildout/buildout.py", line 796, in install
    installed_files = self[part]._call(recipe.install)
File "/home/evopoints/webapp/eggs/zc.buildout-2.9.4-py2.7.egg/zc/buildout/buildout.py", line 1553, in _call
    return f()
File "/home/evopoints/webapp/eggs/zc.recipe.egg-2.0.3-py2.7.egg/zc/recipe/egg/egg.py", line 126, in install
    reqs, ws = self.working_set()
File "/home/evopoints/webapp/eggs/zc.recipe.egg-2.0.3-py2.7.egg/zc/recipe/egg/egg.py", line 84, in working_set
    allow_hosts=self.allow_hosts)
File "/home/evopoints/webapp/eggs/zc.buildout-2.9.4-py2.7.egg/zc/buildout/easy_install.py", line 913, in install
    return installer.install(specs, working_set)
File "/home/evopoints/webapp/eggs/zc.buildout-2.9.4-py2.7.egg/zc/buildout/easy_install.py", line 657, in install
    for spec in specs]
File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 2879, in parse
    req, = parse_requirements(s)
ValueError: need more than 0 values to unpack

为什么会在随机时间发生? (这不是第一次) 现在,我将不得不摆脱扩建 完全,因为它太不可靠,对于客户生产站点来说是随机的 在他的网站代码中的小补丁中失败。

2 个答案:

答案 0 :(得分:0)

interpreter的{​​{1}}选项从python2.7更改为python有助于我在类似情况下:

[buildout]
parts =
  python

[python]
# ...
interpreter = python2.7

答案 1 :(得分:0)

如果使用-vvvv运行扩展,则可能会看到实际错误。 以我的经验,“下载需要大于0的值”错误有时是在下载某些内容时出错。

还可以帮助升级setuptools和zc.buildout的版本(2.12.0已经淘汰,您正在使用2.9.4)。有很多修复程序可以补偿环境变化(大多数情况下是setuptools的变化)。

请注意,pypi也已移动。从http到https,从pypi.python.org到pypi.org。因此,调整index=行(如果有的话)可能会节省大量的重定向,这也可能会起作用。

在过去的几个月中,我没有看到任何严重的扩展中断,至少github问题跟踪器很安静:-)