(self, environment=None)
return required, optional, excluded
Returns the list of dependencies for an environment.

    Given an environment:
       build the list of dependencies required for that environment. This
         includes elements marked as all (platform='*') and ones specifically
         mentioning that environment.
       build the list of optional packages which might be useful to your app.
         That is, everything marked generic, but not in the first list.
       build the list of everything excluded from the first two sets

    Args:
      environment: (str) An environment (as per platforms.PLATFORMS). If None,
          the optional packages list will include everything that is not
          mandatory (i.e. marked with platform='*').
    Returns:
      list(dict), list(dict), list(dict): required_packages, optional_packages,
          packages we do not want.
Returns the list of dependencies for an environment.
Returns the list of dependencies for an environment .
def DependenciesForEnvironment(self, environment=None):
    """Returns the list of dependencies for an environment.

    Given an environment:
       build the list of dependencies required for that environment. This
         includes elements marked as all (platform='*') and ones specifically
         mentioning that environment.
       build the list of optional packages which might be useful to your app.
         That is, everything marked generic, but not in the first list.
       build the list of everything excluded from the first two sets

    Args:
      environment: (str) An environment (as per platforms.PLATFORMS). If None,
          the optional packages list will include everything that is not
          mandatory (i.e. marked with platform='*').
    Returns:
      list(dict), list(dict), list(dict): required_packages, optional_packages,
          packages we do not want.
    """
    required = []
    optional = []
    excluded = []
    for r in self.get('requires', []):
      environments = r['environments']
      if '*' in environments or environment in environments:
        required.append(r)
      elif 'generic' in environments or not environment:
        optional.append(r)
      else:
        excluded.append(r)
    return required, optional, excluded
def DependenciesForEnvironment ( self , environment = None ) : required = [ ] optional = [ ] excluded = [ ] for r in self . get ( 'requires' , [ ] ) : environments = r [ 'environments' ] if '*' in environments or environment in environments : required . append ( r ) elif 'generic' in environments or not environment : optional . append ( r ) else : excluded . append ( r ) return required , optional , excluded