Skip to content

OpenVINO™ is an open source toolkit for optimizing and deploying AI inference

[CI] [GHA] Fix wheel building on mac (#33698)

Andrei Kashchikhinfe55797b1521
diff --git a/.github/actions/install_ov_wheels/action.yml b/.github/actions/install_ov_wheels/action.yml
index 5cc33d8d956..af5718a84b3 100644
--- a/.github/actions/install_ov_wheels/action.yml
+++ b/.github/actions/install_ov_wheels/action.yml
@@ -33,7 +33,8 @@ runs:
Write-Host "Looking for free-threaded Python wheel: $wheel-*cp$pyVersion*t*.whl"
$wheelPath = Get-ChildItem -Path ${{ inputs.wheels-dir-path }} -Filter "$wheel-*cp$pyVersion*t*.whl" | Select-Object -First 1
} else {
- $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
+ Write-Host "Looking for non-free-threaded Python wheel: $wheel-*cp$pyVersion*.whl"
+ $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
}
Write-Host "Wheel path: $($wheelPath)"
@@ -64,8 +65,10 @@ runs:
# free-threading Python wheels have 'cpXYt' in their names
if [ "${{ inputs.free-threaded-python }}" == "true" ]; then
+ echo "Looking for free-threaded Python wheel: $wheel-*cp$pyVersion*t*.whl"
wheel_path=$(find ${{ inputs.wheels-dir-path }} -name "$wheel-*cp${py_version}t*.whl")
else
+ echo "Looking for non-free-threaded Python wheel: $wheel-*cp$pyVersion*.whl"
wheel_path=$(find ${{ inputs.wheels-dir-path }} -name "$wheel-*cp$py_version*.whl" ! -name "*cp${py_version}t*.whl")
fi
diff --git a/.github/workflows/mac_arm64.yml b/.github/workflows/mac_arm64.yml
index df35759571d..ec29815a00f 100644
--- a/.github/workflows/mac_arm64.yml
+++ b/.github/workflows/mac_arm64.yml
@@ -240,33 +240,37 @@ jobs:
should-setup-pip-paths: 'false'
self-hosted-runner: 'false'
- - name: Setup Python 3.14
+ - name: Setup Python 3.14t
uses: ./openvino/.github/actions/setup_python
with:
- version: "3.14"
+ version: "3.14t"
should-setup-pip-paths: 'false'
self-hosted-runner: 'false'
-
- - name: Setup Python 3.14t
+ allow-prereleases: 'true'
+
+ - name: Setup Python 3.14
uses: ./openvino/.github/actions/setup_python
with:
- version: "3.14t"
+ version: "3.14"
should-setup-pip-paths: 'false'
self-hosted-runner: 'false'
- allow-prereleases: 'true'
- - name: Build additional Python wheels
+ - name: Build additional Python wheels (3.10-3.14t)
run: |
for py_version in "3.10" "3.11" "3.12" "3.13" "3.14" "3.14t"
do
+ echo "Building Python API and wheels for Python ${py_version}"
python_exec_path=$(python$py_version -c "import sys; print(sys.executable)")
$python_exec_path -m pip install -r ${{ env.OPENVINO_REPO }}/src/bindings/python/wheel/requirements-dev.txt
+
+ echo "Using Python executable at: ${python_exec_path}"
- if [[ $PY_VER == "3.14t" ]]; then
- 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
+ if [[ $py_version == "3.14t" ]]; then
+ gil_option="-DENABLE_GIL_PYTHON_API=OFF"
else
- 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
+ gil_option=""
fi
+ 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
cmake --build ${{ github.workspace }}/py$py_version --parallel
cmake --install ${{ github.workspace }}/py$py_version --config ${{ env.CMAKE_BUILD_TYPE }} --prefix ${{ env.INSTALL_WHEELS_DIR }} --component python_wheels