/usr/src/WrapITK/Python/itkConfig.py.in is in libinsighttoolkit3-dev 3.20.1+git20120521-3.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 | """InsightToolkit configuration module.
This module contains user options and paths to libraries and language support
files used internally.
User options can be set by importing itkConfig and changing the option values.
Currently-supported options are:
DebugLevel: must be one of SILENT, WARN, or ERROR (these values are defined
in itkConfig). Default is WARN.
ImportCallback: importing itk libraries can take a while. ImportCallback will
be called when each new library is imported in the import process.
ImportCallback must be a function that takes two parameters: the name of
the library being imported, and a float (between 0 and 1) reflecting the
fraction of the import that is completed.
LazyLoading: Only load an itk library when needed. Before the library is
loaded, the namespace will be inhabited with dummy objects."""
# User options
SILENT = 0; WARN = 1; ERROR = 2
DebugLevel = WARN
ImportCallback = None
ProgressCallback = None
LazyLoading = True
NotInPlace = False
# Internal settings
import os
def normalized_path(relative_posix_path):
if relative_posix_path != 'None':
file_dir = os.path.split(__file__)[0]
relative_path = relative_posix_path.replace('/', os.sep)
return os.path.normpath(os.path.join(file_dir, relative_path))
# swig_lib: location of the swig-generated shared libraries
swig_lib = normalized_path('@CONFIG_PYTHON_SWIGLIB_DIR@')
# swig_py: location of the xxxPython.py swig-generated python interfaces
swig_py = normalized_path('@CONFIG_PYTHON_SWIGPY_DIR@')
# config_py: location of xxxConfix.py CMake-generated library descriptions
config_py = normalized_path('@CONFIG_PYTHON_CONFIGPY_DIR@')
# put the itkConfig.py path in the path list
path = [os.path.join(config_py,'..')]
# also populate path with the WRAPITK_PYTHON_PATH var
if os.environ.has_key('WRAPITK_PYTHON_PATH'):
path.extend(os.environ['WRAPITK_PYTHON_PATH'].split(':'))
# location for test input
data_root = normalized_path('@CONFIG_WRAP_ITK_DATA_ROOT@')
# location of test files
test_root = normalized_path('@CONFIG_WRAP_ITK_TEST_ROOT@')
# location of doxygen-generated man pages
doxygen_root = '@CONFIG_WRAP_ITK_DOXYGEN_ROOT@'
del normalized_path
del os
|