Orbits  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Macros Pages
Classes | Functions | Variables
setuptools.depends Namespace Reference

Classes

class  Require
 

Functions

def _iter_code
 
def find_module
 
def get_module_constant
 
def extract_constant
 

Variables

list __all__
 

Function Documentation

def setuptools.depends._iter_code (   code)
private
Yield '(op,arg)' pair for each operation in code object 'code'
def setuptools.depends.extract_constant (   code,
  symbol,
  default = -1 
)
Extract the constant value of 'symbol' from 'code'

If the name 'symbol' is bound to a constant value by the Python code
object 'code', return that value.  If 'symbol' is bound to an expression,
return 'default'.  Otherwise, return 'None'.

Return value is based on the first assignment to 'symbol'.  'symbol' must
be a global, or at least a non-"fast" local in the code block.  That is,
only 'STORE_NAME' and 'STORE_GLOBAL' opcodes are checked, and 'symbol'
must be present in 'code.co_names'.
def setuptools.depends.find_module (   module,
  paths = None 
)
Just like 'imp.find_module()', but with package support
def setuptools.depends.get_module_constant (   module,
  symbol,
  default = -1,
  paths = None 
)
Find 'module' by searching 'paths', and extract 'symbol'

Return 'None' if 'module' does not exist on 'paths', or it does not define
'symbol'.  If the module defines 'symbol' as a constant, return the
constant.  Otherwise, return 'default'.

Variable Documentation

list setuptools.depends.__all__
Initial value:
1 = [
2  'Require', 'find_module', 'get_module_constant', 'extract_constant'
3 ]

Copyright 2014 Google Inc. All rights reserved.