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

Buildout食谱提示:hexagonit.recipe.download

岳城
2023-12-01

How to handle difficult old-style add-ons.

如何处理困难的旧式附件。

Sometimes an “old-style” add-on is distributed as foo.tar.gz and extracts to foo/, but the package is called bar. This can be a problem when using the plone.recipe.productdistros recipe because when bar is extracted to parts/productdistros/foo it will not work.

有时,“旧式”加载项以foo.tar.gz形式分发并提取到foo/ ,但该程序包称为bar 。 当使用plone.recipe.productdistros配方时,这可能是一个问题,因为将bar提取到parts/productdistros/foo ,它将无法工作。

Fortunately there is hexagonit.recipe.download, which allows you to specify the destination. For example, ZNagios (an add-on that integrates Zope with Nagios) is available as a tarball here:

幸运的是,有hexagonit.recipe.download ,它允许您指定目的地。 例如, ZNagios (将Zope与Nagios集成在一起的附加程序)可以在以下位置作为压缩包使用:

If we use productdistros, we end up with ZNagios installed in parts/productdistros/trunk. But if we use hexagonit.recipe.download we can control the destination.

如果使用productdistros,我们最终将ZNagios安装在parts/productdistros/trunk 。 但是,如果我们使用hexagonit.recipe.download我们可以控制目标。

[buildout]
parts = znagios

[znagios]
recipe = hexagonit.recipe.download
url = http://svn.gocept.com/viewcvs/ZNagios/trunk.tar.gz?view=tar
destination = products/ZNagios
strip-top-level-dir = True
[buildout]
parts = znagios

[znagios]
recipe = hexagonit.recipe.download
url = http://svn.gocept.com/viewcvs/ZNagios/trunk.tar.gz?view=tar
destination = products/ZNagios
strip-top-level-dir = True

After running Buildout you should have the following in your products/ directory:

运行Buildout之后,您应该在products/目录中包含以下内容:

翻译自: https://www.pybloggers.com/2007/11/buildout-recipe-tip-hexagonit-recipe-download/

 类似资料: