不使用UnifiedInstaller时,为什么不填充sys.path?

时间:2015-05-06 19:17:19

标签: plone buildout

使用zc.buildout在没有UnifiedInstaller的情况下安装Plone时,生成的bin / buildout脚本有一个截断的sys.path。我习惯看到那里列出的鸡蛋页面,我现在只看到这些:

import sys
sys.path[0:0] = [
  '/home/campbell/Plone/repos/bika.uw/lib/python2.7/site-packages',
  '/home/campbell/Plone/repos/bika.uw/eggs/setuptools-15.1-py2.7.egg',
  ]

当运行bin / zeoserver和bin / zeoclient时,一切都按预期工作(它们的sys.path稍长,但仍然被截断),但我使用bin / buildout脚本从我的IDE中检测当前的sys.path,这种截断的形式让我的生活变得更加困难。

[编辑:更多和更相关的问题:(如何)可以模仿UnifiedInstaller buildout的行为,并将所有已安装的egg插入sys.path?]

Fwiw,buildout.cfg看起来像这样:

[buildout]
extends = http://dist.plone.org/release/4.3.4/versions.cfg
versions = versions

zeoserver-address = 8110
zeoclient-address = 8080
user = admin:adminsecret

parts =
    zeoserver
    zeoclient

eggs =
    Plone
    Pillow
    bika.lims
    bika.test

develop =
    .
    src/bika.lims

[lxml]
recipe = z3c.recipe.staticlxml
egg = lxml==2.3.6
force = false
static-build = true

[zeoserver]
recipe = plone.recipe.zeoserver
zeo-address = ${buildout:zeoserver-address}

[zeoclient]
recipe = plone.recipe.zope2instance
zeo-address = ${buildout:zeoserver-address}
http-address = ${buildout:zeoclient-address}
user = ${buildout:user}
eggs = ${buildout:eggs}
zeo-client = true
shared-blob = on
http-fast-listen = off

[versions]
zc.buildout=2.3.1
setuptools=15.2

1 个答案:

答案 0 :(得分:2)

我非常确定bin / buildout始终只包含几个条目。

它是历史上包含鸡蛋列表的bin / instance或bin / client。

bin / buildout仅用于生成环境,因此它不需要路径中包含的所有python包。

bin / clients或bin / instance应该设置sys.path。在某些版本的buildout上,我想我也看到它在parts / instance / site.py中定义