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

时间:2022-12-30 07:23:14

When using zc.buildout to install Plone without the UnifiedInstaller, the resulting bin/buildout script has a truncated sys.path. I am used to seeing pages of eggs listed there, where I now only see these:

使用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',
  ]

When running bin/zeoserver and bin/zeoclient, everything works as expected (their sys.path is slightly longer, though still truncated), but I use the bin/buildout script to detect current sys.path from within my IDE, and this truncated form makes life a little more difficult for me.

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

[Edit: Additional and more pertinent question: (how) is it possible to mimic the behaviour of the UnifiedInstaller buildout, and insert all installed eggs into sys.path?]

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

Fwiw, the buildout.cfg looks like this:

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 个解决方案

#1


I'm pretty sure bin/buildout always contained only a couple entries.

我很确定bin / buildout总是只包含几个条目。

It'd be bin/instance or bin/client that would historically contain the list of eggs.

它是bin / instance或bin / client,它们在历史上包含了egg列表。

bin/buildout is only used for generating the environment, so it doesn't need all the python packages included in the path there.

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

bin/clients or bin/instance should set sys.path. On some versions of buildout, I think I've also seen it defined in parts/instance/site.py

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

#1


I'm pretty sure bin/buildout always contained only a couple entries.

我很确定bin / buildout总是只包含几个条目。

It'd be bin/instance or bin/client that would historically contain the list of eggs.

它是bin / instance或bin / client,它们在历史上包含了egg列表。

bin/buildout is only used for generating the environment, so it doesn't need all the python packages included in the path there.

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

bin/clients or bin/instance should set sys.path. On some versions of buildout, I think I've also seen it defined in parts/instance/site.py

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