Skip to content

Commit

Permalink
check for 'bdist_wheel'
Browse files Browse the repository at this point in the history
  • Loading branch information
christianrauch committed Oct 30, 2024
1 parent dd4f0ed commit 0289b0a
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.")

Check failure on line 43 in cmake/MakePythonWheel.cmake

View workflow job for this annotation

GitHub Actions / build (windows-2022, ON)

Python module `wheel.bdist_wheel` required for correct wheel filename

Check failure on line 43 in cmake/MakePythonWheel.cmake

View workflow job for this annotation

GitHub Actions / build (windows-2022, OFF)

Python module `wheel.bdist_wheel` required for correct wheel filename
endif()

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

0 comments on commit 0289b0a

Please sign in to comment.