diff options
author | Ronan Lamy <ronan.lamy@gmail.com> | 2015-09-29 17:36:00 +0100 |
---|---|---|
committer | Ronan Lamy <ronan.lamy@gmail.com> | 2015-10-02 01:07:54 +0100 |
commit | 1e436a5ad94da01e3771a09861279b07dcff8dc6 (patch) | |
tree | 6ecddebd3bf218694b6857a87ee90d1bbf781623 /numpy/linalg/setup.py | |
parent | 21367df4ba6dbf4a01e5e4634b2e20ddb1f4c401 (diff) | |
download | numpy-1e436a5ad94da01e3771a09861279b07dcff8dc6.tar.gz |
MAINT: Simplify numpy/linalg/setup.py
Compute the sources required to build extensions lapack_lite and
_umath_linalg in a more direct way that doesn't rely on abusing the
'depends' argument to config.add_extension().
Diffstat (limited to 'numpy/linalg/setup.py')
-rw-r--r-- | numpy/linalg/setup.py | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/numpy/linalg/setup.py b/numpy/linalg/setup.py index 282c3423c..4bd57453c 100644 --- a/numpy/linalg/setup.py +++ b/numpy/linalg/setup.py @@ -20,31 +20,31 @@ def configuration(parent_package='',top_path=None): os.path.join(src_dir, 'blas_lite.c'), os.path.join(src_dir, 'dlamch.c'), os.path.join(src_dir, 'f2c_lite.c'), - os.path.join(src_dir, 'f2c.h'), ] + all_sources = config.paths(lapack_lite_src) lapack_info = get_info('lapack_opt', 0) # and {} def get_lapack_lite_sources(ext, build_dir): if not lapack_info: print("### Warning: Using unoptimized lapack ###") - return ext.depends[:-1] + return all_sources else: if sys.platform=='win32': print("### Warning: python_xerbla.c is disabled ###") - return ext.depends[:1] - return ext.depends[:2] + return [] + return [all_sources[0]] config.add_extension('lapack_lite', - sources = [get_lapack_lite_sources], - depends = ['lapack_litemodule.c'] + lapack_lite_src, + sources = ['lapack_litemodule.c', get_lapack_lite_sources], + depends = ['lapack_lite/f2c.h'], extra_info = lapack_info ) # umath_linalg module config.add_extension('_umath_linalg', - sources = [get_lapack_lite_sources], - depends = ['umath_linalg.c.src'] + lapack_lite_src, + sources = ['umath_linalg.c.src', get_lapack_lite_sources], + depends = ['lapack_lite/f2c.h'], extra_info = lapack_info, libraries = ['npymath'], ) |