From dc0adc9aeb59ce6de9c6ce7938e8c91133a05420 Mon Sep 17 00:00:00 2001 From: Pauli Virtanen Date: Tue, 31 Dec 2019 01:21:48 +0200 Subject: BUG: distutils: fix msvc+gfortran openblas handling corner case Ensure the openblas MSVC+gfortran temporary library names are unique for the different openblas_* system_info classes. If multiple openblas libraries (e.g. both a 32-bit and a 64-bit one) are used in the same project, when compiling in the msvc+gfortran mode, this previously resulted to only the last one being used. --- numpy/distutils/system_info.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'numpy/distutils/system_info.py') diff --git a/numpy/distutils/system_info.py b/numpy/distutils/system_info.py index 4786b3a0c..fc7018af3 100644 --- a/numpy/distutils/system_info.py +++ b/numpy/distutils/system_info.py @@ -2102,16 +2102,17 @@ class openblas_info(blas_info): return None # Generate numpy.distutils virtual static library file - tmpdir = os.path.join(os.getcwd(), 'build', 'openblas') + basename = self.__class__.__name__ + tmpdir = os.path.join(os.getcwd(), 'build', basename) if not os.path.isdir(tmpdir): os.makedirs(tmpdir) info = {'library_dirs': [tmpdir], - 'libraries': ['openblas'], + 'libraries': [basename], 'language': 'f77'} - fake_lib_file = os.path.join(tmpdir, 'openblas.fobjects') - fake_clib_file = os.path.join(tmpdir, 'openblas.cobjects') + fake_lib_file = os.path.join(tmpdir, basename + '.fobjects') + fake_clib_file = os.path.join(tmpdir, basename + '.cobjects') with open(fake_lib_file, 'w') as f: f.write("\n".join(library_paths)) with open(fake_clib_file, 'w') as f: -- cgit v1.2.1