Mercurial > hg > vamp-build-and-test
comparison DEPENDENCIES/mingw32/Python27/Lib/site-packages/numpy/linalg/setup.py @ 87:2a2c65a20a8b
Add Python libs and headers
| author | Chris Cannam |
|---|---|
| date | Wed, 25 Feb 2015 14:05:22 +0000 |
| parents | |
| children |
comparison
equal
deleted
inserted
replaced
| 86:413a9d26189e | 87:2a2c65a20a8b |
|---|---|
| 1 from __future__ import division, print_function | |
| 2 | |
| 3 import os | |
| 4 import sys | |
| 5 | |
| 6 def configuration(parent_package='',top_path=None): | |
| 7 from numpy.distutils.misc_util import Configuration | |
| 8 from numpy.distutils.system_info import get_info | |
| 9 config = Configuration('linalg', parent_package, top_path) | |
| 10 | |
| 11 config.add_data_dir('tests') | |
| 12 | |
| 13 # Configure lapack_lite | |
| 14 | |
| 15 src_dir = 'lapack_lite' | |
| 16 lapack_lite_src = [ | |
| 17 os.path.join(src_dir, 'python_xerbla.c'), | |
| 18 os.path.join(src_dir, 'zlapack_lite.c'), | |
| 19 os.path.join(src_dir, 'dlapack_lite.c'), | |
| 20 os.path.join(src_dir, 'blas_lite.c'), | |
| 21 os.path.join(src_dir, 'dlamch.c'), | |
| 22 os.path.join(src_dir, 'f2c_lite.c'), | |
| 23 os.path.join(src_dir, 'f2c.h'), | |
| 24 ] | |
| 25 | |
| 26 lapack_info = get_info('lapack_opt', 0) # and {} | |
| 27 def get_lapack_lite_sources(ext, build_dir): | |
| 28 if not lapack_info: | |
| 29 print("### Warning: Using unoptimized lapack ###") | |
| 30 return ext.depends[:-1] | |
| 31 else: | |
| 32 if sys.platform=='win32': | |
| 33 print("### Warning: python_xerbla.c is disabled ###") | |
| 34 return ext.depends[:1] | |
| 35 return ext.depends[:2] | |
| 36 | |
| 37 config.add_extension('lapack_lite', | |
| 38 sources = [get_lapack_lite_sources], | |
| 39 depends = ['lapack_litemodule.c'] + lapack_lite_src, | |
| 40 extra_info = lapack_info | |
| 41 ) | |
| 42 | |
| 43 # umath_linalg module | |
| 44 | |
| 45 config.add_extension('_umath_linalg', | |
| 46 sources = [get_lapack_lite_sources], | |
| 47 depends = ['umath_linalg.c.src'] + lapack_lite_src, | |
| 48 extra_info = lapack_info, | |
| 49 libraries = ['npymath'], | |
| 50 ) | |
| 51 | |
| 52 return config | |
| 53 | |
| 54 if __name__ == '__main__': | |
| 55 from numpy.distutils.core import setup | |
| 56 setup(configuration=configuration) |
