Skip to content

Commit ff7bdd7

Browse files
committed
add option to ignore mkl dep during source dist generation
1 parent 6284c70 commit ff7bdd7

File tree

3 files changed

+10
-23
lines changed

3 files changed

+10
-23
lines changed

.github/workflows/python-package-conda.yml

Lines changed: 1 addition & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -106,27 +106,8 @@ jobs:
106106
with:
107107
fetch-depth: 0
108108

109-
- name: Set up Python
110-
uses: actions/setup-python@v2
111-
with:
112-
python-version: "3.13"
113-
114-
- name: Add Intel repository
115-
run: |
116-
wget https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS-2023.PUB
117-
sudo apt-key add GPG-PUB-KEY-INTEL-SW-PRODUCTS-2023.PUB
118-
rm GPG-PUB-KEY-INTEL-SW-PRODUCTS-2023.PUB
119-
sudo add-apt-repository "deb https://apt.repos.intel.com/oneapi all main"
120-
sudo apt-get update
121-
122-
- name: Install Intel OneAPI
123-
run: |
124-
sudo apt-get install intel-oneapi-mkl-devel
125-
126109
- name: Build sdist
127-
run: |
128-
source ${{ env.ONEAPI_ROOT }}/setvars.sh
129-
pipx run build --sdist
110+
run: pipx run build --sdist -Csetup-args="-Ddist_ignore_mkl_dep=true"
130111

131112
- uses: actions/upload-artifact@v4
132113
with:

meson.options

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,8 @@ option('use-ilp64', type: 'boolean', value: false,
55
description: 'Use ILP64 (64-bit integer) BLAS and LAPACK interfaces')
66

77
option('mkl-threading', type: 'string', value: 'auto',
8-
description: 'MKL threading method, one of: `seq`, `iomp`, `gomp`, `tbb`')
8+
description: 'MKL threading method, one of: `seq`, `iomp`, `gomp`, `tbb`')
9+
10+
option('dist_ignore_mkl_dep', type: 'boolean', value: false,
11+
description: 'Mark the mkl dep as optional, for use during source distribution archiving.'
12+
)

pydiso/meson.build

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,10 @@ mkl_version_req = '>=2023.0'
4040

4141
use_sdl = get_option('use-sdl')
4242

43+
mkl_required = not get_option('dist_ignore_mkl_dep')
44+
4345
if use_sdl
44-
mkl_dep = dependency('mkl-sdl', required: true)
46+
mkl_dep = dependency('mkl-sdl', required: mkl_required)
4547
else
4648
# find mkl
4749
mkl_dep = dependency(mkl_dep_name,
@@ -55,7 +57,7 @@ else
5557
# or missing it because no pkg-config installed. If so, we need to retry
5658
# with MKL SDL, and drop the version constraint.
5759
if not mkl_dep.found() and mkl_may_use_sdl
58-
mkl_dep = dependency('mkl-sdl', required: true)
60+
mkl_dep = dependency('mkl-sdl', required: mkl_required)
5961
endif
6062

6163
endif

0 commit comments

Comments
 (0)