Version 1.0b1 API Documentation generated by Endo 2006-08-14
This file defines a set of system_info classes for getting
information about various resources (libraries, library directories,
include directories, etc.) in the system. Currently, the following
classes are available:
atlas_info
atlas_threads_info
atlas_blas_info
atlas_blas_threads_info
lapack_atlas_info
blas_info
lapack_info
blas_opt_info # usage recommended
lapack_opt_info # usage recommended
fftw_info,dfftw_info,sfftw_info
fftw_threads_info,dfftw_threads_info,sfftw_threads_info
djbfft_info
x11_info
lapack_src_info
blas_src_info
numpy_info
numarray_info
numpy_info
boost_python_info
agg2_info
wx_info
gdk_pixbuf_xlib_2_info
gdk_pixbuf_2_info
gdk_x11_2_info
gtkp_x11_2_info
gtkp_2_info
xft_info
freetype2_info
umfpack_info
Usage:
info_dict = get_info(<name>)
where <name> is a string 'atlas','x11','fftw','lapack','blas',
'lapack_src', 'blas_src', etc. For a complete list of allowed names,
see the definition of get_info() function below.
Returned info_dict is a dictionary which is compatible with
distutils.setup keyword arguments. If info_dict == {}, then the
asked resource is not available (system_info could not find it).
Several *_info classes specify an environment variable to specify
the locations of software. When setting the corresponding environment
variable to 'None' then the software will be ignored, even when it
is available in system.
Global parameters:
system_info.search_static_first - search static libraries (.a)
in precedence to shared ones (.so, .sl) if enabled.
system_info.verbosity - output the results to stdout if enabled.
The file 'site.cfg' is looked for in
1) Directory of main setup.py file being run.
2) Home directory of user running the setup.py file (Not implemented yet)
3) System wide directory (location of this file...)
The first one found is used to get system configuration options The
format is that used by ConfigParser (i.e., Windows .INI style). The
section DEFAULT has options that are the default for each section. The
available sections are fftw, atlas, and x11. Appropiate defaults are
used if nothing is specified.
The order of finding the locations of resources is the following:
1. environment variable
2. section in site.cfg
3. DEFAULT section in site.cfg
Only the first complete match is returned.
Example:
----------
[DEFAULT]
library_dirs = /usr/lib:/usr/local/lib:/opt/lib
include_dirs = /usr/include:/usr/local/include:/opt/include
src_dirs = /usr/local/src:/opt/src
# search static libraries (.a) in preference to shared ones (.so)
search_static_first = 0
[fftw]
fftw_libs = rfftw, fftw
fftw_opt_libs = rfftw_threaded, fftw_threaded
# if the above aren't found, look for {s,d}fftw_libs and {s,d}fftw_opt_libs
[atlas]
library_dirs = /usr/lib/3dnow:/usr/lib/3dnow/atlas
# for overriding the names of the atlas libraries
atlas_libs = lapack, f77blas, cblas, atlas
[x11]
library_dirs = /usr/X11R6/lib
include_dirs = /usr/X11R6/include
----------
Authors:
Pearu Peterson <pearu@cens.ioc.ee>, February 2002
David M. Cooke <cookedm@physics.mcmaster.ca>, April 2002
Copyright 2002 Pearu Peterson all rights reserved,
Pearu Peterson <pearu@cens.ioc.ee>
Permission to use, modify, and distribute this software is given under the
terms of the SciPy (BSD style) license. See LICENSE.txt that came with
this distribution for specifics.
NO WARRANTY IS EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK.
atlas_version_c_text = """
/* This file is generated from numpy_distutils/system_info.py */
void ATL_buildinfo(void);
int main(void) {
ATL_buildinfo();
return 0;
}
"""
default_include_dirs = filter(os.path.isdir, default_include_dirs)
default_lib_dirs = filter(os.path.isdir, default_lib_dirs)
default_src_dirs = filter(os.path.isdir, default_src_dirs)
inv_language_map = { Const(0) : Const('c'), Const(1) : Const('c++'), Const(2) : Const('f77'), Const(3) : Const('f90') }
language_map = { Const('c') : Const(0), Const('c++') : Const(1), Const('f77') : Const(2), Const('f90') : Const(3) }
so_ext = (distutils.sysconfig.get_config_vars('SO')[0] or '')
Return a list of existing paths composed by all combinations of items from arguments.
Returns a list of files named 'fname' from 1) System-wide directory (directory-location of this module) 2) Users HOME directory (os.environ['HOME']) 3) Local directory
| Local name | Refers to |
|---|---|
| cmd_config | numpy.distutils.command.config.config |
| ConfigParser | ConfigParser |
| copy | copy |
| Distribution | distutils.dist.Distribution |
| distutils.sysconfig | distutils.sysconfig |
| DistutilsError | distutils.errors.DistutilsError |
| exec_command | numpy.distutils.exec_command.exec_command |
| find_executable | numpy.distutils.exec_command.find_executable |
| get_pythonexe | numpy.distutils.exec_command.get_pythonexe |
| glob | glob.glob |
| is_sequence | numpy.distutils.misc_util.is_sequence |
| is_string | numpy.distutils.misc_util.is_string |
| log | distutils.log |
| os | os |
| re | re |
| sys | sys |
| warnings | warnings |