From a92039db1edf9d85059ddadc10134f434ae82ce7 Mon Sep 17 00:00:00 2001 From: Pauli Virtanen Date: Sat, 7 Dec 2019 14:17:20 +0200 Subject: ENH: distutils: add support for ILP64 OpenBLAS (generic symbol suffix) Generalize the ILP64 BLAS/LAPACK symbol name handling to deal with arbitrary prefix/suffix. The build-time behavior is changed so that HAVE_BLAS_ILP64 and BLAS_SYMBOL_SUFFIX/PREFIX defines are added to compile options as appropriate. Mainly to make autodetection of BLAS/LAPACK easier for downstream numpy.distutils users, add get_info aliases 'blas_ilp64_opt', 'blas_ilp64_plain_opt', and 'blas64__opt' for any/no/""&"64_" prefix&suffix, and the same for lapack. (Due to the way system_info works, each also gets a separate class.) In addition to openblas64_ which has a fixed suffix, add the (by default suffixless) openblas_ilp64, which correspond to the most likely cases to be present. --- numpy/linalg/setup.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'numpy/linalg/setup.py') diff --git a/numpy/linalg/setup.py b/numpy/linalg/setup.py index f5cb04e89..6315a34b4 100644 --- a/numpy/linalg/setup.py +++ b/numpy/linalg/setup.py @@ -26,10 +26,8 @@ def configuration(parent_package='', top_path=None): ] all_sources = config.paths(lapack_lite_src) - if (os.environ.get('NPY_USE_BLAS64_', "0") != "0"): - lapack_info = get_info('lapack64__opt', 2) - lapack_info.setdefault('define_macros', []) - lapack_info['define_macros'] += [('NPY_UMATH_USE_BLAS64_', None)] + if os.environ.get('NPY_USE_BLAS_ILP64', "0") != "0": + lapack_info = get_info('lapack_ilp64_opt', 2) else: lapack_info = get_info('lapack_opt', 0) # and {} -- cgit v1.2.1