Skip to content

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

[CI] [GHA] Add Python 3.14 and 3.14t (#33079)

Andrei Kashchikhin88ca29294ea8
diff --git a/.github/actions/install_ov_wheels/action.yml b/.github/actions/install_ov_wheels/action.yml
index 0168407a3c1..5cc33d8d956 100644
--- a/.github/actions/install_ov_wheels/action.yml
+++ b/.github/actions/install_ov_wheels/action.yml
@@ -6,6 +6,10 @@ inputs:
required: true
wheels-to-install:
description: 'List of wheel names to install in the form of "openvino openvino_tokenizers"'
+ free-threaded-python:
+ description: 'Whether to look for free-threaded Python wheels (with "cpXYt" in their names)'
+ required: false
+ default: 'false'
runs:
using: 'composite'
steps:
@@ -21,8 +25,17 @@ runs:
Write-Host "Wheels folder: $(Get-ChildItem -Path ${{ inputs.wheels-dir-path }})"
foreach ($wheel in $("${{ inputs.wheels-to-install }}" -split ' ')) {
+ Write-Host "Installing the $wheel wheel"
+
# Search for the python-specific wheel version and install it if exists
- $wheelPath = Get-ChildItem -Path ${{ inputs.wheels-dir-path }} -Filter "$wheel-*cp$pyVersion*.whl" | Select-Object -First 1
+ # Free-threading Python wheels have 'cpXYt' in their names
+ if ("${{ inputs.free-threaded-python }}" -eq "true") {
+ 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 "Wheel path: $($wheelPath)"
if ($wheelPath) {
python3 -m pip install $wheelPath.FullName
@@ -48,7 +61,14 @@ runs:
echo "Installing the ${wheel} wheel"
# Search for the python-specific wheel version and install it if exists
- wheel_path=$(find ${{ inputs.wheels-dir-path }} -name "$wheel-*cp$py_version*.whl")
+
+ # free-threading Python wheels have 'cpXYt' in their names
+ if [ "${{ inputs.free-threaded-python }}" == "true" ]; then
+ wheel_path=$(find ${{ inputs.wheels-dir-path }} -name "$wheel-*cp${py_version}t*.whl")
+ else
+ wheel_path=$(find ${{ inputs.wheels-dir-path }} -name "$wheel-*cp$py_version*.whl" ! -name "*cp${py_version}t*.whl")
+ fi
+
echo "Wheel path: ${wheel_path}"
if [ -n "${wheel_path}" ]; then
python3 -m pip install $wheel_path
diff --git a/.github/actions/setup_python/action.yml b/.github/actions/setup_python/action.yml
index 416e1a66ec6..aadd6a7e26b 100644
--- a/.github/actions/setup_python/action.yml
+++ b/.github/actions/setup_python/action.yml
@@ -15,6 +15,10 @@ inputs:
description: 'If the runner is self-hosted'
required: false
default: 'true'
+ allow-prereleases:
+ description: 'If pre-release versions of Python are allowed'
+ required: false
+ default: 'false'
runs:
using: 'composite'
steps:
@@ -40,9 +44,10 @@ runs:
- if: ${{ runner.os == 'macOS' || runner.os == 'Windows' || (runner.os == 'Linux' && steps.check_python.outputs.installed == 'false') }}
name: Setup Python ${{ inputs.version }}
- uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0
+ uses: actions/setup-python@83679a892e2d95755f2dac6acb0bfd1e9ac5d548 # v6.1.0
with:
python-version: ${{ inputs.version }}
+ allow-prereleases: ${{ inputs.allow-prereleases }}
- if: ${{ inputs.should-setup-pip-paths == 'true' && runner.os != 'Windows' }}
name: Setup pip variables (cache and install path)
diff --git a/.github/dockerfiles/docker_tag b/.github/dockerfiles/docker_tag
index 14dcd5bb5c7..a35ef81f102 100644
--- a/.github/dockerfiles/docker_tag
+++ b/.github/dockerfiles/docker_tag
@@ -1 +1 @@
-pr-33511
+pr-33079
diff --git a/.github/dockerfiles/ov_build/debian_10_arm/Dockerfile b/.github/dockerfiles/ov_build/debian_10_arm/Dockerfile
index 43a2148f70e..0da0734f5a5 100644
--- a/.github/dockerfiles/ov_build/debian_10_arm/Dockerfile
+++ b/.github/dockerfiles/ov_build/debian_10_arm/Dockerfile
@@ -195,13 +195,55 @@ RUN cd Python-3.13.2 && make distclean && \
ac_cv_file__dev_ptc=no && \
make -j $(nproc) && make altinstall
+# Cross-compile Python3.14 for ARM
+RUN curl -O https://www.python.org/ftp/python/3.14.0/Python-3.14.0.tgz && \
+ tar -xf Python-3.14.0.tgz && \
+ cd Python-3.14.0 && \
+ LDFLAGS="-L/usr/local/lib64" ./configure --with-openssl=/usr/local --with-openssl-rpath=auto && \
+ make -j $(nproc) && make altinstall
+
+# Cross-compile Python3.14 for ARM
+RUN cd Python-3.14.0 && make distclean && \
+ ./configure \
+ --host=arm-linux-gnueabihf \
+ --build=$(dpkg-architecture -qDEB_BUILD_GNU_TYPE) \
+ --disable-ipv6 \
+ --enable-shared \
+ --prefix=/opt/python3.14_arm \
+ --with-build-python \
+ ac_cv_file__dev_ptmx=no \
+ ac_cv_file__dev_ptc=no && \
+ make -j4 && make altinstall
+
+# Cross-compile Python3.14t for ARM (with --disable-gil)
+RUN cp -r Python-3.14.0 Python-3.14t && \
+ cd Python-3.14t && make distclean && \
+ LDFLAGS="-L/usr/local/lib64" ./configure --disable-gil --with-openssl=/usr/local --with-openssl-rpath=auto --prefix=/usr/local/bin/python3.14t && \
+ make -j4 && make altinstall && \
+ ln -s /usr/local/bin/python3.14t/bin/python3.14 /usr/bin/python3.14t
+
+# Cross-compile Python3.14t for ARM
+RUN cd Python-3.14t && make distclean && \
+ ./configure \
+ --host=arm-linux-gnueabihf \
+ --build=$(dpkg-architecture -qDEB_BUILD_GNU_TYPE) \
+ --disable-ipv6 \
+ --enable-shared \
+ --prefix=/opt/python3.14t_arm \
+ --with-build-python \
+ ac_cv_file__dev_ptmx=no \
+ ac_cv_file__dev_ptc=no && \
+ make -j4 && make altinstall
+
# Setup pip
ENV PIP_VERSION="24.0"
RUN python3 -m pip install --upgrade pip==${PIP_VERSION} && \
python3.10 -m pip install --upgrade pip==${PIP_VERSION} && \
python3.11 -m pip install --upgrade pip==${PIP_VERSION} && \
python3.12 -m pip install --upgrade pip==${PIP_VERSION} && \
- python3.13 -m pip install --upgrade pip==${PIP_VERSION}
+ python3.13 -m pip install --upgrade pip==${PIP_VERSION} && \
+ python3.14 -m pip install --upgrade pip==${PIP_VERSION} && \
+ python3.14t -m pip install --upgrade pip==${PIP_VERSION}
# Use Python 3.11 as default
# Using venv here because other methods to switch the default Python break both system and wheels build
diff --git a/.github/dockerfiles/ov_build/fedora_29/Dockerfile b/.github/dockerfiles/ov_build/fedora_29/Dockerfile
index 148097da8ec..001d09442eb 100644
--- a/.github/dockerfiles/ov_build/fedora_29/Dockerfile
+++ b/.github/dockerfiles/ov_build/fedora_29/Dockerfile
@@ -65,6 +65,22 @@ RUN cd /usr/src/Python-3.13.2 && \
./configure --enable-optimizations --enable-loadable-sqlite-extensions --prefix=/usr && \
make altinstall
+# Python 3.14
+RUN cd /usr/src && \
+ wget https://www.python.org/ftp/python/3.14.0/Python-3.14.0.tgz && \
+ tar xzf Python-3.14.0.tgz
+RUN cd /usr/src/Python-3.14.0 && \
+ ./configure --enable-optimizations --enable-loadable-sqlite-extensions --prefix=/usr && \
+ make altinstall
+
+# Python 3.14 free-threading
+RUN cp -r /usr/src/Python-3.14.0 /usr/src/Python-3.14t
+RUN cd /usr/src/Python-3.14t && \
+ ./configure --disable-gil --enable-loadable-sqlite-extensions --prefix=/usr/python3.14t && \
+ make altinstall
+
+RUN ln -s /usr/python3.14t/bin/python3.14t /usr/bin/python3.14t
+
# Install sscache
ARG SCCACHE_VERSION="v0.7.5"
ENV SCCACHE_HOME="/opt/sccache" \
@@ -89,6 +105,8 @@ RUN curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py && \
python3.11 get-pip.py --no-cache-dir pip==${PIP_VERSION} && \
python3.12 get-pip.py --no-cache-dir pip==${PIP_VERSION} && \
python3.13 get-pip.py --no-cache-dir pip==${PIP_VERSION} && \
+ python3.14 get-pip.py --no-cache-dir pip==${PIP_VERSION} && \
+ python3.14t get-pip.py --no-cache-dir pip==${PIP_VERSION} && \
rm -f get-pip.py
ENV PIP_CACHE_DIR=/mount/caches/pip/linux/${PIP_VERSION}
diff --git a/.github/dockerfiles/ov_build/ubuntu_22_04_arm64/Dockerfile b/.github/dockerfiles/ov_build/ubuntu_22_04_arm64/Dockerfile
index c6f619b47c8..5a7b94c9a1e 100644
--- a/.github/dockerfiles/ov_build/ubuntu_22_04_arm64/Dockerfile
+++ b/.github/dockerfiles/ov_build/ubuntu_22_04_arm64/Dockerfile
@@ -41,6 +41,9 @@ RUN apt-get update && \
python3.12-venv \
python3.13-dev \
python3.13-venv \
+ python3.14-nogil \
+ python3.14-venv \
+ python3.14-dev \
libhdf5-dev \
# For Java API
default-jdk \
@@ -90,6 +93,8 @@ RUN curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py && \
python3.11 get-pip.py --no-cache-dir pip==${PIP_VERSION} && \
python3.12 get-pip.py --no-cache-dir pip==${PIP_VERSION} && \
python3.13 get-pip.py --no-cache-dir pip==${PIP_VERSION} && \
+ python3.14 get-pip.py --no-cache-dir pip==${PIP_VERSION} && \
+ python3.14t get-pip.py --no-cache-dir pip==${PIP_VERSION} && \
rm -f get-pip.py
# Use Python 3.11 as default instead of Python 3.10
diff --git a/.github/dockerfiles/ov_build/ubuntu_22_04_x64/Dockerfile b/.github/dockerfiles/ov_build/ubuntu_22_04_x64/Dockerfile
index 80b842e4268..2044483af2c 100644
--- a/.github/dockerfiles/ov_build/ubuntu_22_04_x64/Dockerfile
+++ b/.github/dockerfiles/ov_build/ubuntu_22_04_x64/Dockerfile
@@ -36,6 +36,9 @@ RUN apt-get update && \
python3.12-venv \
python3.13-dev \
python3.13-venv \
+ python3.14-nogil \
+ python3.14-venv \
+ python3.14-dev \
# For Java API
default-jdk \
# To build documentation
@@ -73,6 +76,7 @@ RUN wget https://cmake.org/files/v4.1/cmake-4.1.1-linux-x86_64.sh && \
rm cmake-4.1.1-linux-x86_64.sh
ENV PATH="$SCCACHE_HOME:$PATH"
+
# Setup pip
ENV PIP_VERSION="24.0"
RUN curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py && \
@@ -81,6 +85,8 @@ RUN curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py && \
python3.11 get-pip.py --no-cache-dir pip==${PIP_VERSION} && \
python3.12 get-pip.py --no-cache-dir pip==${PIP_VERSION} && \
python3.13 get-pip.py --no-cache-dir pip==${PIP_VERSION} && \
+ python3.14 get-pip.py --no-cache-dir pip==${PIP_VERSION} && \
+ python3.14t get-pip.py --no-cache-dir pip==${PIP_VERSION} && \
rm -f get-pip.py
# Use Python 3.11 as default
@@ -108,4 +114,3 @@ RUN mkdir -p ${DOXYGEN_HOME} && cd ${DOXYGEN_HOME} && wget https://www.doxygen.n
tar -I pigz -xf doxygen-$DOXYGEN_VERSION.linux.bin.tar.gz && \
rm -f doxygen-$DOXYGEN_VERSION.linux.bin.tar.gz
ENV PATH="${DOXYGEN_HOME}/doxygen-$DOXYGEN_VERSION/bin:$PATH"
-
diff --git a/.github/dockerfiles/ov_build/ubuntu_24_04_x64/Dockerfile b/.github/dockerfiles/ov_build/ubuntu_24_04_x64/Dockerfile
index a823302cfe5..8d4899e6bdf 100644
--- a/.github/dockerfiles/ov_build/ubuntu_24_04_x64/Dockerfile
+++ b/.github/dockerfiles/ov_build/ubuntu_24_04_x64/Dockerfile
@@ -39,6 +39,9 @@ RUN apt-get update && \
python3-venv \
python3-pip \
python3-full \
+ python3.14-nogil \
+ python3.14-venv \
+ python3.14-dev \
# For Java API
default-jdk \
# For clang-tidy validation
@@ -72,10 +75,13 @@ ENV PATH="/venv/bin:$PATH"
# Setup pip
ENV PIP_VERSION="24.0"
-RUN /venv/bin/python3 -m pip install --upgrade pip==${PIP_VERSION} && \
+RUN curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py && \
+ /venv/bin/python3 -m pip install --upgrade pip==${PIP_VERSION} && \
python3.10 -m pip install --upgrade pip==${PIP_VERSION} && \
python3.11 -m pip install --upgrade pip==${PIP_VERSION} && \
python3.12 -m pip install --upgrade pip==${PIP_VERSION} && \
- python3.13 -m pip install --upgrade pip==${PIP_VERSION}
+ python3.13 -m pip install --upgrade pip==${PIP_VERSION} && \
+ python3.14 -m pip install --upgrade pip==${PIP_VERSION} && \
+ python3.14t get-pip.py --no-cache-dir pip==${PIP_VERSION}
ENV PIP_CACHE_DIR=/mount/caches/pip/linux/${PIP_VERSION}
diff --git a/.github/dockerfiles/ov_test/ubuntu_22_04_x64_py314/Dockerfile b/.github/dockerfiles/ov_test/ubuntu_22_04_x64_py314/Dockerfile
new file mode 100644
index 00000000000..9a24fd23559
--- /dev/null
+++ b/.github/dockerfiles/ov_test/ubuntu_22_04_x64_py314/Dockerfile
@@ -0,0 +1,52 @@
+ARG REGISTRY="docker.io"
+FROM ${REGISTRY}/library/ubuntu:22.04
+
+USER root
+
+# APT configuration
+RUN echo 'Acquire::Retries "10";' > /etc/apt/apt.conf && \
+ echo 'APT::Get::Assume-Yes "true";' >> /etc/apt/apt.conf && \
+ echo 'APT::Get::Fix-Broken "true";' >> /etc/apt/apt.conf && \
+ echo 'APT::Get::no-install-recommends "true";' >> /etc/apt/apt.conf
+
+ENV DEBIAN_FRONTEND="noninteractive" \
+ TZ="Europe/London"
+
+RUN apt-get update && \
+ apt-get install software-properties-common && \
+ add-apt-repository --yes --no-update ppa:git-core/ppa && \
+ add-apt-repository --yes --no-update ppa:deadsnakes/ppa && \
+ apt-get update && \
+ apt-get install \
+ curl \
+ git \
+ gpg-agent \
+ tzdata \
+ # parallel gzip
+ pigz \
+ # Python
+ python3.14-dev \
+ python3.14-venv \
+ && \
+ rm -rf /var/lib/apt/lists/*
+
+# Install openvino dependencies
+ADD scripts/install_dependencies/install_openvino_dependencies.sh /install_openvino_dependencies.sh
+RUN chmod +x /install_openvino_dependencies.sh && \
+ /install_openvino_dependencies.sh && \
+ rm -rf /var/lib/apt/lists/*
+
+# Setup pip
+ENV PIP_VERSION="24.0"
+RUN curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py && \
+ python3 get-pip.py --no-cache-dir pip==${PIP_VERSION} && \
+ python3.14 get-pip.py --no-cache-dir pip==${PIP_VERSION} && \
+ rm -f get-pip.py
+
+# Use Python 3.14 as default instead of Python 3.10
+# Using venv here 'cause other methods to switch the default Python on Ubuntu 22 break both system and wheels build
+RUN python3.14 -m venv venv
+ENV PATH="/venv/bin:$PATH"
+
+ENV PIP_CACHE_DIR=/mount/caches/pip/linux/${PIP_VERSION}
+ENV PIP_INSTALL_PATH=/venv/lib/python3.14/site-packages
diff --git a/.github/dockerfiles/ov_test/ubuntu_22_04_x64_py314t/Dockerfile b/.github/dockerfiles/ov_test/ubuntu_22_04_x64_py314t/Dockerfile
new file mode 100644
index 00000000000..c3ca5838273
--- /dev/null
+++ b/.github/dockerfiles/ov_test/ubuntu_22_04_x64_py314t/Dockerfile
@@ -0,0 +1,53 @@
+ARG REGISTRY="docker.io"
+FROM ${REGISTRY}/library/ubuntu:22.04
+
+USER root
+
+# APT configuration
+RUN echo 'Acquire::Retries "10";' > /etc/apt/apt.conf && \
+ echo 'APT::Get::Assume-Yes "true";' >> /etc/apt/apt.conf && \
+ echo 'APT::Get::Fix-Broken "true";' >> /etc/apt/apt.conf && \
+ echo 'APT::Get::no-install-recommends "true";' >> /etc/apt/apt.conf
+
+ENV DEBIAN_FRONTEND="noninteractive" \
+ TZ="Europe/London"
+
+RUN apt-get update && \
+ apt-get install software-properties-common && \
+ add-apt-repository --yes --no-update ppa:git-core/ppa && \
+ add-apt-repository --yes --no-update ppa:deadsnakes/ppa && \
+ apt-get update && \
+ apt-get install \
+ curl \
+ git \
+ gpg-agent \
+ tzdata \
+ # parallel gzip
+ pigz \
+ # Python
+ python3.14-nogil \
+ python3.14-venv \
+ python3.14-dev \
+ && \
+ rm -rf /var/lib/apt/lists/*
+
+# Install openvino dependencies
+ADD scripts/install_dependencies/install_openvino_dependencies.sh /install_openvino_dependencies.sh
+RUN chmod +x /install_openvino_dependencies.sh && \
+ /install_openvino_dependencies.sh && \
+ rm -rf /var/lib/apt/lists/*
+
+# Setup pip
+ENV PIP_VERSION="24.0"
+RUN curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py && \
+ python3 get-pip.py --no-cache-dir pip==${PIP_VERSION} && \
+ python3.14t get-pip.py --no-cache-dir pip==${PIP_VERSION} && \
+ rm -f get-pip.py
+
+# Use Python 3.14 free-threading as default instead of Python 3.10
+# Using venv here 'cause other methods to switch the default Python on Ubuntu 22 break both system and wheels build
+RUN python3.14t -m venv venv
+ENV PATH="/venv/bin:$PATH"
+
+ENV PIP_CACHE_DIR=/mount/caches/pip/linux/${PIP_VERSION}
+ENV PIP_INSTALL_PATH=/venv/lib/python3.14t/site-packages
diff --git a/.github/workflows/debian_10_arm.yml b/.github/workflows/debian_10_arm.yml
index 420d64d7b38..2ab00a07bd4 100644
--- a/.github/workflows/debian_10_arm.yml
+++ b/.github/workflows/debian_10_arm.yml
@@ -104,7 +104,7 @@ jobs:
build-debian-packages: false
build-contrib: false
build-rpm-packages: false
- build-additional-python-packages: true
+ build-additional-python-packages: false
target-branch: ${{ inputs.target-branch }}
cmake-options: >-
-DTHREADS_PTHREAD_ARG=-pthread
diff --git a/.github/workflows/job_build_linux.yml b/.github/workflows/job_build_linux.yml
index e20f336a560..e9c6395fb8a 100644
--- a/.github/workflows/job_build_linux.yml
+++ b/.github/workflows/job_build_linux.yml
@@ -223,12 +223,14 @@ jobs:
- name: Build Python API and wheels
if: ${{ inputs.build-additional-python-packages }}
run: |
- for py_version in "3.10" "3.11" "3.12" "3.13"
+ 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}"
export PY_BUILD_DIR=${{ github.workspace }}/py$py_version
mkdir -p $PY_BUILD_DIR
python_exec_path=$(python$py_version -c "import sys; print(sys.executable)")
+ echo "Using Python executable at: ${python_exec_path}"
$python_exec_path -m pip install -r ${OPENVINO_REPO}/src/bindings/python/wheel/requirements-dev.txt
@@ -238,6 +240,10 @@ jobs:
CMAKE_OPTIONS+=" -DCMAKE_TOOLCHAIN_FILE=${{ env.OPENVINO_REPO }}/cmake/arm.toolchain.cmake -DPYTHON_MODULE_EXTENSION=$(/opt/python${py_version}_arm/bin/python${py_version}-config --extension-suffix) -DPython3_INCLUDE_DIR=/opt/python${py_version}_arm/include/python${py_version}"
fi
+ if [[ $py_version == "3.14t" ]]; then
+ CMAKE_OPTIONS+=" -DENABLE_GIL_PYTHON_API=OFF"
+ fi
+
cmake ${CMAKE_OPTIONS} -S ${OPENVINO_REPO}/src/bindings/python -B ${PY_BUILD_DIR}
cmake --build ${PY_BUILD_DIR} --parallel $(nproc)
cmake --install ${PY_BUILD_DIR} --config ${{ env.CMAKE_BUILD_TYPE }} --prefix ${INSTALL_DIR} --component pyopenvino_python$py_version
diff --git a/.github/workflows/job_build_windows.yml b/.github/workflows/job_build_windows.yml
index 3f60fedba43..7838ee7db2f 100644
--- a/.github/workflows/job_build_windows.yml
+++ b/.github/workflows/job_build_windows.yml
@@ -216,11 +216,21 @@ jobs:
pip-cache-path: ${{ env.PIP_CACHE_PATH }}
should-setup-pip-paths: 'true'
self-hosted-runner: 'true'
+
+ # Setup additional Python versions for wheels building
+ - name: Setup Python 3.14
+ if: ${{ inputs.build-additional-python-wheels }}
+ uses: ./openvino/.github/actions/setup_python
+ with:
+ version: '3.14'
+ pip-cache-path: ${{ env.PIP_CACHE_PATH }}
+ should-setup-pip-paths: 'true'
+ self-hosted-runner: 'true'
- name: Build additional Python wheels
if: ${{ inputs.build-additional-python-wheels }}
run: |
- $pyVersions = '3.10', '3.11', '3.12', '3.13'
+ $pyVersions = '3.10', '3.11', '3.12', '3.13', '3.14'
foreach ($pyVersion in $pyVersions) {
$pyBuildDir = "${{ github.workspace }}/py$pyVersion"
New-Item -ItemType Directory -Path "$pyBuildDir" -Force
@@ -228,13 +238,20 @@ jobs:
$pythonCommand = "py -$pyVersion -c `"import sys; print(f'{sys.executable}')`""
$pythonExecutablePath = & cmd /c $pythonCommand
+ Write-Host "Building Python wheels for Python $pyVersion located at $pythonExecutablePath"
+
$pipVersion = & $pythonExecutablePath -c "import pip; print(pip.__version__)"
Write-Host "Using pip version: $pipVersion for $pyVersion"
$env:PIP_CACHE_DIR="${{ env.PIP_CACHE_PATH }}/$pipVersion"
& $pythonExecutablePath -m pip install -r ${{ env.OPENVINO_REPO }}/src/bindings/python/wheel/requirements-dev.txt
- cmake -DPython3_EXECUTABLE="$pythonExecutablePath" -DENABLE_PYTHON=ON -DENABLE_WHEEL=ON -DOpenVINODeveloperPackage_DIR=${{ env.BUILD_DIR }} -S ${{ env.OPENVINO_REPO }}/src/bindings/python -B "$pyBuildDir" &&
+ if ($pyVersion -eq '3.14t') {
+ cmake -DPython3_EXECUTABLE="$pythonExecutablePath" -DENABLE_GIL_PYTHON_API=OFF -DENABLE_PYTHON=ON -DENABLE_WHEEL=ON -DOpenVINODeveloperPackage_DIR=${{ env.BUILD_DIR }} -S ${{ env.OPENVINO_REPO }}/src/bindings/python -B "$pyBuildDir"
+ } else {
+ cmake -DPython3_EXECUTABLE="$pythonExecutablePath" -DENABLE_GIL_PYTHON_API=ON -DENABLE_PYTHON=ON -DENABLE_WHEEL=ON -DOpenVINODeveloperPackage_DIR=${{ env.BUILD_DIR }} -S ${{ env.OPENVINO_REPO }}/src/bindings/python -B "$pyBuildDir"
+ }
+
cmake --build "$pyBuildDir" --parallel $ENV:NUMBER_OF_PROCESSORS --target ie_wheel --config ${{ env.CMAKE_BUILD_TYPE }} &&
cmake --install "$pyBuildDir" --config ${{ env.CMAKE_BUILD_TYPE }} --prefix ${{ env.INSTALL_WHEELS_DIR }} --component python_wheels &&
cmake --install "$pyBuildDir" --config ${{ env.CMAKE_BUILD_TYPE }} --prefix ${{ env.INSTALL_DIR }} --component pyopenvino_python$pyVersion
@@ -246,6 +263,47 @@ jobs:
env:
CMAKE_GENERATOR: 'Ninja' # Ninja is the only Windows native generator supported by ccache
+ # Setup additional Python versions for wheels building
+ - name: Setup Python 3.14t
+ if: ${{ inputs.build-additional-python-wheels }}
+ uses: ./openvino/.github/actions/setup_python
+ with:
+ version: '3.14t'
+ pip-cache-path: ${{ env.PIP_CACHE_PATH }}
+ should-setup-pip-paths: 'true'
+ self-hosted-runner: 'true'
+ allow-prereleases: 'true'
+
+ - name: Build additional Python wheels - Python 3.14t
+ if: ${{ inputs.build-additional-python-wheels }}
+ run: |
+ $pyVersion = '3.14t'
+ $pyBuildDir = "${{ github.workspace }}/py$pyVersion"
+ New-Item -ItemType Directory -Path "$pyBuildDir" -Force
+
+ $pythonCommand = "py -$pyVersion -c `"import sys; print(f'{sys.executable}')`""
+ $pythonExecutablePath = & cmd /c $pythonCommand
+
+ Write-Host "Building Python wheels for Python $pyVersion located at $pythonExecutablePath"
+
+ $pipVersion = & $pythonExecutablePath -c "import pip; print(pip.__version__)"
+ Write-Host "Using pip version: $pipVersion for $pyVersion"
+ $env:PIP_CACHE_DIR="${{ env.PIP_CACHE_PATH }}/$pipVersion"
+
+ & $pythonExecutablePath -m pip install -r ${{ env.OPENVINO_REPO }}/src/bindings/python/wheel/requirements-dev.txt
+
+ cmake -DPython3_EXECUTABLE="$pythonExecutablePath" -DENABLE_GIL_PYTHON_API=OFF -DENABLE_PYTHON=ON -DENABLE_WHEEL=ON -DOpenVINODeveloperPackage_DIR=${{ env.BUILD_DIR }} -S ${{ env.OPENVINO_REPO }}/src/bindings/python -B "$pyBuildDir"
+
+ cmake --build "$pyBuildDir" --parallel $ENV:NUMBER_OF_PROCESSORS --target ie_wheel --config ${{ env.CMAKE_BUILD_TYPE }} &&
+ cmake --install "$pyBuildDir" --config ${{ env.CMAKE_BUILD_TYPE }} --prefix ${{ env.INSTALL_WHEELS_DIR }} --component python_wheels &&
+ cmake --install "$pyBuildDir" --config ${{ env.CMAKE_BUILD_TYPE }} --prefix ${{ env.INSTALL_DIR }} --component pyopenvino_python$pyVersion
+ if ($LASTEXITCODE -ne 0) {
+ Write-Host "Failed to build Python wheels for Python $pyVersion"
+ exit 1
+ }
+ env:
+ CMAKE_GENERATOR: 'Ninja' # Ninja is the only Windows native generator supported by ccache
+
- name: Pack Artifacts
run: |
$file = Get-ChildItem -Path "${{ env.INSTALL_DIR }}"
diff --git a/.github/workflows/job_python_api_tests.yml b/.github/workflows/job_python_api_tests.yml
index 92f8d9a3248..f447477027b 100644
--- a/.github/workflows/job_python_api_tests.yml
+++ b/.github/workflows/job_python_api_tests.yml
@@ -95,6 +95,7 @@ jobs:
with:
wheels-dir-path: ${{ env.INSTALL_DIR }}
wheels-to-install: 'openvino'
+ free-threaded-python: ${{ contains(inputs.python-version, 't') }}
- name: Install Python API tests dependencies
run: python3 -m pip install -r ${INSTALL_TEST_DIR}/bindings/python/requirements_test.txt
@@ -113,7 +114,7 @@ jobs:
--ignore=${INSTALL_TEST_DIR}/pyopenvino/tests/test_utils/test_utils.py
- name: Python API Tests -- numpy<2.0.0
- if: fromJSON(inputs.affected-components).Python_API.test
+ if: ${{ fromJSON(inputs.affected-components).Python_API.test && inputs.python-version != '3.14t' }} # Explanation for `3.14t` is in the 178162 ticket
run: |
python3 -m pip uninstall -y numpy
python3 -m pip install "numpy~=1.26.0"
@@ -125,7 +126,7 @@ jobs:
--ignore=${INSTALL_TEST_DIR}/pyopenvino/tests/test_utils/test_utils.py
- name: Docs Python snippets
- if: ${{ runner.os != 'macOS' && fromJSON(inputs.affected-components).docs_snippets.test }}
+ if: ${{ runner.os != 'macOS' && fromJSON(inputs.affected-components).docs_snippets.test && inputs.python-version != '3.14' && inputs.python-version != '3.14t' }} # Ticket: 178163
run: |
# torch, onnx
python3 -m pip install -r ${INSTALL_TEST_DIR}/python/preprocess/torchvision/requirements.txt -r ${INSTALL_TEST_DIR}/requirements_onnx
diff --git a/.github/workflows/mac_arm64.yml b/.github/workflows/mac_arm64.yml
index 43db5321636..df35759571d 100644
--- a/.github/workflows/mac_arm64.yml
+++ b/.github/workflows/mac_arm64.yml
@@ -232,15 +232,42 @@ jobs:
version: "3.12"
should-setup-pip-paths: 'false'
self-hosted-runner: 'false'
+
+ - name: Setup Python 3.13
+ uses: ./openvino/.github/actions/setup_python
+ with:
+ version: "3.13"
+ should-setup-pip-paths: 'false'
+ self-hosted-runner: 'false'
+
+ - name: Setup Python 3.14
+ uses: ./openvino/.github/actions/setup_python
+ with:
+ version: "3.14"
+ should-setup-pip-paths: 'false'
+ self-hosted-runner: 'false'
+
+ - name: Setup Python 3.14t
+ uses: ./openvino/.github/actions/setup_python
+ with:
+ version: "3.14t"
+ should-setup-pip-paths: 'false'
+ self-hosted-runner: 'false'
+ allow-prereleases: 'true'
- name: Build additional Python wheels
run: |
- for py_version in "3.10" "3.11" "3.12"
+ for py_version in "3.10" "3.11" "3.12" "3.13" "3.14" "3.14t"
do
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
- 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
+ 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
+ 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
+ fi
+
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
done
@@ -399,7 +426,7 @@ jobs:
strategy:
fail-fast: false
matrix:
- python-version: [ '3.10', '3.11', '3.12' ]
+ python-version: [ '3.10', '3.11', '3.12', '3.13', '3.14', '3.14t' ]
with:
runner: 'macos-14'
affected-components: ${{ needs.smart_ci.outputs.affected_components }}
diff --git a/.github/workflows/manylinux_2_28.yml b/.github/workflows/manylinux_2_28.yml
index 8cab5ea8480..6506e4f0304 100644
--- a/.github/workflows/manylinux_2_28.yml
+++ b/.github/workflows/manylinux_2_28.yml
@@ -74,7 +74,7 @@ jobs:
- name: Set mock output images if pipeline should be skipped
if: ${{ needs.smart_ci.outputs.skip_workflow == 'True' }}
id: mock_image
- run: echo "images={\"ov_test\":{\"ubuntu_20_04_x64_py313\":\"mock\"},\"ov_test\":{\"ubuntu_22_04_x64\":\"mock\"},\"ov_test\":{\"ubuntu_24_04_x64\":\"mock\"},\"ov_test\":{\"fedora_33\":\"mock\"},\"ov_test\":{\"debian_10_py310\":\"mock\"},\"ov_build\":{\"manylinux_2_28\":\"mock\"}}" >> "$GITHUB_OUTPUT"
+ run: echo "images={\"ov_test\":{\"ubuntu_20_04_x64_py313\":\"mock\"},\"ov_test\":{\"ubuntu_22_04_x64\":\"mock\"},\"ov_test\":{\"ubuntu_22_04_x64_py314\":\"mock\"},\"ov_test\":{\"ubuntu_24_04_x64\":\"mock\"},\"ov_test\":{\"fedora_33\":\"mock\"},\"ov_test\":{\"debian_10_py310\":\"mock\"},\"ov_build\":{\"manylinux_2_28\":\"mock\"}}" >> "$GITHUB_OUTPUT"
- name: Checkout
if: ${{ needs.smart_ci.outputs.skip_workflow != 'True' }}
@@ -89,6 +89,8 @@ jobs:
ov_build/manylinux_2_28
ov_test/ubuntu_20_04_x64_py313
ov_test/ubuntu_22_04_x64
+ ov_test/ubuntu_22_04_x64_py314
+ ov_test/ubuntu_22_04_x64_py314t
ov_test/ubuntu_24_04_x64
ov_test/fedora_33
ov_test/debian_10_py310
@@ -183,18 +185,30 @@ jobs:
env:
CXXFLAGS: "-Wno-dangling-reference" # bug in gcc-14: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107532
- - name: Build Python API (Python 3.10-3.13)
+ - name: Build Python API (Python 3.10-3.14t)
run: |
- SUPPORTED_PYTHON_VERSIONS=("3.10" "3.11" "3.12" "3.13")
+ SUPPORTED_PYTHON_VERSIONS=("3.10" "3.11" "3.12" "3.13" "3.14" "3.14t")
for PY_VER in "${SUPPORTED_PYTHON_VERSIONS[@]}"; do
py_build_dir=${{ github.workspace }}/build_py${PY_VER}
simpler_python_version=$(echo $PY_VER | sed -e 's/\.//g')
- python_path=/opt/python/cp${simpler_python_version}-cp${simpler_python_version}/bin/python3
+
+ if [ "$PY_VER" == "3.14t" ]; then
+ python_path=/opt/python/cp314-cp314t/bin/python3
+ else
+ python_path=/opt/python/cp${simpler_python_version}-cp${simpler_python_version}/bin/python3
+ fi
+
PIP_VER=$(${python_path} -c "import pip; print(pip.__version__)")
export "PIP_CACHE_DIR=${{ env.PIP_CACHE_PATH }}/${PIP_VER}"
${python_path} -m pip install -r ${{ env.OPENVINO_REPO }}/src/bindings/python/wheel/requirements-dev.txt
- /usr/bin/cmake -DPython3_EXECUTABLE=${python_path} -DOpenVINODeveloperPackage_DIR=${{ env.BUILD_DIR }} -DENABLE_PYTHON=ON -DENABLE_WHEEL=ON -S ${{ env.OPENVINO_REPO }}/src/bindings/python -B ${py_build_dir}
+
+ if [[ $PY_VER == "3.14t" ]]; then
+ /usr/bin/cmake -DPython3_EXECUTABLE=${python_path} -DOpenVINODeveloperPackage_DIR=${{ env.BUILD_DIR }} -DENABLE_GIL_PYTHON_API=OFF -DENABLE_PYTHON=ON -DENABLE_WHEEL=ON -S ${{ env.OPENVINO_REPO }}/src/bindings/python -B ${py_build_dir}
+ else
+ /usr/bin/cmake -DPython3_EXECUTABLE=${python_path} -DOpenVINODeveloperPackage_DIR=${{ env.BUILD_DIR }} -DENABLE_PYTHON=ON -DENABLE_WHEEL=ON -S ${{ env.OPENVINO_REPO }}/src/bindings/python -B ${py_build_dir}
+ fi
+
/usr/bin/cmake --build ${py_build_dir} --parallel $(nproc) --config ${{ env.CMAKE_BUILD_TYPE }}
/usr/bin/cmake --install ${py_build_dir} --config ${{ env.CMAKE_BUILD_TYPE }} --prefix ${{ env.INSTALL_WHEELS_DIR }} --component python_wheels
/usr/bin/cmake --install ${py_build_dir} --config ${{ env.CMAKE_BUILD_TYPE }} --prefix ${{ env.INSTALL_DIR }} --component pyopenvino_python${PY_VER}
@@ -291,6 +305,10 @@ jobs:
image: ${{ fromJSON(needs.docker.outputs.images).ov_test.ubuntu_24_04_x64 }}
- python-version: "3.13"
image: ${{ fromJSON(needs.docker.outputs.images).ov_test.ubuntu_20_04_x64_py313 }}
+ - python-version: "3.14"
+ image: ${{ fromJSON(needs.docker.outputs.images).ov_test.ubuntu_22_04_x64_py314 }}
+ - python-version: "3.14t"
+ image: ${{ fromJSON(needs.docker.outputs.images).ov_test.ubuntu_22_04_x64_py314t }}
with:
runner: 'aks-linux-4-cores-16gb'
image: ${{ matrix.image }}
diff --git a/.github/workflows/windows_vs2022_release.yml b/.github/workflows/windows_vs2022_release.yml
index ccc4c1cda02..24f39ff7739 100644
--- a/.github/workflows/windows_vs2022_release.yml
+++ b/.github/workflows/windows_vs2022_release.yml
@@ -416,7 +416,7 @@ jobs:
strategy:
fail-fast: false
matrix:
- python-version: ["3.10", "3.11", "3.12"]
+ python-version: ["3.10", "3.11", "3.12", "3.13", "3.14", "3.14t"]
defaults:
run:
shell: pwsh
@@ -469,6 +469,7 @@ jobs:
with:
wheels-dir-path: ${{ env.INSTALL_WHEELS_DIR }}
wheels-to-install: 'openvino'
+ free-threaded-python: ${{ contains(matrix.python-version, 't') }}
- name: Install Python API tests dependencies
run: python3 -m pip install -r ${{ env.INSTALL_TEST_DIR }}/bindings/python/requirements_test.txt