Skip to content

Commit

Permalink
trying to get windows build
Browse files Browse the repository at this point in the history
  • Loading branch information
enzo.busseti committed Nov 2, 2023
1 parent fb5dcc8 commit 41481de
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 13 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ jobs:
if [[ "$PYTHON_VERSION" == "3.7" ]] || [[ "$PYTHON_VERSION" == "3.8" ]]; then
python OLD_setup.py install
elif [[ "$PYTHON_VERSION" != "3.7" ]] && [[ "$PYTHON_VERSION" != "3.8" ]]; then
python -c "import numpy as np; print('NUMPY BLAS INFOS'); print(np.show_config('dicts'))"
python -m pip install .
fi
- name: Test
Expand All @@ -134,7 +135,6 @@ 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
27 changes: 15 additions & 12 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -10,31 +10,34 @@ else
blas_deps = [cc.find_library('openblas', static: get_option('link_blas_statically'), required : false)]
endif
if not blas_deps[0].found()
blas_deps = [cc.find_library('blas')]
blas_deps = [cc.find_library('blas', static: get_option('link_blas_statically')]
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',
endif
endif

# as a last fallback (used for building wheels in github CI)
# we link statically anaconda-installed openblas
if not blas_deps[0].found()
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',
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
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


fs = import('fs')
if not fs.exists('scs_source/README.md')
error('Missing the `scs_source` submodule! Run `git submodule update --init` to fix this.')
Expand Down

0 comments on commit 41481de

Please sign in to comment.