@@ -161,32 +161,21 @@ jobs:
161161 echo "enable=" >> $GITHUB_OUTPUT
162162 fi
163163
164- # ── Attempt 1: full build with C extension ────────────────────────────
165164 - name : Build wheel (attempt 1 — with C ext)
166165 id : build_attempt1
167166 continue-on-error : true
168167 uses : pypa/cibuildwheel@v2.23.0
169168 env :
170- CIBW_BEFORE_BUILD : " pip install 'packaging>=23.0'"
171- CIBW_ENVIRONMENT : >
172- OMNIPKG_SKIP_C_EXT=0
173- PIP_EXTRA_INDEX_URL=""
174- CIBW_BEFORE_BUILD: >
175- pip install --upgrade pip 'packaging>=23.0' 'wheel>=0.43.0' &&
176- python -c "import locale; locale.getencoding = lambda: 'UTF-8'" 2>/dev/null || true
177- pip install --upgrade 'packaging>=23.0' pip &&
178- pip install --upgrade 'packaging>=23.0' --target /tmp/pip-build-env-*/overlay/ 2>/dev/null || true
169+ CIBW_ENVIRONMENT : " OMNIPKG_SKIP_C_EXT=0"
170+ CIBW_BEFORE_BUILD : " pip install --upgrade pip 'packaging>=23.0' 'wheel>=0.43.0'"
171+ CIBW_BUILD_FRONTEND : " pip; args: --no-build-isolation"
179172 CIBW_BUILD : " ${{ matrix.py_tag }}-*"
180173 CIBW_ARCHS : " ${{ matrix.cibw_archs }}"
181174 CIBW_SKIP : " pp*"
182175 CIBW_ENABLE : " ${{ steps.cibw_flags.outputs.enable }}"
183- CIBW_BUILD_FRONTEND : " pip; args: --no-build-isolation"
184176 CIBW_TEST_COMMAND : " omnipkg --version"
185- # Skip test on i686/x86 — cryptography dep has no prebuilt i386 wheels
186- # and building from source requires Rust which isn't in the test venv
187177 CIBW_TEST_SKIP : " *-manylinux_i686 *-musllinux_i686 *-win32"
188178 CIBW_REPAIR_WHEEL_COMMAND_LINUX : " auditwheel repair -w {dest_dir} {wheel}"
189- # Newer images fix musllinux locale.getencoding() bug in 2025.02.28-1
190179 CIBW_MANYLINUX_X86_64_IMAGE : " quay.io/pypa/manylinux_2_28_x86_64:latest"
191180 CIBW_MANYLINUX_AARCH64_IMAGE : " quay.io/pypa/manylinux_2_28_aarch64:latest"
192181 CIBW_MANYLINUX_ARMV7L_IMAGE : " quay.io/pypa/manylinux_2_31_armv7l:latest"
@@ -198,13 +187,14 @@ jobs:
198187 CIBW_MUSLLINUX_PPC64LE_IMAGE : " quay.io/pypa/musllinux_1_2_ppc64le:2025.02.28-1"
199188 CIBW_MUSLLINUX_S390X_IMAGE : " quay.io/pypa/musllinux_1_2_s390x:2025.02.28-1"
200189
201- # ── Attempt 2: pure Python fallback (SKIP_C_EXT=1) ───────────────────
202190 - name : Build wheel (attempt 2 — SKIP_C_EXT=1 fallback)
203191 id : build_attempt2
204192 if : steps.build_attempt1.outcome == 'failure'
205193 uses : pypa/cibuildwheel@v2.23.0
206194 env :
207195 CIBW_ENVIRONMENT : " OMNIPKG_SKIP_C_EXT=1"
196+ CIBW_BEFORE_BUILD : " pip install --upgrade pip 'packaging>=23.0' 'wheel>=0.43.0'"
197+ CIBW_BUILD_FRONTEND : " pip; args: --no-build-isolation"
208198 CIBW_BUILD : " ${{ matrix.py_tag }}-*"
209199 CIBW_ARCHS : " ${{ matrix.cibw_archs }}"
210200 CIBW_SKIP : " pp*"
@@ -222,6 +212,7 @@ jobs:
222212 CIBW_MUSLLINUX_ARMV7L_IMAGE : " quay.io/pypa/musllinux_1_2_armv7l:2025.02.28-1"
223213 CIBW_MUSLLINUX_PPC64LE_IMAGE : " quay.io/pypa/musllinux_1_2_ppc64le:2025.02.28-1"
224214 CIBW_MUSLLINUX_S390X_IMAGE : " quay.io/pypa/musllinux_1_2_s390x:2025.02.28-1"
215+
225216 - name : Report build result
226217 if : always()
227218 shell : bash
0 commit comments