This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description

ftw.autofeature automatically registers ZCML features.

Extras features

The autofeature:extras directive automatically registers ZCML features for each extra (extras_requires) of your package. The feature for an extra is automatically provided when each dependency of the extra is installed.


When having a like this:

from setuptools import setup, find_packages


          'tests': ['unittest2'],
          'foo': ['foo', 'foo-compat'],
          'bar': ['bar', 'bar-compat']})

you can let ftw.autofeature automatically declare features for your extras:


    <include package="ftw.autofeature" file="meta.zcml" />
    <autofeature:extras />

    <configure zcml:condition="have my.package:foo">
        <!-- foo things -->

    <configure zcml:condition="have my.package:bar">
        <!-- bar things -->

    <configure zcml:condition="have my.package:foo:bar">
        <!-- foo and bar things -->


The feature my.package:foo is only registered when the extras is installed. When installing both, foo and bar, multiple features are registered so that it easy to combine extras with AND:

  • my.package:foo
  • my.package:foo:bar
  • my.package:bar
  • my.package:bar:foo


We cannot really detect whether the extras was explictly used on installation time. We therefore test whether each dependency in the extras is installed. When each dependency is installed but not the extras explicitly, this will thus also register the feature.

Dump feature

The autofeature:dump directive dumps the currently registered ZCML features to the standard out. Simply use the directive to dump the features at any point in the ZCML:


    <include package="ftw.autofeature" file="meta.zcml" />
    <autofeature:dump />



1.0.0 (2015-08-24)

  • Initial implementation [jone]
Release History

Release History


This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

TODO: Brief introduction on what you do with files - including link to relevant help section.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
ftw.autofeature-1.0.0.tar.gz (12.6 kB) Copy SHA256 Checksum SHA256 Source Aug 24, 2015

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS HPE HPE Development Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting