Skip to content

Commit

Permalink
add more 'scipy_' to the python code, skip dynamic test on windows fo…
Browse files Browse the repository at this point in the history
…r now
  • Loading branch information
mattip committed Oct 31, 2023
1 parent d2c52da commit bee5763
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,8 @@ jobs:
& $env:BASH_PATH -lc tools/build_gfortran.sh
echo "Static test"
.\for_test\test.exe
echo "Dynamic test"
.\for_test\test_dyn.exe
# echo "Dynamic test"
# .\for_test\test_dyn.exe
- name: Copy
run: |
Expand Down
8 changes: 5 additions & 3 deletions local/scipy_openblas64/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,9 @@ def get_library():
libs = [x for x in os.listdir(get_lib_dir()) if x.endswith(".lib")]
return os.path.splitext(libs[0])[0]
else:
return "openblas_python"
libs = [x for x in os.listdir(get_lib_dir()) if x.startswith("libscipy_openblas")]
# remove the leading lib from libscipy_openblas*
return os.path.splitext(libs[0])[0][3:]

def get_pkg_config():
"""Return a multi-line string that, when saved to a file, can be used with
Expand All @@ -59,7 +61,7 @@ def get_pkg_config():
extralib = "-defaultlib:advapi32 -lgfortran -lquadmath"
libs_flags = f"-L${{libdir}} -l{get_library()}"
else:
extralib = "-lm -lpthread -lgfortran -lquadmath -L${libdir} -lopenblas_python"
extralib = "-lm -lpthread -lgfortran -lquadmath -L${libdir} -l{get_library()}"
libs_flags = ""
cflags_suffix64 = "-DBLAS_SYMBOL_SUFFIX=64_ -DHAVE_BLAS_ILP64"
return dedent(f"""\
Expand Down Expand Up @@ -112,7 +114,7 @@ def get_openblas_config():
libnames = [x for x in os.listdir(lib_dir) if x.startswith("libscipy")]

dll = ctypes.CDLL(os.path.join(lib_dir, libnames[0]), ctypes.RTLD_GLOBAL)
openblas_config = dll.openblas_get_config64_
openblas_config = dll.scipy_openblas_get_config64_
openblas_config.restype = ctypes.c_char_p
bytes = openblas_config()
return bytes.decode("utf8")
Expand Down

0 comments on commit bee5763

Please sign in to comment.