当前位置: 首页 > 工具软件 > Buildout > 使用案例 >

不,真的,您可以仅使用Buildout安装Plone

冯奇思
2023-12-01

This is a follow up to my ‘Getting Excited about Plone as Eggs’ post.

这是我的“对克隆作为蛋感到兴奋”帖子的后续内容。

This is a follow up to my Getting Excited about Plone as Eggs post.

这是我对“蛋克隆无趣”一文的后续。

Generally speaking, the recommended and supported way to install Plone is via the installers, e.g. the Unified Installer. Obviously, if you want things to Just Work™ you should be using the latest stable release, which is why I linked to the 3.3.3 unified installer (although there is no Windows installer for 3.3.3 yet, which is why it’s not released on plone.org).

一般来说,建议和支持的安装Plone的方法是通过安装程序,例如Unified Installer 。 显然,如果您想让Just Work™可用,则应该使用最新的稳定版本,这就是为什么我链接到3.3.3统一安装程序的原因(尽管还没有适用于3.3.3的Windows安装程序,这就是为什么尚未发布的原因)在plone.org上)。

That said, since both Plone and Zope 2 have been packaged as eggs  (Plone became an egg in version 3.2 and Zope 2 became an egg as of Zope 2.12 which is the version of Zope 2 that Plone 4 will use) it has become “mostly trivial” to write a buildout.cfg to install Plone with. That means that you don’t even need paster to do it. You can just fire up an editor and type:

就是说,由于Plone和Zope 2都被包装成鸡蛋(Plone在版本3.2中成为鸡蛋,而Zope 2在Zope 2.12(即Plone 4将使用的Zope 2版本)中成为鸡蛋),因此已经成为“大部分琐碎的”来编写一个buildout.cfg来安装Plone。 这意味着您甚至不需要粘贴即可。 您可以启动一个编辑器并输入:

[buildout]
parts = instance

[instance]
recipe = plone.recipe.zope2instance
user = admin:admin
eggs =
    Plone
[buildout]
parts = instance

[instance]
recipe = plone.recipe.zope2instance
user = admin:admin
eggs =
    Plone

Amazing!

惊人!

Of course there is the nasty bit about PIL, which I get around now-a-days by adding a very specific find-link, e.g.:

当然,关于PIL有点令人讨厌,我现在通过添加一个非常具体的查找链接来解决它,例如:

What you should have at this point is a working Plone, but not necessarily a repeatable buildout. The reason being we have not pinned any egg versions yet, so we are effectively asking for whatever the latest version of Plone is on PyPI. Fun for playing, not fun for production. Fortunately the nice Plone people have created a bunch of version pins for us, so we just need to use them:

此时,您应该拥有一个正在运行的Plone,但不一定是可重复的扩展。 原因是我们尚未固定任何egg版本,因此我们实际上是在询问PyPI上最新的Plone版本。 玩的乐趣,而不是生产的乐趣。 幸运的是,漂亮的Plone员工为我们创建了许多版本图钉,因此我们只需要使用它们:

[buildout]
extends = http://dist.plone.org/release/4.0a3/versions.cfg
versions = versions
parts = instance
find-links = http://dist.plone.org/thirdparty/PILwoTk-1.1.6.4.tar.gz

[instance]
recipe = plone.recipe.zope2instance
user = admin:admin
eggs =
    PILwoTk
    Plone
[buildout]
extends = http://dist.plone.org/release/4.0a3/versions.cfg
versions = versions
parts = instance
find-links = http://dist.plone.org/thirdparty/PILwoTk-1.1.6.4.tar.gz

[instance]
recipe = plone.recipe.zope2instance
user = admin:admin
eggs =
    PILwoTk
    Plone

If you are completely new to buildout and you are thinking to yourself right now “what in the world is this guy talking about?” then you will likely want to install buildout first so you can join in the fun. Fortunately, the nice Python people have made that easy with a package called Distribute.

如果您是完全陌生的人,并且现在正在思考自己:“这个人在说什么?” 那么您可能会想先安装扩展版,以便加入其中。 幸运的是,Python优秀的人通过一个名为Distribute的包使这一切变得容易。

Following their instructions, you can do this:

按照他们的指示,您可以执行以下操作:

Then:

然后:

$ easy_install zc.buildout
$ mkdir plone
$ cd plone
$ buildout init
$ easy_install zc.buildout
$ mkdir plone
$ cd plone
$ buildout init

After which you will have a buildout.cfg file, and you can follow along with the above steps. Happy?

之后,您将拥有一个buildout.cfg文件,并且可以按照上述步骤进行操作。 快乐?

The best part about all of this is that (on a fast internet connection) it should only be a matter of minutes before you are able to do this:

关于这一切的最好的部分是(在快速的Internet连接上)只需几分钟即可实现:

and be staring at a thing of beauty.

凝视着美丽。

Of course, if you are running in the foreground (recommended for debugging) you should see something like this:

当然,如果您在前台运行(建议进行调试),您应该会看到类似以下内容:

aclark@Alex-Clarks-MacBook-Pro:~/Developer/public-plone/ > bin/instance fg
/Users/aclark/Developer/public-plone/parts/instance/bin/runzope -X debug-mode=on
2010-01-07 12:07:56 INFO ZServer HTTP server started at Thu Jan  7 12:07:56 2010
 Hostname: 0.0.0.0
 Port: 8080
2010-01-07 12:08:14 INFO Zope Ready to handle requests
aclark@Alex-Clarks-MacBook-Pro:~/Developer/public-plone/ > bin/instance fg
/Users/aclark/Developer/public-plone/parts/instance/bin/runzope -X debug-mode=on
2010-01-07 12:07:56 INFO ZServer HTTP server started at Thu Jan  7 12:07:56 2010
 Hostname: 0.0.0.0
 Port: 8080
2010-01-07 12:08:14 INFO Zope Ready to handle requests

If you’d like to get a little less noisy and skip debug mode but still run in the foreground, you can use April 2008’s famous addition to plone.recipe.zope2instance:

如果您希望减少噪音并跳过调试模式,但仍在前台运行,则可以对plone.recipe.zope2instance使用2008年4月的著名添加:

Sweet, blissful, silent running Plone.

甜美,幸福,安静的Plone。

Happy Plone 4’ing all!

快乐克隆4'ing all!

翻译自: https://www.pybloggers.com/2010/01/no-really-you-can-just-use-buildout-to-install-plone/

 类似资料: