Skip to content

Commit 7bab921

Browse files
Ouch!
1 parent 10ca315 commit 7bab921

File tree

1 file changed

+36
-5
lines changed

1 file changed

+36
-5
lines changed

.github/workflows/ci.yaml

Lines changed: 36 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,6 @@ jobs:
5757
echo "MESON_SETUP_ARGS=-Dc_args=-I${PY_INC} -Dc_link_args=-L${CONDA_PREFIX}/lib" >> $GITHUB_ENV
5858
5959
- name: Install numcodecs
60-
if: startsWith(matrix.platform, 'ubuntu')
6160
run: |
6261
if [[ "${{ startsWith(matrix.platform, 'ubuntu') }}" == "true" ]]; then
6362
# TODO: Remove this conditional when pcodec supports Python 3.14
@@ -133,12 +132,31 @@ jobs:
133132
- name: Install compilers
134133
run: conda install -y c-compiler cxx-compiler
135134

135+
- name: Meson args - use active Python include/lib (Ubuntu)
136+
if: startsWith(matrix.platform, 'ubuntu')
137+
run: |
138+
PY_INC=$(python -c "import sysconfig; print(sysconfig.get_config_var('INCLUDEPY'))")
139+
echo "PY_INC=$PY_INC" >> $GITHUB_ENV
140+
echo "MESON_SETUP_ARGS=-Dc_args=-I${PY_INC} -Dc_link_args=-L${CONDA_PREFIX}/lib" >> $GITHUB_ENV
141+
136142
- name: Install numcodecs
137143
run: |
138-
if [[ -n "${{ matrix.extras }}" ]]; then
139-
python -m pip install -v ".[${{ matrix.extras }},test]"
144+
if [[ "${{ startsWith(matrix.platform, 'ubuntu') }}" == "true" ]]; then
145+
if [[ -n "${{ matrix.extras }}" ]]; then
146+
python -m pip install -v \
147+
--config-settings="setup-args=${MESON_SETUP_ARGS}" \
148+
".[${{ matrix.extras }},test]"
149+
else
150+
python -m pip install -v \
151+
--config-settings="setup-args=${MESON_SETUP_ARGS}" \
152+
".[test]"
153+
fi
140154
else
141-
python -m pip install -v ".[test]"
155+
if [[ -n "${{ matrix.extras }}" ]]; then
156+
python -m pip install -v ".[${{ matrix.extras }},test]"
157+
else
158+
python -m pip install -v ".[test]"
159+
fi
142160
fi
143161
144162
- name: List installed packages
@@ -189,9 +207,22 @@ jobs:
189207
- name: Install compilers
190208
run: conda install -y c-compiler cxx-compiler
191209

210+
- name: Meson args - use active Python include/lib (Ubuntu)
211+
if: startsWith(matrix.platform, 'ubuntu')
212+
run: |
213+
PY_INC=$(python -c "import sysconfig; print(sysconfig.get_config_var('INCLUDEPY'))")
214+
echo "PY_INC=$PY_INC" >> $GITHUB_ENV
215+
echo "MESON_SETUP_ARGS=-Dc_args=-I${PY_INC} -Dc_link_args=-L${CONDA_PREFIX}/lib" >> $GITHUB_ENV
216+
192217
- name: Install numcodecs and Zarr
193218
run: |
194-
python -m pip install -v ".[test,test_extras]" "${{ matrix.zarr-pkg }}" crc32c
219+
if [[ "${{ startsWith(matrix.platform, 'ubuntu') }}" == "true" ]]; then
220+
python -m pip install -v \
221+
--config-settings="setup-args=${MESON_SETUP_ARGS}" \
222+
".[test,test_extras]" "${{ matrix.zarr-pkg }}" crc32c
223+
else
224+
python -m pip install -v ".[test,test_extras]" "${{ matrix.zarr-pkg }}" crc32c
225+
fi
195226
- name: List installed packages
196227
run: python -m pip list
197228

0 commit comments

Comments
 (0)