Skip to content

Commit

Permalink
debugging blas linking on windows via github ci
Browse files Browse the repository at this point in the history
  • Loading branch information
enzbus committed Nov 2, 2023
1 parent 577cfa2 commit 82644d1
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
1 change: 1 addition & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@ jobs:
- name: Build and test windows wheels
if: ${{env.DEPLOY == 'True' && startsWith(matrix.os, 'windows')}}
run: |
python -c "import numpy as np; print('NUMPY BLAS INFOS'); print(np.show_config('dicts'))"
python -m pip install build
python -m build -Csetup-args="-Dlink_blas_statically=True"
python -m pip install delvewheel
Expand Down
18 changes: 18 additions & 0 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,24 @@ if not blas_deps[0].found()
cblas_dep = cc.find_library('cblas', static: get_option('link_blas_statically'), required : false)
if cblas_dep.found()
blas_deps += cblas_dep
else
# as a last fallback (used for building wheels in github CI)
# we link statically anaconda-installed openblas
incdir_blas = run_command(py,['-c',
'''import os
import numpy as np
print(np.show_config('dicts')['Build Dependencies']['blas']['include directory'])
'''], check: true).stdout().strip()
libdir_blas = run_command(py,['-c',
'''import os
import numpy as np
print(np.show_config('dicts')['Build Dependencies']['blas']['lib directory'])
'''], check: true).stdout().strip()
blas_windows_include = include_directories(incdir_blas)
blas_windows_dll = static_library(libdir_blas)
blas_deps += declare_dependency(
link_whole : [blas_windows_dll],
include_directories : blas_windows_include)
endif
endif

Expand Down

0 comments on commit 82644d1

Please sign in to comment.