【问题标题】:Install Plone egg as a Python module on Windows在 Windows 上将 Plone egg 安装为 Python 模块
【发布时间】:2011-01-03 01:02:00
【问题描述】:

我有一个 Plone 站点(Plone 版本 3.1.2),我需要在 - (http://plone.org/products/grufspaces) 上安装一个名为 GrufSpaces 的产品。但是,它是一个生产站点,因此我不能轻易将其取下来将 Plone 升级到 3.2+ 以使用构建;使用 buildout 可以让我轻松地将 Grufspaces(collective.groupspace.roles 等)添加为产品。

我已经分别下载了 egg 文件(角色、工作流、邮件、内容)并将它们放在一个目录结构中,如下所示:

  • 集体/
    • __init__.py
    • 组空间/
      • __init__.py
      • 内容/...
      • 角色/...
      • 工作流程/…
      • 邮件/...

我想我能做的就是将这个“集体”文件夹添加到 [plone directory]/Zope/lib/python 作为 Python 模块。一旦添加了这个想法,我可以重新启动 Plone/Zope,它会自动将其拾取并使其在 Plone 中作为 Python 模块可用。不幸的是,它还没有起作用。

如果我以错误的方式解决这个问题,我欢迎任何建议以不同的方式尝试。

【问题讨论】:

    标签: python plone zope plone-3.x


    【解决方案1】:

    如果您尝试安装 GrufSpaces 2.0,那么您应该考虑升级到 Plone 3.3(参见 install requirements

    将collective.* 包放到[plone directory]/Zope/lib/python 应该可以。但这些软件包与 Plone 3.1 不兼容。这是我在 Plone 3.1 中使用collective.groupspace.roles 时得到的ImportError 示例:

      File "/home/andrey/tmp/zope/instance/lib/python/collective/groupspace/roles/browser/roles.py", line 23, in ?
        from plone.app.workflow import PloneMessageFactory as _
    zope.configuration.xmlconfig.ZopeXMLConfigurationError: File "/home/andrey/tmp/zope/instance/etc/site.zcml", line 15.2-15.23
        ZopeXMLConfigurationError: File "/home/andrey/tmp/zope/instance/Products/GrufSpaces/configure.zcml", line 17.4-17.53
        ZopeXMLConfigurationError: File "/home/andrey/tmp/zope/instance/lib/python/collective/groupspace/roles/configure.zcml", line 7.4-7.34
        ZopeXMLConfigurationError: File "/home/andrey/tmp/zope/instance/lib/python/collective/groupspace/roles/browser/configure.zcml", line 5.4-10.10
        ImportError: cannot import name PloneMessageFactory
    

    除了collective.* 包,您必须下载GrufSpaces 产品from SVN(plone.org 的下载链接对我不起作用)并将其放在Products 文件夹中。

    【讨论】:

      【解决方案2】:

      您检查过 GrufSpaces 的 INSTALL.TXT 吗?从那里:

      将其解压到您的 Zope 产品文件夹中

      对于 Plone,最简单的方法可能是将其解压缩到顶级 products 文件夹。

      另请参阅http://plone.org/documentation/kb/third-party-products/installing,“安装 Zope 2-style Products without Buildout”部分。

      【讨论】:

        【解决方案3】:

        没有针对 GruffSpaces 的建议,因为我从未使用过它,但听起来您可能误以为您需要 Plone 3.2+ 进行构建。这是不正确的。 Buildout 适用于 Plone 3.1.2。我还为 Plone 2.5.5 进行了构建,甚至为 Plone 2.1 做了一个(尽管最后一个有点棘手,因为该版本所需的 python 不做构建)。

        因此,如果您更喜欢构建路线,那就去做吧。虽然升级你的 Plone 可能仍然是个好建议。

        【讨论】:

          猜你喜欢
          • 2011-01-23
          • 2011-07-28
          • 1970-01-01
          • 2011-05-17
          • 1970-01-01
          • 1970-01-01
          • 2015-02-28
          • 1970-01-01
          • 2013-06-22
          相关资源
          最近更新 更多