diff options
author | Pauli Virtanen <pav@iki.fi> | 2019-12-31 01:21:48 +0200 |
---|---|---|
committer | Pauli Virtanen <pav@iki.fi> | 2019-12-31 13:02:31 +0200 |
commit | dc0adc9aeb59ce6de9c6ce7938e8c91133a05420 (patch) | |
tree | 80786f4242666a0b6cc755547945b1891be5912a | |
parent | 63ef78b1cb80ae52dae115afa2463510336e6759 (diff) | |
download | numpy-dc0adc9aeb59ce6de9c6ce7938e8c91133a05420.tar.gz |
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.
-rw-r--r-- | numpy/distutils/system_info.py | 9 |
1 files changed, 5 insertions, 4 deletions
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: |