Skip to content

Commit

Permalink
BUG: distutils: prefix library name
Browse files Browse the repository at this point in the history
In linux and particulary MinGW on windows, library names may
be prefixed with "lib." However, if the library name is prefixed
with "lib" on MSVC or ABI-equivalent (clang/intel), the prefix should
not be excluded from the library name. This caused system_info
to find "libopenblas" or "libsuitesparse" but then add "openblas"
to the library names, which is of course problematic because
MSVC would not look for "libopenblas" but rather "openblas."
  • Loading branch information
xoviat committed Dec 17, 2017
1 parent 9d054c1 commit 70572e4
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions numpy/distutils/system_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -804,6 +804,8 @@ def _find_lib(self, lib_dir, lib, exts):
# doesn't seem correct
if ext == '.dll.a':
lib += '.dll'
if ext == '.lib':
lib = prefix + lib
return lib

return False
Expand Down

0 comments on commit 70572e4

Please sign in to comment.