Package wafadmin :: Package Tools :: Module python
[hide private]
[frames] | no frames]

Module python

source code

Python support

Classes [hide private]
  py_taskgen
Functions [hide private]
 
init_pyext(self) source code
 
pyext_shlib_ext(self) source code
 
init_pyembed(self) source code
 
process_py(self, node) source code
 
_get_python_variables(python_exe, variables, imports=['import sys'])
Run a python interpreter and print some variables
source code
 
check_python_headers(conf)
Check for headers and libraries necessary to extend or embed python.
source code
 
check_python_version(conf, minver=None)
Check if the python interpreter is found matching a given minimum version.
source code
 
check_python_module(conf, module_name)
Check if the selected python interpreter can import the given python module.
source code
 
detect(conf) source code
 
set_options(opt) source code
Variables [hide private]
  EXT_PY = ['.py']
Function Details [hide private]

init_pyext(self)

source code 
Decorators:
  • @taskgen
  • @before('apply_incpaths')
  • @feature('pyext')
  • @before('apply_bundle')

pyext_shlib_ext(self)

source code 
Decorators:
  • @taskgen
  • @before('apply_link')
  • @before('apply_lib_vars')
  • @after('apply_bundle')
  • @feature('pyext')

init_pyembed(self)

source code 
Decorators:
  • @taskgen
  • @before('apply_incpaths')
  • @feature('pyembed')

process_py(self, node)

source code 
Decorators:
  • @extension(EXT_PY)

check_python_headers(conf)

source code 

Check for headers and libraries necessary to extend or embed python.

If successful, xxx_PYEXT and xxx_PYEMBED variables are defined in the environment (for uselib). PYEXT should be used for compiling python extensions, while PYEMBED should be used by programs that need to embed a python interpreter.

Note: this test requires that check_python_version was previously executed and successful.

Decorators:
  • @conf

check_python_version(conf, minver=None)

source code 

Check if the python interpreter is found matching a given minimum version. minver should be a tuple, eg. to check for python >= 2.4.2 pass (2,4,2) as minver.

If successful, PYTHON_VERSION is defined as 'MAJOR.MINOR' (eg. '2.4') of the actual python version found, and PYTHONDIR is defined, pointing to the site-packages directory appropriate for this python version, where modules/packages/extensions should be installed.

Decorators:
  • @conf

check_python_module(conf, module_name)

source code 

Check if the selected python interpreter can import the given python module.

Decorators:
  • @conf