|
| 1 | +From 6bf892155e3f11dde49478c94dae9b6b3618b93a Mon Sep 17 00:00:00 2001 |
| 2 | +From: Przemyslaw Wysocki <przemyslaw.wysocki@intel.com> |
| 3 | +Date: Fri, 23 Jan 2026 09:41:33 +0100 |
| 4 | +Subject: [PATCH] [PyOV] Use `packaging` instead of `wheel.vendored` in CMake |
| 5 | + checks (#33763) |
| 6 | + |
| 7 | +### Details: |
| 8 | +- `wheel==0.46` release at |
| 9 | +https://github.com/pypa/wheel/releases/tag/0.46.0: |
| 10 | + `Removed vendored packaging in favor of a run-time dependency on it` |
| 11 | +- This caused an error in our pipelines, `wheel` no longer supplies |
| 12 | +`packaging` dependency, so we have to install and use it independently |
| 13 | +- This is being fixed with a WA: |
| 14 | +https://github.com/openvinotoolkit/openvino/pull/33755 |
| 15 | + - This PR is a proper fix for the issue |
| 16 | + - Let's allow the WA to get merged first to unblock precommit |
| 17 | + |
| 18 | +### Tickets: |
| 19 | + - 179738 |
| 20 | + |
| 21 | +--------- |
| 22 | + |
| 23 | +Signed-off-by: p-wysocki <przemyslaw.wysocki@intel.com> |
| 24 | +--- |
| 25 | + src/bindings/python/constraints.txt | 2 +- |
| 26 | + src/bindings/python/wheel/CMakeLists.txt | 8 ++++---- |
| 27 | + src/bindings/python/wheel/requirements-dev.txt | 1 + |
| 28 | + 3 files changed, 6 insertions(+), 5 deletions(-) |
| 29 | + |
| 30 | +diff --git a/src/bindings/python/wheel/CMakeLists.txt b/src/bindings/python/wheel/CMakeLists.txt |
| 31 | +index 8f654351ed8dce..733f9e480e4a68 100644 |
| 32 | +--- a/src/bindings/python/wheel/CMakeLists.txt |
| 33 | ++++ b/src/bindings/python/wheel/CMakeLists.txt |
| 34 | +@@ -6,10 +6,10 @@ |
| 35 | + # Define proper package name |
| 36 | + # |
| 37 | + |
| 38 | +-execute_process(COMMAND ${Python3_EXECUTABLE} -c "import wheel.vendored.packaging.tags as tags ; print(f'{tags.interpreter_name()}{tags.interpreter_version()}')" |
| 39 | ++execute_process(COMMAND ${Python3_EXECUTABLE} -c "from packaging import tags; print(f'{tags.interpreter_name()}{tags.interpreter_version()}')" |
| 40 | + OUTPUT_VARIABLE PYTHON_TAG OUTPUT_STRIP_TRAILING_WHITESPACE) |
| 41 | + if(NOT PYTHON_TAG) |
| 42 | +- message(FATAL_ERROR "Failed to detect Python Tag via wheel.vendored.packaging.tags. Please, check 'wheel' dependency version update") |
| 43 | ++ message(FATAL_ERROR "Failed to detect Python Tag via packaging.tags. Please, check 'packaging' dependency version update") |
| 44 | + endif() |
| 45 | + |
| 46 | + execute_process(COMMAND ${Python3_EXECUTABLE} -c "from setuptools.command.bdist_wheel import get_abi_tag; print(f'{get_abi_tag()}')" |
| 47 | +@@ -18,10 +18,10 @@ if(NOT ABI_TAG) |
| 48 | + message(FATAL_ERROR "Failed to detect ABI Tag via setuptools.command.bdist_wheel. Please, check 'setuptools' dependency version update") |
| 49 | + endif() |
| 50 | + |
| 51 | +-execute_process(COMMAND ${Python3_EXECUTABLE} -c "import wheel.vendored.packaging.tags as tags ; print(f'{next(tags.platform_tags())}')" |
| 52 | ++execute_process(COMMAND ${Python3_EXECUTABLE} -c "from packaging import tags; print(f'{next(tags.platform_tags())}')" |
| 53 | + OUTPUT_VARIABLE PLATFORM_TAG OUTPUT_STRIP_TRAILING_WHITESPACE) |
| 54 | + if(NOT PLATFORM_TAG) |
| 55 | +- message(FATAL_ERROR "Failed to detect Platform Tag via wheel.vendored.packaging.tags. Please, check 'wheel' dependency version update") |
| 56 | ++ message(FATAL_ERROR "Failed to detect Platform Tag via packaging.tags. Please, check 'packaging' dependency version update") |
| 57 | + endif() |
| 58 | + |
| 59 | + # defines wheel architecture part of `PLATFORM_TAG` |
| 60 | +diff --git a/src/bindings/python/wheel/requirements-dev.txt b/src/bindings/python/wheel/requirements-dev.txt |
| 61 | +index a6c2dcbdf8fee1..f40b57ac55ef4f 100644 |
| 62 | +--- a/src/bindings/python/wheel/requirements-dev.txt |
| 63 | ++++ b/src/bindings/python/wheel/requirements-dev.txt |
| 64 | +@@ -2,4 +2,5 @@ |
| 65 | + setuptools |
| 66 | + wheel |
| 67 | + build |
| 68 | ++packaging |
| 69 | + patchelf; sys_platform == 'linux' and platform_machine == 'x86_64' |
0 commit comments