OpenVINO™ is an open source toolkit for optimizing and deploying AI inference
C++ aicomputer-visiondeep-learningdeploy-aidiffusion-modelsgenerative-aigood-first-issueinferencellm-inferencenatural-language-processingnlpopenvinooptimize-aiperformance-boostrecommendation-systemspeech-recognitionstable-diffusiontransformersyolo
[PyOV] Use `packaging` instead of `wheel.vendored` in CMake checks (#33763)
Przemyslaw Wysocki6bf892155e3f
diff --git a/src/bindings/python/constraints.txt b/src/bindings/python/constraints.txtindex 122a322ebb9..56deb0318c3 100644--- a/src/bindings/python/constraints.txt+++ b/src/bindings/python/constraints.txt@@ -12,7 +12,7 @@ build<1.5pygments>=2.8.1setuptools>=77,<80.10sympy>=1.10-wheel>=0.38.1,<0.46.2+wheel>=0.38.1patchelf<=0.17.2.4packaging>=22.0diff --git a/src/bindings/python/wheel/CMakeLists.txt b/src/bindings/python/wheel/CMakeLists.txtindex 8f654351ed8..733f9e480e4 100644--- a/src/bindings/python/wheel/CMakeLists.txt+++ b/src/bindings/python/wheel/CMakeLists.txt@@ -6,10 +6,10 @@# Define proper package name#-execute_process(COMMAND ${Python3_EXECUTABLE} -c "import wheel.vendored.packaging.tags as tags ; print(f'{tags.interpreter_name()}{tags.interpreter_version()}')"+execute_process(COMMAND ${Python3_EXECUTABLE} -c "from packaging import tags; print(f'{tags.interpreter_name()}{tags.interpreter_version()}')"OUTPUT_VARIABLE PYTHON_TAG OUTPUT_STRIP_TRAILING_WHITESPACE)if(NOT PYTHON_TAG)- message(FATAL_ERROR "Failed to detect Python Tag via wheel.vendored.packaging.tags. Please, check 'wheel' dependency version update")+ message(FATAL_ERROR "Failed to detect Python Tag via packaging.tags. Please, check 'packaging' dependency version update")endif()execute_process(COMMAND ${Python3_EXECUTABLE} -c "from setuptools.command.bdist_wheel import get_abi_tag; print(f'{get_abi_tag()}')"@@ -18,10 +18,10 @@ if(NOT ABI_TAG)message(FATAL_ERROR "Failed to detect ABI Tag via setuptools.command.bdist_wheel. Please, check 'setuptools' dependency version update")endif()-execute_process(COMMAND ${Python3_EXECUTABLE} -c "import wheel.vendored.packaging.tags as tags ; print(f'{next(tags.platform_tags())}')"+execute_process(COMMAND ${Python3_EXECUTABLE} -c "from packaging import tags; print(f'{next(tags.platform_tags())}')"OUTPUT_VARIABLE PLATFORM_TAG OUTPUT_STRIP_TRAILING_WHITESPACE)if(NOT PLATFORM_TAG)- message(FATAL_ERROR "Failed to detect Platform Tag via wheel.vendored.packaging.tags. Please, check 'wheel' dependency version update")+ message(FATAL_ERROR "Failed to detect Platform Tag via packaging.tags. Please, check 'packaging' dependency version update")endif()# defines wheel architecture part of `PLATFORM_TAG`diff --git a/src/bindings/python/wheel/requirements-dev.txt b/src/bindings/python/wheel/requirements-dev.txtindex a6c2dcbdf8f..f40b57ac55e 100644--- a/src/bindings/python/wheel/requirements-dev.txt+++ b/src/bindings/python/wheel/requirements-dev.txt@@ -2,4 +2,5 @@setuptoolswheelbuild+packagingpatchelf; sys_platform == 'linux' and platform_machine == 'x86_64'