diff --git a/setup.py b/setup.py index a3cda91920f58943d9452b702bcd3fdc8c096db9..4060f6cad7ba09d80def86115a08a9ef0f24c9ee 100755 --- a/setup.py +++ b/setup.py @@ -388,8 +388,9 @@ def search_mumps(): # Conda (via conda-forge). # TODO: remove dependency libs (scotch, metis...) when conda-forge # packaged mumps/scotch are built as properly linked shared libs + # 'openblas' provides Lapack and BLAS symbols ['zmumps', 'mumps_common', 'metis', 'esmumps', 'scotch', - 'scotcherr', 'mpiseq'], + 'scotcherr', 'mpiseq', 'openblas'], ] common_libs = ['pord', 'gfortran'] @@ -400,34 +401,7 @@ def search_mumps(): return [] -def search_lapack(): - """Return the BLAS variant that is installed.""" - lib_sets = [ - # Debian - ['blas', 'lapack'], - # Conda (via conda-forge). Openblas contains lapack symbols - ['openblas', 'gfortran'], - ] - - for libs in lib_sets: - found_libs = search_libs(libs) - if found_libs: - return found_libs - - print('Error: BLAS/LAPACK are required but were not found.', - file=sys.stderr) - sys.exit(1) - - def configure_special_extensions(exts, build_summary): - #### Special config for LAPACK. - lapack = exts['kwant.linalg.lapack'] - if 'libraries' in lapack: - build_summary.append('User-configured LAPACK and BLAS') - else: - lapack['libraries'] = search_lapack() - build_summary.append('Default LAPACK and BLAS') - #### Special config for MUMPS. mumps = exts['kwant.linalg._mumps'] if 'libraries' in mumps: @@ -442,12 +416,6 @@ def configure_special_extensions(exts, build_summary): del exts['kwant.linalg._mumps'] build_summary.append('No MUMPS support') - if mumps: - # Copy config from LAPACK. - for key, value in lapack.items(): - if key not in ['sources', 'depends']: - mumps.setdefault(key, []).extend(value) - return exts @@ -567,8 +535,7 @@ def main(): 'kwant/graph/c_slicer/partitioner.h', 'kwant/graph/c_slicer/slicer.h'])), ('kwant.linalg.lapack', - dict(sources=['kwant/linalg/lapack.pyx'], - depends=['kwant/linalg/f_lapack.pxd'])), + dict(sources=['kwant/linalg/lapack.pyx'])), ('kwant.linalg._mumps', dict(sources=['kwant/linalg/_mumps.pyx'], depends=['kwant/linalg/cmumps.pxd']))]) @@ -584,8 +551,7 @@ def main(): for ext in exts.values(): ext.setdefault('include_dirs', []).append(numpy_include) - aliases = [('lapack', 'kwant.linalg.lapack'), - ('mumps', 'kwant.linalg._mumps')] + aliases = [('mumps', 'kwant.linalg._mumps')] init_cython()