|
57 | 57 | echo "MESON_SETUP_ARGS=-Dc_args=-I${PY_INC} -Dc_link_args=-L${CONDA_PREFIX}/lib" >> $GITHUB_ENV |
58 | 58 |
|
59 | 59 | - name: Install numcodecs |
60 | | - if: startsWith(matrix.platform, 'ubuntu') |
61 | 60 | run: | |
62 | 61 | if [[ "${{ startsWith(matrix.platform, 'ubuntu') }}" == "true" ]]; then |
63 | 62 | # TODO: Remove this conditional when pcodec supports Python 3.14 |
@@ -133,12 +132,31 @@ jobs: |
133 | 132 | - name: Install compilers |
134 | 133 | run: conda install -y c-compiler cxx-compiler |
135 | 134 |
|
| 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 | +
|
136 | 142 | - name: Install numcodecs |
137 | 143 | 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 |
140 | 154 | 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 |
142 | 160 | fi |
143 | 161 |
|
144 | 162 | - name: List installed packages |
@@ -189,9 +207,22 @@ jobs: |
189 | 207 | - name: Install compilers |
190 | 208 | run: conda install -y c-compiler cxx-compiler |
191 | 209 |
|
| 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 | +
|
192 | 217 | - name: Install numcodecs and Zarr |
193 | 218 | 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 |
195 | 226 | - name: List installed packages |
196 | 227 | run: python -m pip list |
197 | 228 |
|
|
0 commit comments