Skip to content

Commit fe55797

Browse files
authored
[CI] [GHA] Fix wheel building on mac (#33698)
### Tickets: - *179492*
1 parent 0faedbf commit fe55797

File tree

2 files changed

+18
-11
lines changed

2 files changed

+18
-11
lines changed

.github/actions/install_ov_wheels/action.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,8 @@ runs:
3333
Write-Host "Looking for free-threaded Python wheel: $wheel-*cp$pyVersion*t*.whl"
3434
$wheelPath = Get-ChildItem -Path ${{ inputs.wheels-dir-path }} -Filter "$wheel-*cp$pyVersion*t*.whl" | Select-Object -First 1
3535
} else {
36-
$wheelPath = Get-ChildItem -Path ${{ inputs.wheels-dir-path }} -Filter "$wheel-*cp$pyVersion*.whl" | Where-Object { $_.Name -notlike "*cp$pyVersion*t.whl" } | Select-Object -First 1
36+
Write-Host "Looking for non-free-threaded Python wheel: $wheel-*cp$pyVersion*.whl"
37+
$wheelPath = Get-ChildItem -Path ${{ inputs.wheels-dir-path }} -Filter "$wheel-*cp$pyVersion*.whl" | Where-Object { $_.Name -notlike "*cp$pyVersion*t*.whl" } | Select-Object -First 1
3738
}
3839
3940
Write-Host "Wheel path: $($wheelPath)"
@@ -64,8 +65,10 @@ runs:
6465
6566
# free-threading Python wheels have 'cpXYt' in their names
6667
if [ "${{ inputs.free-threaded-python }}" == "true" ]; then
68+
echo "Looking for free-threaded Python wheel: $wheel-*cp$pyVersion*t*.whl"
6769
wheel_path=$(find ${{ inputs.wheels-dir-path }} -name "$wheel-*cp${py_version}t*.whl")
6870
else
71+
echo "Looking for non-free-threaded Python wheel: $wheel-*cp$pyVersion*.whl"
6972
wheel_path=$(find ${{ inputs.wheels-dir-path }} -name "$wheel-*cp$py_version*.whl" ! -name "*cp${py_version}t*.whl")
7073
fi
7174

.github/workflows/mac_arm64.yml

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -240,33 +240,37 @@ jobs:
240240
should-setup-pip-paths: 'false'
241241
self-hosted-runner: 'false'
242242

243-
- name: Setup Python 3.14
243+
- name: Setup Python 3.14t
244244
uses: ./openvino/.github/actions/setup_python
245245
with:
246-
version: "3.14"
246+
version: "3.14t"
247247
should-setup-pip-paths: 'false'
248248
self-hosted-runner: 'false'
249-
250-
- name: Setup Python 3.14t
249+
allow-prereleases: 'true'
250+
251+
- name: Setup Python 3.14
251252
uses: ./openvino/.github/actions/setup_python
252253
with:
253-
version: "3.14t"
254+
version: "3.14"
254255
should-setup-pip-paths: 'false'
255256
self-hosted-runner: 'false'
256-
allow-prereleases: 'true'
257257

258-
- name: Build additional Python wheels
258+
- name: Build additional Python wheels (3.10-3.14t)
259259
run: |
260260
for py_version in "3.10" "3.11" "3.12" "3.13" "3.14" "3.14t"
261261
do
262+
echo "Building Python API and wheels for Python ${py_version}"
262263
python_exec_path=$(python$py_version -c "import sys; print(sys.executable)")
263264
$python_exec_path -m pip install -r ${{ env.OPENVINO_REPO }}/src/bindings/python/wheel/requirements-dev.txt
265+
266+
echo "Using Python executable at: ${python_exec_path}"
264267
265-
if [[ $PY_VER == "3.14t" ]]; then
266-
cmake -DPython3_EXECUTABLE=$python_exec_path -DENABLE_WHEEL=ON -DENABLE_GIL_PYTHON_API=OFF -DOpenVINODeveloperPackage_DIR=${{ env.BUILD_DIR }} -S ${{ env.OPENVINO_REPO }}/src/bindings/python -B ${{ github.workspace }}/py$py_version
268+
if [[ $py_version == "3.14t" ]]; then
269+
gil_option="-DENABLE_GIL_PYTHON_API=OFF"
267270
else
268-
cmake -DPython3_EXECUTABLE=$python_exec_path -DENABLE_WHEEL=ON -DOpenVINODeveloperPackage_DIR=${{ env.BUILD_DIR }} -S ${{ env.OPENVINO_REPO }}/src/bindings/python -B ${{ github.workspace }}/py$py_version
271+
gil_option=""
269272
fi
273+
cmake -DPython3_EXECUTABLE=$python_exec_path -DENABLE_WHEEL=ON $gil_option -DOpenVINODeveloperPackage_DIR=${{ env.BUILD_DIR }} -S ${{ env.OPENVINO_REPO }}/src/bindings/python -B ${{ github.workspace }}/py$py_version
270274
271275
cmake --build ${{ github.workspace }}/py$py_version --parallel
272276
cmake --install ${{ github.workspace }}/py$py_version --config ${{ env.CMAKE_BUILD_TYPE }} --prefix ${{ env.INSTALL_WHEELS_DIR }} --component python_wheels

0 commit comments

Comments
 (0)