1

我正在使用安装程序 Plone-4.3.1-win64.exe 全新安装 Plone 4.3.1 的 Windows 7 SP1 64 位。

Plone 和 Zope 运行良好。我还可以通过将包名称附加到 buildout.cfg 来安装鸡蛋,例如 plone.app.relationfield。但是,当我尝试使用以下方法安装开发人员工具时:

bin\buildout -c develop.cfg

我得到以下输出:

Unused options for buildout: 'buildout-user' 'need-sudo'.
Updating _mr.developer.
Updating instance.
Updating repozo.
Updating backup.
Updating zopepy.
Updating precompiler.
Compiling Python files.
SyntaxError: ('invalid syntax', ('c:\\plone43\\eggs\\restrictedpython-3.6.0-py2.
6.egg\\RestrictedPython\\tests\\before_and_after27.py', 30, 17, '    x = {y: y f
or y in whatever if y}\n'))

SyntaxError: ('invalid syntax', ('c:\\plone43\\eggs\\restrictedpython-3.6.0-py2.
6.egg\\RestrictedPython\\tests\\security_in_syntax27.py', 6, 13, '    {y: y for
_restricted_name in x}\n'))

Compiling locale files.
Error while compiling c:\plone43\eggs\python_gettext-1.2-py2.6.egg\pythongettext
\tests\test5.po
Error while compiling c:\plone43\eggs\python_gettext-1.2-py2.6.egg\pythongettext
\tests\test_escape.po
Updating run-instance.
Updating service.
Updating test.
Updating diazotools.
Installing zopeskel.
Getting distribution for 'zopeskel.diazotheme==1.1'.
warning: no previously-included files matching '*' found under directory 'docs\_
build\_sources'
error: Setup script exited with error: Setup script exited with error: Setup scr
ipt exited with error: SandboxViolation: open('build\\lib\\paste\\evalexception\
\media\\MochiKit.packed.js', 'wb') {}

The package setup script has attempted to modify files on your system
that are not within the EasyInstall build area, and has been aborted.

This package cannot be safely installed by EasyInstall, and may not
support alternate installation locations even if you run its setup
script by hand.  Please inform the package's author and the EasyInstall
maintainers to find out if a fix or workaround is available.
An error occurred when trying to install zopeskel.diazotheme 1.1. Look above thi
s message for any errors that were output by easy_install.
While:
  Installing zopeskel.
  Getting distribution for 'zopeskel.diazotheme==1.1'.
Error: Couldn't install: zopeskel.diazotheme 1.1
*************** PICKED VERSIONS ****************
[versions]

*************** /PICKED VERSIONS ***************

我主要是尝试安装 zopeskel 和 zopeskel.dexterity 模板,如果我注释掉 zopeskel.diazotheme,它们也会以同样的方式失败。事实上,如果我将它们注释掉,除了 zopeskel.diazotheme 和 zopeskel.dexterity 之外,我可以安装所有东西。上述 RestrictedPython 语法错误仍然存​​在,但似乎没有任何影响。

这是所有开箱即用的配置内容。我一直在搜索并尝试我能想到的一切,包括重新安装。我已经与 Plone 合作多年,但我对这个没有想法。

任何帮助表示赞赏。

4

1 回答 1

3

我终于解决了这个问题,但我仍然不知道确切的问题是什么。它与 easy_install 和目录访问有关 - 可能是临时目录,也可能是由于在构建过程中发生的某种竞争条件。

解决方案的总结是安装股票 develop.cfg 文件中的所有内容除了zopeskel.diazothemezopeskel.dexterityDocFinderTab buildout 的分发尝试下载也有一个错误。这是一个空的 zip 文件。

问题中提到的Windows 7 64 位配置以及Windows XP SP3 32 位机器都采用了这种方法。在这两种情况下,根据2014 年 5 月 20 日最新的 Plone 网站推荐使用Plone 4.3.1 Windows 安装程序。最新的 Plone 4.3.3 没有 Windows 安装程序,因此路径是使用 4.3.1 安装程序和安装后升级 Plone。在安装这些软件包之前我没有升级。Linux 和/或 OSX 都得到了我的许可,可以从地球上根除 Windows,但它仍然存在。

以下是步骤:

  1. 打开 Windows 服务管理器并停止Plone 4.3.1服务。
  2. 将 Plone 4.3.1 服务设置为手动启动,这样就没有任何有趣的事情了。
  3. 在可以处理 unix 行尾的文本编辑器中打开C:\Plone43\buildout.cfg
  4. 在第 80 行附近找到egg变量并将plone.app.relationfield添加到列表中:

    鸡蛋 = Plone Pillow Products.PloneHotfix20130618 plone.app.relationfield

  5. 保存 buildout.cfg

  6. c:\Plone43运行中的命令提示符:

    bin\buildout -n

  7. 忽略任何错误和警告。
  8. 从 PyPI,将DocFinderTab 1.0.5 zip 包下载到C:\Plone43\downloads\dist
  9. 在文本编辑器(不是记事本)中,打开C:\Plone43\develop.cfg
  10. 在第 144 行附近找到[zopeskel]部分。
  11. 注释掉zopeskel.diazothemezopeskel.dexterity
[佐佩斯克尔]
# 安装 paste 和 Zopeskel
食谱 = zc.recipe.egg
鸡蛋=
    佐佩斯克尔
    粘贴
    粘贴部署
    粘贴脚本
# zopeskel.diazotheme
# zopeskel.dexterity
    热情释放器
    ${构建:鸡蛋}
  1. 保存develop.cfg
  2. 从 C:\Plone43 中的命令提示符运行:

    bin\buildout -c 开发.cfg

  3. 忽略无数的错误和警告 - 会有血。
  4. 从 PyPI 下载zopeskel.dexterity 1.5.4.1 zip 文件
  5. 在文本编辑器中打开buildout.cfg
  6. 在第 203 行附近找到[version]部分
  7. 将zopeskel.dexterity上的版本从1.5.2更改为1.5.4.1
  8. 保存 buildout.cfg
  9. 解压 zopeskel.dexterity 包,使所有文件都位于C:\Plone43\downloads\dist\zopeskel.dexterity-1.5.4.1中。
  10. 确保您的 zip 工具不会同时创建名为 zopeskel.dexterity-1.5.4.1 的子目录。如果是这样,请将该目录剪切并粘贴到上一层并覆盖另一层。
  11. 从 PyPI 中,将zopeskel.diazotheme 1.1 zip 包下载到 dist 目录。
  12. 以与 zopeskel.dexterity 相同的方式解压缩 zopeskel.diazotheme。
  13. 在 c:\Plone43 的命令提示符下,运行以下命令:

    bin\buildout -v setup "C:\Plone43\downloads\dist\zopeskel.dexterity-1.5.4.1\setup.py" 安装

  14. 下一次运行:

    bin\buildout -v setup "C:\Plone43\downloads\dist\zopeskel.diazotheme-1.1\setup.py" 安装

  15. 在 Windows 服务管理器中,将 Plone 4.3.1 服务重置为自动并启动它。

现在一切都应该正常了。

于 2014-05-21T04:13:33.367 回答