Skip to content

Commit

Permalink
Fixed compatibility with new version of 'wheel' (openvinotoolkit#25899)
Browse files Browse the repository at this point in the history
### Details:
 - *item1*
 - *...*

### Tickets:
 - *ticket-id*
  • Loading branch information
ilya-lavrenov authored Aug 5, 2024
1 parent c664ca7 commit 64c5f67
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion src/bindings/python/wheel/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,21 @@

execute_process(COMMAND ${Python3_EXECUTABLE} -c "import wheel.vendored.packaging.tags as tags ; print(f'{tags.interpreter_name()}{tags.interpreter_version()}')"
OUTPUT_VARIABLE PYTHON_TAG OUTPUT_STRIP_TRAILING_WHITESPACE)
execute_process(COMMAND ${Python3_EXECUTABLE} -c "import wheel.bdist_wheel ; print(f'{wheel.bdist_wheel.get_abi_tag()}')"
if(NOT PYTHON_TAG)
message(FATAL_ERROR "Failed to detect Python Tag via wheel.vendored.packaging.tags. Please, check 'wheel' dependency version update")
endif()

execute_process(COMMAND ${Python3_EXECUTABLE} -c "from setuptools.command.bdist_wheel import get_abi_tag; print(f'{get_abi_tag()}')"
OUTPUT_VARIABLE ABI_TAG OUTPUT_STRIP_TRAILING_WHITESPACE)
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())}')"
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")
endif()

# defines wheel architecture part of `PLATFORM_TAG`
macro(_ov_platform_arch)
Expand Down

0 comments on commit 64c5f67

Please sign in to comment.