Skip to content

Commit

Permalink
check for 'bdist_wheel'
Browse files Browse the repository at this point in the history
  • Loading branch information
christianrauch authored and christian-rauch committed Nov 1, 2024
1 parent 057c88d commit b1ed3d2
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions cmake/MakePythonWheel.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,23 @@ except ImportError as e:
message(FATAL_ERROR "Python module `setuptools` required for correct wheel filename generation.")
endif()

execute_process(
COMMAND ${Python3_EXECUTABLE} -c "
import sys
try:
from wheel.bdist_wheel import bdist_wheel
sys.exit(0)
except ImportError as e:
print(f'{e}. Search paths:', file=sys.stderr)
for p in sys.path: print(f' {p}', file=sys.stderr)
sys.exit(1)
"
RESULT_VARIABLE has_bdist_wheel)

if(has_bdist_wheel EQUAL "1")
message(FATAL_ERROR "Python module `wheel.bdist_wheel` required for correct wheel filename generation.")
endif()

execute_process(
COMMAND ${Python3_EXECUTABLE} -c "
from setuptools.dist import Distribution
Expand Down

0 comments on commit b1ed3d2

Please sign in to comment.