Skip to content

Conversation

p-wysocki
Copy link
Contributor

@p-wysocki p-wysocki commented Oct 15, 2025

Details:

  • Current build system doesn't take ABI flags into account, which causes misusage of cache/build directories. Python 3.14 and 3.14t are treated as the same thing, since t is ignored. This PR fixes that.
  • ABI flags are retrieved using execute_process, but the alternative is using pybind's Python3_SOABI, which holds a string like cpython-314t-x86_64-linux-gnu, which forces usage of regex and string manipulations.
  • I think what's currently applied is preferable due to significantly better readability at the cost of performance when running cmake, but I'm open to discussion and change.

Tickets:

  • N/A

Signed-off-by: p-wysocki <przemyslaw.wysocki@intel.com>
Signed-off-by: p-wysocki <przemyslaw.wysocki@intel.com>
Signed-off-by: p-wysocki <przemyslaw.wysocki@intel.com>
Signed-off-by: p-wysocki <przemyslaw.wysocki@intel.com>
@p-wysocki p-wysocki added this to the 2025.4 milestone Oct 15, 2025
@p-wysocki p-wysocki requested a review from almilosz October 15, 2025 15:19
@p-wysocki p-wysocki requested review from a team as code owners October 15, 2025 15:19
@p-wysocki p-wysocki requested review from rkazants and removed request for a team October 15, 2025 15:19
@github-actions github-actions bot added category: build OpenVINO cmake script / infra category: Python API OpenVINO Python bindings category: dependency_changes Pull requests that update a dependency file labels Oct 15, 2025
Signed-off-by: p-wysocki <przemyslaw.wysocki@intel.com>
…cki/openvino into free_threaded_adjustments

Signed-off-by: p-wysocki <przemyslaw.wysocki@intel.com>
Signed-off-by: p-wysocki <przemyslaw.wysocki@intel.com>
Signed-off-by: p-wysocki <przemyslaw.wysocki@intel.com>
@almilosz
Copy link
Contributor

We also set python version in this function

if(Python3_Interpreter_FOUND)
set(${pyversion} "python${Python3_VERSION_MAJOR}.${Python3_VERSION_MINOR}" PARENT_SCOPE)

RESULT_VARIABLE pyversion_result
)
if(NOT pyversion OR pyversion_result)
# Python3_VERSION_MAJOR and Python3_VERSION_MINOR are defined inside pybind11
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CMake’s built-in FindPython3 module sets Python3_VERSION_MAJOR
"defined by CMake's FindPython3" is better

macro(ov_define_setup_py_packaging_vars)
# Python3_VERSION_MAJOR and Python3_VERSION_MINOR are defined inside pybind11
set(pyversion python${Python3_VERSION_MAJOR}.${Python3_VERSION_MINOR})
set(pyversion_script "
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To consider extracting this piece of code like in ov_get_pyversion

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

category: build OpenVINO cmake script / infra category: dependency_changes Pull requests that update a dependency file category: Python API OpenVINO Python bindings

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants