在 Windows 上将 Plone Egg 作为 Python 模块安装

发布于 2024-08-17 09:22:35 字数 730 浏览 10 评论 0原文

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

我已经单独下载了 Egg 文件(角色、工作流程、邮件、内容)并将它们放置在如下目录结构中:

  • collective/
    • __init__.py
    • 群组空间/
      • __init__.py
      • 内容/...
      • 角色/...
      • 工作流程/...
      • 邮件/...

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

如果我以错误的方式进行此操作,我欢迎任何尝试不同方式的建议。

I have a Plone site (Plone version 3.1.2) that I need to install a product called GrufSpaces on - (http://plone.org/products/grufspaces). However, it is a production site and so I can't easily take it down to upgrade Plone to 3.2+ in order to use buildout; using buildout would allow me to easily add Grufspaces (collective.groupspace.roles etc) as a Product.

I have downloaded the egg files separately (roles, workflow, mail, content) and placed them in a directory structure like so:

  • collective/
    • __init__.py
    • groupspace/
      • __init__.py
      • content/...
      • roles/...
      • workflow/…
      • mail/...

What I thought I could do is add this "collective" folder to [plone directory]/Zope/lib/python as a Python module. The idea being once its added I can restart Plone/Zope and it will automatically pick it up and make it available within Plone as a Python Module. Unfortunately it has not worked as of yet.

If I am going about this the wrong way I welcome any suggestion to try this a different way.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

柠北森屋 2024-08-24 09:22:35

如果您尝试安装 GrufSpaces 2.0,那么您应该考虑升级到 Plone 3.3(请参阅 安装要求

将collective.*包放置到[plone目录]/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 产品 来自 SVN(plone.org 上的下载链接对我不起作用)并将其放在 Products 文件夹中。

If you are trying to install GrufSpaces 2.0 then you should consider upgrading to Plone 3.3 (see the install requirements)

Placing the collective.* packages to [plone directory]/Zope/lib/python should work. But these packages are not compatible with Plone 3.1. Here is the example of ImportError that I get when using collective.groupspace.roles with Plone 3.1:

  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

Besides collective.* packages you have to download GrufSpaces product from SVN (download link at plone.org doesn't work for me) and place it in Products folder.

自由范儿 2024-08-24 09:22:35

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

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

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

另请参阅 http://plone.org/documentation/kb/third-party- products/installing,“在没有构建的情况下安装 Zope 2 式产品”部分。

Did you check GrufSpaces' INSTALL.TXT? From there:

Unpack it into your Zope Products Folder

For Plone, the easiest way is probably to unpack it the top level products folder.

See also http://plone.org/documentation/kb/third-party-products/installing, section "Installing Zope 2-style Products Without Buildout".

忆离笙 2024-08-24 09:22:35

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

因此,如果您更喜欢扩建路线,那就这么做吧。尽管升级你的 Plone 可能仍然是个好建议。

No advice specific to GruffSpaces as I've never used it but it sounds like you may be under the mistaken impression that you need Plone 3.2+ for buildout. This is incorrect. Buildout works just fine with Plone 3.1.2. I've also done buildouts for Plone 2.5.5 and even one for Plone 2.1 (although this last one was a bit tricky because the required python for that version doesn't do buildout).

So if you prefer the buildout route, just do it. Although upgrading your Plone is probably still good advice.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文