@@ -49,39 +49,22 @@ jobs:
4949 conda config --show-sources
5050 conda list --show-channel-urls
5151
52- - name : Meson args - use active Python include/lib (Ubuntu)
52+ - name : Meson args - prefer Conda over system Python (Ubuntu)
5353 if : startsWith(matrix.platform, 'ubuntu')
5454 run : |
55- PY_INC=$(python -c "import sysconfig; print(sysconfig.get_config_var('INCLUDEPY'))")
56- echo "PY_INC=$PY_INC" >> $GITHUB_ENV
57- echo "MESON_SETUP_ARGS=-Dc_args=-I${PY_INC} -Dc_link_args=-L${CONDA_PREFIX}/lib" >> $GITHUB_ENV
55+ echo "MESONPY_PYTHON=$(python -c 'import sys; print(sys.executable)')" >> $GITHUB_ENV
5856
5957 - name : Install numcodecs
6058 run : |
61- if [[ "${{ startsWith(matrix.platform, 'ubuntu') }}" == "true" ]]; then
62- # TODO: Remove this conditional when pcodec supports Python 3.14
63- if [[ "${{ matrix.python-version }}" == "3.14" ]]; then
64- python -m pip install -v \
65- --config-settings="setup-args=${MESON_SETUP_ARGS}" \
66- ".[test,test_extras,msgpack,google_crc32c,crc32c,zfpy]" \
67- pytest
68- else
69- python -m pip install -v \
70- --config-settings="setup-args=${MESON_SETUP_ARGS}" \
71- ".[test,test_extras,msgpack,google_crc32c,crc32c,pcodec,zfpy]" \
72- pytest
73- fi
59+ # TODO: Remove this conditional when pcodec supports Python 3.14
60+ if [[ "${{ matrix.python-version }}" == "3.14" ]]; then
61+ python -m pip install -v \
62+ ".[test,test_extras,msgpack,google_crc32c,crc32c,zfpy]" \
63+ pytest
7464 else
75- # TODO: Remove this conditional when pcodec supports Python 3.14
76- if [[ "${{ matrix.python-version }}" == "3.14" ]]; then
77- python -m pip install -v \
78- ".[test,test_extras,msgpack,google_crc32c,crc32c,zfpy]" \
79- pytest
80- else
81- python -m pip install -v \
82- ".[test,test_extras,msgpack,google_crc32c,crc32c,pcodec,zfpy]" \
83- pytest
84- fi
65+ python -m pip install -v \
66+ ".[test,test_extras,msgpack,google_crc32c,crc32c,pcodec,zfpy]" \
67+ pytest
8568 fi
8669
8770 - name : List installed packages
@@ -132,31 +115,16 @@ jobs:
132115 - name : Install compilers
133116 run : conda install -y c-compiler cxx-compiler
134117
135- - name : Meson args - use active Python include/lib (Ubuntu)
136- if : startsWith(matrix.platform, 'ubuntu')
118+ - name : Meson args - prefer Conda over system Python (Ubuntu)
137119 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
120+ echo "MESONPY_PYTHON=$(python -c 'import sys; print(sys.executable)')" >> $GITHUB_ENV
141121
142122 - name : Install numcodecs
143123 run : |
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
124+ if [[ -n "${{ matrix.extras }}" ]]; then
125+ python -m pip install -v ".[${{ matrix.extras }},test]"
154126 else
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
127+ python -m pip install -v ".[test]"
160128 fi
161129
162130 - name : List installed packages
@@ -207,22 +175,13 @@ jobs:
207175 - name : Install compilers
208176 run : conda install -y c-compiler cxx-compiler
209177
210- - name : Meson args - use active Python include/lib (Ubuntu)
211- if : startsWith(matrix.platform, 'ubuntu')
178+ - name : Meson args - prefer Conda over system Python (Ubuntu)
212179 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
180+ echo "MESONPY_PYTHON=$(python -c 'import sys; print(sys.executable)')" >> $GITHUB_ENV
216181
217182 - name : Install numcodecs and Zarr
218183 run : |
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
184+ python -m pip install -v ".[test,test_extras]" "${{ matrix.zarr-pkg }}" crc32c
226185 - name : List installed packages
227186 run : python -m pip list
228187
0 commit comments