Zope开发辅助脚本工具ZopeSkel安装

16 篇文章 0 订阅

Introduction

ZopeSkel provides a collection of project templates for Plone and Zope development projects.

ZopeSkel uses the paster Python library internally.

Installing ZopeSkel

ZopeSkel can be installed in one of two ways: with buildout or with virtualenv.

Note

Despite existing documentation to the contrary, it is not recommended to install ZopeSkel in your system python.

Buildout installation

Here are instructions how to include ZopeSkel as a part of your local buildout.cfg.

  • You can use zopeskel to add new projects to your buildout src/ folder.

Add to your buildout.cfg:

parts =
   ...
   zopeskel

[zopeskel]
# installs paster and Zopeskel
recipe = zc.recipe.egg
eggs =
   PasteScript
   ZopeSkel

(注:parts在eggs后也没关系)After re-running buildout, you will have zopeskel and paster commands in the bin directory of your buildout.

Virtualenv installation

First, install virtualenv into your system:

easy_install virtualenv

Next, create a virtual environment with the new virtualenv command:

virtualenv --no-site-packages --distribute zopeskelenv

Once virtualenv is finished, you can install zopeskel to your new virtual environment:

zopeskelenv/bin/easy_install zopeskel

Once this is complete, you will be left with zopeskel and paster commands in the bin directory inside your virtualenv.

Available Templates

To see details of the available templates:

zopeskel --list

More info about how zopeskel works:

zopeskel --help

Using Templates

Creating a package using virtualenv ZopeSkel installation:

source zopeskelenv/bin/activate
zopeskel <template_name> <package_name>

The folder created (<package_name>) can be checked in to the versioning system of your choice.

Local Commands

Local commands are available for the plone_basic and archetype package templates. If you create a package using one of these templates you will be provided with information about the presence of local commands.

To run a local command and add further features to your package, you will run the paster command add from within your package. Your current working directory must be at or inside the directory where you find your package's egg-info, so you can do the following:

$ bin/templer plone_basic my.package
....
$ cd my.package/src
$ ../../bin/paster --help
...
Templer local commands:
  add  Allows the addition of further templates to an existing package
$ ../../bin/paster add --list
browserlayer:  A Plone browserlayer
browserview:   A browser view skeleton
$ ../../bin/paster add browserlayer
...

Developing ZopeSkel

If you wish to contribute to the zopeskel project we welcome your contribution. Zopeskel is now distributed with its own built-in buildout, so to begin, all you need to do is check out the source, bootstrap with your desired version of python, and run bin/buildout.

Since all of the template that are provided by ZopeSkel are now in templer namespace packages, the ZopeSkel package uses mr.developer to provide access to all the templer packages required in the src directory of the buildout. Development should take place in those packages. There should be no templates in the ZopeSkel package at all.

To get started, simply clone the zopeskel repository to your local machine, bootstrap with your preferred python, and run the buildout:

git clone git@github.com:collective/ZopeSkel.git zopeskel
cd zopeskel
python2.6 bootstrap.py
...
bin/buildout
Testing

Since version 1.5, ZopeSkel has tests. It's required to run these before you check in any changes you make. You should run the full test suite in both Python 2.4 and Python 2.6, as both versions are in common use among Zope and Plone developers. They can be run like so:

bin/test

Please ensure that all tests pass in Python 2.4 and Python 2.6 before making any checkins to any templer package used by zopeskel.

Fixing Bugs

There are a number of open issues in the queue at http://plone.org/products/zopeskel/issues and your help is always welcome in closing any you feel competent to take on. Please note that there is a zopeskel mailing list, so if you have any questions about your approach to fixing a bug, you should post to the list first.

 
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
群辉(Synology NAS)是一种网络存储设备,而npm是一个用于安装和管理Node.js模块的工具。根据您的描述,当在群辉上安装npm时,遇到了缺少zope模块的问题。 zope模块是一个基于Python的开发框架,与Node.js和npm没有直接的关联。因此,要解决这个问题,您可以采取以下步骤: 1. 确认安装依赖:首先,您需要确保已在群辉上正确安装Python和zope模块。您可以通过SSH登录到群辉,并运行以下命令来安装zope模块(假设Python已经安装): ``` pip install zope.interface ``` 2. 更新Node.js和npm:如果您已经安装了Node.js和npm,请确保它们是最新版本。您可以按照群辉的说明文档或官方网站上的步骤来更新Node.js和npm。 3. 清除缓存并重新安装:在更新完Node.js和npm之后,您可以尝试清除npm缓存并重新安装zope模块。在群辉的命令行界面中,运行以下命令: ``` npm cache clean --force npm install zope.interface ``` 如果您仍然遇到问题,可能是由于与群辉操作系统或软件不兼容导致的。在这种情况下,建议您联系群辉的技术支持团队,以获取进一步的帮助和指导。 总结起来,要解决群辉安装npm缺少zope模块的问题,您需要确保正确安装了Python和zope模块,更新Node.js和npm到最新版本,并清除npm缓存并重新安装zope模块。如有需要,建议联系群辉的技术支持团队获取更多支持。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值