2
from os.path import join
5
def configuration(parent_package='',top_path=None):
6
from numpy.distutils.misc_util import Configuration
7
from numpy.distutils.system_info import get_info
9
config = Configuration('linsolve',parent_package,top_path)
10
config.add_data_dir('tests')
12
lapack_opt = get_info('lapack_opt',notfound_action=2)
13
if sys.platform=='win32':
14
superlu_defs = [('NO_TIMER',1)]
17
superlu_defs.append(('USE_VENDOR_BLAS',1))
19
config.add_library('superlu_src',
20
sources = [join('SuperLU','SRC','*.c')],
24
#SuperLU/SRC/util.h has been modifed to use these by default
25
#macs = [('USER_ABORT','superlu_python_module_abort'),
26
# ('USER_MALLOC','superlu_python_module_malloc'),
27
# ('USER_FREE','superlu_python_module_free')]
30
config.add_extension('_zsuperlu',
31
sources = ['_zsuperlumodule.c','_superlu_utils.c',
33
libraries = ['superlu_src'],
34
extra_info = lapack_opt
37
config.add_extension('_dsuperlu',
38
sources = ['_dsuperlumodule.c','_superlu_utils.c',
40
libraries = ['superlu_src'],
41
extra_info = lapack_opt
44
config.add_extension('_csuperlu',
45
sources = ['_csuperlumodule.c','_superlu_utils.c',
47
libraries = ['superlu_src'],
48
extra_info = lapack_opt
51
config.add_extension('_ssuperlu',
52
sources = ['_ssuperlumodule.c','_superlu_utils.c',
54
libraries = ['superlu_src'],
55
extra_info = lapack_opt
58
config.add_subpackage('umfpack')
62
if __name__ == '__main__':
63
from numpy.distutils.core import setup
64
setup(**configuration(top_path='').todict())