Orbits  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Macros Pages
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
setuptools.dist.Feature Class Reference

Public Member Functions

def __init__
 
def include_by_default
 
def include_in
 
def exclude_from
 
def validate
 

Static Public Member Functions

def warn_deprecated
 

Public Attributes

 description
 
 standard
 
 available
 
 optional
 
 require_features
 
 remove
 
 extras
 

Detailed Description

**deprecated** -- The `Feature` facility was never completely implemented
or supported, `has reported issues
<https://bitbucket.org/pypa/setuptools/issue/58>`_ and will be removed in
a future version.

A subset of the distribution that can be excluded if unneeded/wanted

Features are created using these keyword arguments:

  'description' -- a short, human readable description of the feature, to
     be used in error messages, and option help messages.

  'standard' -- if true, the feature is included by default if it is
     available on the current system.  Otherwise, the feature is only
     included if requested via a command line '--with-X' option, or if
     another included feature requires it.  The default setting is 'False'.

  'available' -- if true, the feature is available for installation on the
     current system.  The default setting is 'True'.

  'optional' -- if true, the feature's inclusion can be controlled from the
     command line, using the '--with-X' or '--without-X' options.  If
     false, the feature's inclusion status is determined automatically,
     based on 'availabile', 'standard', and whether any other feature
     requires it.  The default setting is 'True'.

  'require_features' -- a string or sequence of strings naming features
     that should also be included if this feature is included.  Defaults to
     empty list.  May also contain 'Require' objects that should be
     added/removed from the distribution.

  'remove' -- a string or list of strings naming packages to be removed
     from the distribution if this feature is *not* included.  If the
     feature *is* included, this argument is ignored.  This argument exists
     to support removing features that "crosscut" a distribution, such as
     defining a 'tests' feature that removes all the 'tests' subpackages
     provided by other features.  The default for this argument is an empty
     list.  (Note: the named package(s) or modules must exist in the base
     distribution when the 'setup()' function is initially called.)

  other keywords -- any other keyword arguments are saved, and passed to
     the distribution's 'include()' and 'exclude()' methods when the
     feature is included or excluded, respectively.  So, for example, you
     could pass 'packages=["a","b"]' to cause packages 'a' and 'b' to be
     added or removed from the distribution as appropriate.

A feature must include at least one 'requires', 'remove', or other
keyword argument.  Otherwise, it can't affect the distribution in any way.
Note also that you can subclass 'Feature' to create your own specialized
feature types that modify the distribution in other ways when included or
excluded.  See the docstrings for the various methods here for more detail.
Aside from the methods, the only feature attributes that distributions look
at are 'description' and 'optional'.

Constructor & Destructor Documentation

def setuptools.dist.Feature.__init__ (   self,
  description,
  standard = False,
  available = True,
  optional = True,
  require_features = (),
  remove = (),
  extras 
)

Member Function Documentation

def setuptools.dist.Feature.exclude_from (   self,
  dist 
)
Ensure feature is excluded from distribution

You may override this in a subclass to perform additional operations on
the distribution.  This method will be called at most once per
feature, and only after all included features have been asked to
include themselves.
def setuptools.dist.Feature.include_by_default (   self)
Should this feature be included by default?
def setuptools.dist.Feature.include_in (   self,
  dist 
)
Ensure feature and its requirements are included in distribution

You may override this in a subclass to perform additional operations on
the distribution.  Note that this method may be called more than once
per feature, and so should be idempotent.
def setuptools.dist.Feature.validate (   self,
  dist 
)
Verify that feature makes sense in context of distribution

This method is called by the distribution just before it parses its
command line.  It checks to ensure that the 'remove' attribute, if any,
contains only valid package/module names that are present in the base
distribution when 'setup()' is called.  You may override it in a
subclass to perform any other required validation of the feature
against a target distribution.
def setuptools.dist.Feature.warn_deprecated ( )
static

Member Data Documentation

setuptools.dist.Feature.available
setuptools.dist.Feature.description
setuptools.dist.Feature.extras
setuptools.dist.Feature.optional
setuptools.dist.Feature.remove
setuptools.dist.Feature.require_features
setuptools.dist.Feature.standard

The documentation for this class was generated from the following file:

Copyright 2014 Google Inc. All rights reserved.