Skip to content

Commit

Permalink
add sdist_mode option
Browse files Browse the repository at this point in the history
  • Loading branch information
bodono committed Jan 2, 2025
1 parent d6f8386 commit f590e71
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ jobs:
submodules: true

- name: Build sdist
run: pipx run build --sdist
run: pipx run build --sdist -Dsdist_mode=true

- uses: actions/upload-artifact@v4
with:
Expand Down
7 changes: 4 additions & 3 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,10 @@ else
endif
endif

# Since nothing above was required, we stop here if failed
if not blas_deps[0].found()
error('OpenBLAS or Netlib BLAS/CBLAS is required on all platforms except Windows, and was not found.')
# Since nothing above was required, we stop here if failed.
# When creating an sdist we are not compiling / linking, so don't need to fail.
if not blas_deps[0].found() and not get_option('sdist_mode'):
error('OpenBLAS or Netlib BLAS/CBLAS is required on all platforms, and was not found.')
endif

fs = import('fs')
Expand Down
2 changes: 2 additions & 0 deletions meson.options
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,5 @@ option('link_blas_statically', type: 'boolean',
value: false, description: 'copy BLAS compiled object into SCS module(s)')
option('link_mkl', type: 'boolean',
value: false, description: 'link to mkl-rt library')
option('sdist_mode', type: 'boolean', value: false,
description: 'Set to true if building an sdist')

0 comments on commit f590e71

Please sign in to comment.