Welcome, guest | Sign In | My Account | Store | Cart

Notice! PyPM is being replaced with the ActiveState Platform, which enhances PyPM’s build and deploy capabilities. Create your free Platform account to download ActivePython or customize Python with the packages you require and get automatic updates.

Download
ActivePython
INSTALL>
pypm install collective.recipe.zcml

How to install collective.recipe.zcml

  1. Download and install ActivePython
  2. Open Command Prompt
  3. Type pypm install collective.recipe.zcml
 Python 2.7Python 3.2Python 3.3
Windows (32-bit)
0.1 Available View build log
Windows (64-bit)
0.1 Available View build log
Mac OS X (10.5+)
0.1 Available View build log
Linux (32-bit)
0.1 Available View build log
Linux (64-bit)
0.1 Available View build log
 
License
ZPL
Dependencies
Lastest release
version 0.1 on Jan 5th, 2011

collective.recipe.zcml

zc.buildout recipe to create zcml slugs. Useful for example in a repoze based buildout.

Change history

0.1 (2008-07-04)

  • Created recipe with ZopeSkel [Stefan Eletzhofer].
Detailed Documentation

Supported options

The recipe supports the following options:

zcml A list of zcml entires.

format:

System Message: WARNING/2 (<string>, line 28)

Literal block expected; none found.

zcml := package ":" filename package := dottedname | dottedname "-" ( "configure" | "meta" | "overrides" )

System Message: WARNING/2 (<string>, line 28); backlink

Inline substitution_reference start-string without end-string.

zope2-location The location of the zope 2 installation.

The guts of creating ZCML slugs was ripped from plone.recipe.zope2install.

Example usage

We'll start by creating a buildout that uses the recipe:

>>> write('buildout.cfg',

System Message: ERROR/3 (<string>, line 42)

Inconsistent literal block quoting.

... """ ... [buildout] ... parts = test1 ... ... [test1] ... recipe = collective.recipe.zcml ... zope2-location=${buildout:directory}/zope ... zcml = ... my.package ... somefile:my.otherpackage ... my.thirdpackage-meta ... """)

Running the buildout gives us:

>>> print 'start', system(buildout) # doctest:+ELLIPSIS

System Message: ERROR/3 (<string>, line 58)

Inconsistent literal block quoting.

start Installing test1. While: Installing test1. <BLANKLINE> An internal error occured due to a bug in either zc.buildout or in a recipe being used: <BLANKLINE> OSError: [Errno 2] No such file or directory: '/sample-buildout/zope/etc/package-includes' <BLANKLINE>

We need to have a valid zope installation. Let's fake one:

>>> mkdir("zope")
>>> mkdir("zope", "etc")
>>> print 'start', system(buildout) # doctest:+ELLIPSIS

System Message: ERROR/3 (<string>, line 74)

Inconsistent literal block quoting.

start Installing test1.

We now have a package include directory:

>>> ls("zope", "etc")

System Message: ERROR/3 (<string>, line 79)

Inconsistent literal block quoting.

d package-includes

It does contain ZCML slugs:

>>> ls("zope", "etc", "package-includes")

System Message: ERROR/3 (<string>, line 84)

Inconsistent literal block quoting.
  • 001-my.package-configure.zcml
  • 002-somefile-configure.zcml
  • 003-my.thirdpackage-meta.zcml

These files contain the usual stuff:

>>> cat("zope", "etc", "package-includes", "001-my.package-configure.zcml")

System Message: ERROR/3 (<string>, line 91)

Inconsistent literal block quoting.

<include package="my.package" file="configure.zcml" /> >>> cat("zope", "etc", "package-includes", "002-somefile-configure.zcml") <include package="somefile" file="my.otherpackage" /> >>> cat("zope", "etc", "package-includes", "003-my.thirdpackage-meta.zcml") <include package="my.thirdpackage" file="meta.zcml" />

That's all.

Contributors

Stefan Eletzhofer, Author

Download

Subscribe to package updates

Last updated Jan 5th, 2011

Download Stats

Last month:1

What does the lock icon mean?

Builds marked with a lock icon are only available via PyPM to users with a current ActivePython Business Edition subscription.

Need custom builds or support?

ActivePython Enterprise Edition guarantees priority access to technical support, indemnification, expert consulting and quality-assured language builds.

Plan on re-distributing ActivePython?

Get re-distribution rights and eliminate legal risks with ActivePython OEM Edition.