BlueBream The Web Component Framework

11.2. Adding new package dependencyΒΆ

You are working in your instance or developing your package and then you discover that there is a package you may find useful, let’s say ‘ldappas’. Edit setup.py and add in install_requires the name of the package:

setup(name='ticketcollector'
      ...
      install_requires = ['setuptools',
                          ...
                          'ldappas',
                         ],
      ...

Now it is time to rebuild your application:

$ ./bin/buildout

Finally, remember to register the new package in etc/site.zcml:

<configure xmlns="http://namespaces.zope.org/zope"
  ...
  <include package="ldappas" />
  ...
</configure>

If there is any new ZCML directive declared in this package, you need to include the configuration file where the directive is registered. Normally the ZCML directives will be registered in meta package. You can use the file option as given below:

<configure xmlns="http://namespaces.zope.org/zope"
  ...
  <include package="some.package" file="meta.zcml" />
  <include package="ldappas" />
  ...
</configure>

Then restart the application:

$ ./bin/paster serve debug.ini
blog comments powered by Disqus

Previous topic

11.1. Default view for objects

Next topic

11.3. Retrieving absolute URL for an object

This Page