I want to develop a few products for a defined Plone install/version, which I cannot change (3.3.5).
我想为定义的Plone安装/版本开发一些产品,我无法改变(3.3.5)。
What is the best way to organize my source tree, so that I do not have to put a huge plone instance into source control that won't change anyway? I still want to use buildout for local checking, though...
组织源代码树的最佳方法是什么,这样我就不必将一个巨大的plone实例放入源控件中,无论如何都不会改变?我仍然想使用buildout进行本地检查,但是......
What do you recommend?
你有什么建议?
I am on Windows and prefer git to hg, but can live with both...
我在Windows上,喜欢git到hg,但可以同时使用...
3 个解决方案
#1
10
Generally speaking, this is done now-a-days with mr.developer
. You can use a buildout like this:
一般来说,这是使用mr.developer现在完成的。你可以像这样使用buildout:
[buildout]
extends =
https://raw.githubusercontent.com/plock/pins/master/plone-4-3
https://raw.githubusercontent.com/plock/pins/master/dev
And then add your sources to the auto-checkout
parameter in the [buildout]
section, and in the [sources]
section, in the format described here:
然后将您的源添加到[buildout]部分中的auto-checkout参数,并在[sources]部分中,按照此处描述的格式:
- http://pypi.python.org/pypi/mr.developer
- http://pypi.python.org/pypi/mr.developer
Something like:
就像是:
[buildout]
auto-checkout = my.package
[sources]
my.package = git https://url.to/my.package
Then add your package to the eggs
parameter of the plone.recipe.zope2instance
section as usual:
然后像往常一样将包添加到plone.recipe.zope2instance部分的eggs参数中:
[instance]
recipe = plone.recipe.zope2instance
eggs =
Pillow
Plone
my.package
See the Plone coredev buildout for a working example:
有关工作示例,请参阅Plone coredev buildout:
- https://github.com/plone/buildout.coredev
- https://github.com/plone/buildout.coredev
And don't forget there is a develop
parameter for the [buildout]
section which allows you to specify the file system path to a "develop egg" (it does not perform a checkout though):
并且不要忘记[buildout]部分有一个develop参数,它允许您指定“develop egg”的文件系统路径(虽然它不执行结帐):
[buildout]
develop = src/my.package
#2
2
I'm not exactly sure what you mean by organize your source tree...
通过组织你的源代码树,我不确定你的意思......
Regardless, you'll want to look over:
无论如何,你要看看:
-
http://plone.org/products/zopeskel for generating package structure
http://plone.org/products/zopeskel用于生成包结构
-
http://plone.org/documentation/manual/developer-manual developer manual docs
http://plone.org/documentation/manual/developer-manual开发人员手册文档
-
and http://collective-docs.plone.org/ community supplied howtos
和http://collective-docs.plone.org/社区提供了howtos
-
If you can, get Martin Aspeli's "Professional Plone Development" book also
如果可以的话,也可以获得Martin Aspeli的“专业Plone开发”一书
The SCM you choose has nothing to do with Plone. Make that choice on your own.
您选择的SCM与Plone无关。自己做出选择。
#3
1
Just create a buildout.cfg file in the root directory of your egg/product and extend the plonetest buildout from the collective:
只需在egg / product的根目录中创建一个buildout.cfg文件,并从集合中扩展plonetest buildout:
[buildout]
extends =
http://svn.plone.org/svn/collective/buildout/plonetest/plone-3.3.x.cfg
package-name = collective.mypackage
This way you will only need to add two files (buildout.cfg and bootstrap.py) to your repository.
这样,您只需要将两个文件(buildout.cfg和bootstrap.py)添加到您的存储库。
See http://svn.plone.org/svn/plone/plone.app.discussion/trunk/ for a full example.
有关完整示例,请参见http://svn.plone.org/svn/plone/plone.app.discussion/trunk/。
If you develop more than one package though, mr.developer is probably the way to go.
如果您开发了多个软件包,mr.developer可能就是您的选择。
#1
10
Generally speaking, this is done now-a-days with mr.developer
. You can use a buildout like this:
一般来说,这是使用mr.developer现在完成的。你可以像这样使用buildout:
[buildout]
extends =
https://raw.githubusercontent.com/plock/pins/master/plone-4-3
https://raw.githubusercontent.com/plock/pins/master/dev
And then add your sources to the auto-checkout
parameter in the [buildout]
section, and in the [sources]
section, in the format described here:
然后将您的源添加到[buildout]部分中的auto-checkout参数,并在[sources]部分中,按照此处描述的格式:
- http://pypi.python.org/pypi/mr.developer
- http://pypi.python.org/pypi/mr.developer
Something like:
就像是:
[buildout]
auto-checkout = my.package
[sources]
my.package = git https://url.to/my.package
Then add your package to the eggs
parameter of the plone.recipe.zope2instance
section as usual:
然后像往常一样将包添加到plone.recipe.zope2instance部分的eggs参数中:
[instance]
recipe = plone.recipe.zope2instance
eggs =
Pillow
Plone
my.package
See the Plone coredev buildout for a working example:
有关工作示例,请参阅Plone coredev buildout:
- https://github.com/plone/buildout.coredev
- https://github.com/plone/buildout.coredev
And don't forget there is a develop
parameter for the [buildout]
section which allows you to specify the file system path to a "develop egg" (it does not perform a checkout though):
并且不要忘记[buildout]部分有一个develop参数,它允许您指定“develop egg”的文件系统路径(虽然它不执行结帐):
[buildout]
develop = src/my.package
#2
2
I'm not exactly sure what you mean by organize your source tree...
通过组织你的源代码树,我不确定你的意思......
Regardless, you'll want to look over:
无论如何,你要看看:
-
http://plone.org/products/zopeskel for generating package structure
http://plone.org/products/zopeskel用于生成包结构
-
http://plone.org/documentation/manual/developer-manual developer manual docs
http://plone.org/documentation/manual/developer-manual开发人员手册文档
-
and http://collective-docs.plone.org/ community supplied howtos
和http://collective-docs.plone.org/社区提供了howtos
-
If you can, get Martin Aspeli's "Professional Plone Development" book also
如果可以的话,也可以获得Martin Aspeli的“专业Plone开发”一书
The SCM you choose has nothing to do with Plone. Make that choice on your own.
您选择的SCM与Plone无关。自己做出选择。
#3
1
Just create a buildout.cfg file in the root directory of your egg/product and extend the plonetest buildout from the collective:
只需在egg / product的根目录中创建一个buildout.cfg文件,并从集合中扩展plonetest buildout:
[buildout]
extends =
http://svn.plone.org/svn/collective/buildout/plonetest/plone-3.3.x.cfg
package-name = collective.mypackage
This way you will only need to add two files (buildout.cfg and bootstrap.py) to your repository.
这样,您只需要将两个文件(buildout.cfg和bootstrap.py)添加到您的存储库。
See http://svn.plone.org/svn/plone/plone.app.discussion/trunk/ for a full example.
有关完整示例,请参见http://svn.plone.org/svn/plone/plone.app.discussion/trunk/。
If you develop more than one package though, mr.developer is probably the way to go.
如果您开发了多个软件包,mr.developer可能就是您的选择。