Cyrave.Ray.BuffrBAM是一个ZC构建的配方,可以用来引导BLASBRAM项目。
collective.recipe.bluebream的Python项目详细描述
简介
collective.recipe.bluebream是一个zc.buildout菜谱,可以用来引导一个Bluebream项目。它执行以下操作:
- 需要Bluebream所需的包(根据此处描述的示例项目设置:http://bluebream.zope.org/doc/1.0/gettingstarted.html)
- 安装bin/paster
- 安装小型wsgi应用程序
- 安装zcml配置文件
- 如果不存在,则添加一些var目录< /LI>
- 支持开发鸡蛋
安装
创建构建:
$ virtualenv-2.7 . $ bin/pip install zc.buildout $ bin/buildout init
然后编辑buildout.cfg;像任何配方一样使用collective.recipe.bluebream:只需添加一个部分并配置recipe参数。您还应该通过extends参数配置一组已知良好的包:
[buildout] extends = http://download.zope.org/bluebream/bluebream-1.0.cfg parts = bluebream versions = versions [bluebream] recipe = collective.recipe.bluebream
然后运行buildout:
$ bin/buildout
发育卵子
从版本0.3.0开始,collective.recipe.bluebream通过eggs参数支持包开发:
[buildout] develop = src/my.package [bluebream] eggs = my.package
配置
现在应该有一个bin/paster脚本。要运行bluebream,还需要wsgi配置文件和zope配置文件。下面是一些示例配置文件,可以帮助您入门。
蓝莓.ini
剪切/粘贴,另存为bluedream.ini:
[loggers] keys = root, wsgi [handlers] keys = console, accesslog [formatters] keys = generic, accesslog [formatter_generic] format = %(asctime)s %(levelname)s [%(name)s] %(message)s [formatter_accesslog] format = %(message)s [handler_console] class = StreamHandler args = (sys.stderr,) level = ERROR formatter = generic [handler_accesslog] class = FileHandler args = ('access.log', 'a') level = INFO formatter = accesslog [logger_root] level = INFO handlers = console [logger_wsgi] level = INFO handlers = accesslog qualname = wsgi propagate = 0 [filter:translogger] use = egg:Paste#translogger setup_console_handler = False logger_name = wsgi [filter-app:main] # Change the last part from 'ajax' to 'pdb' for a post-mortem debugger # on the console: use = egg:z3c.evalexception#ajax next = zope [app:zope] use = egg:collective.recipe.bluebream filter-with = translogger [server:main] use = egg:Paste#http host = 127.0.0.1 port = 8080 [DEFAULT] # set the name of the zope.conf file zope_conf = %(here)s/zope.conf
zope.conf
剪切/粘贴,另存为zope.conf:
# main zope configuration file for debug mode # Identify the component configuration used to define the site: site-definition bluebream.zcml <zodb> <filestorage> path var/filestorage/Data.fs blob-dir var/blobstorage </filestorage> # Uncomment this if you want to connect to a ZEO server instead: # <zeoclient> # server localhost:8100 # storage 1 # # ZEO client cache, in bytes # cache-size 20MB # # Uncomment to have a persistent disk cache # #client zeo1 # </zeoclient> </zodb> <eventlog> # This sets up logging to both a file and to standard output (STDOUT). # The "path" setting can be a relative or absolute filesystem path or # the tokens STDOUT or STDERR. <logfile> path z3.log formatter zope.exceptions.log.Formatter </logfile> <logfile> path STDOUT formatter zope.exceptions.log.Formatter </logfile> </eventlog> #developer mode devmode on
执行
现在您可以运行粘贴程序:
$ bin/paster serve bluebream.ini
然后在浏览器中打开http://localhost:8080。
完成
就这样!查看http://bluebream.zope.org了解有关Bluetream的更多信息。
更改日志
0.4.0-(2012-04-08)
- 清理包 [标记]
0.3.0-(2011-07-27)
- 支持eggs参数开发鸡蛋等。 [标记]
- 添加记录器 [标记]
- 将元数据添加到setup.py [标记]
0.2.0-(2011-07-27)
- 如果var不存在,则创建var [标记]
- 包含包数据 [标记]
0.1.0-(2011-07-27)
- 初次发行 [标记]