Skip to content

Commit 64ebfea

Browse files
Use Conda Python headers
1 parent 1fdde70 commit 64ebfea

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

.github/workflows/ci.yaml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,13 +47,20 @@ jobs:
4747
conda config --show-sources
4848
conda list --show-channel-urls
4949
50+
- name: Meson args - use active Python include/lib (Ubuntu)
51+
if: startsWith(matrix.platform, 'ubuntu')
52+
run: |
53+
PY_INC=$(python -c "import sysconfig; print(sysconfig.get_config_var('INCLUDEPY'))")
54+
echo "PY_INC=$PY_INC" >> $GITHUB_ENV
55+
echo "MESON_SETUP_ARGS=-Dc_args=-I${PY_INC} -Dc_link_args=-L${CONDA_PREFIX}/lib" >> $GITHUB_ENV
56+
5057
- name: Install numcodecs
5158
run: |
5259
# TODO: Remove this conditional when pcodec supports Python 3.14
5360
if [[ "${{ matrix.python-version }}" == "3.14" ]]; then
54-
python -m pip install -v ".[test,test_extras,msgpack,google_crc32c,crc32c,zfpy]"
61+
python -m pip install -v --config-settings=setup-args="${MESON_SETUP_ARGS} ".[test,test_extras,msgpack,google_crc32c,crc32c,zfpy]"
5562
else
56-
python -m pip install -v ".[test,test_extras,msgpack,google_crc32c,crc32c,pcodec,zfpy]"
63+
python -m pip install -v --config-settings=setup-args="${MESON_SETUP_ARGS} ".[test,test_extras,msgpack,google_crc32c,crc32c,pcodec,zfpy]"
5764
fi
5865
5966
- name: List installed packages

0 commit comments

Comments
 (0)