Skip to content
Snippets Groups Projects
Commit bf2df88b authored by AlQuemist's avatar AlQuemist Committed by Ammar Nejati
Browse files

PyDependences: simplify the check for Python packages

parent 6f48d9b5
No related branches found
No related tags found
1 merge request!1698Python script to build installers and wheels for all platforms and Python versions
......@@ -24,8 +24,7 @@ message(STATUS "Searching required Python packages...")
foreach(pkg pip numpy matplotlib)
message(STATUS "Python package ${pkg}")
execute_process(
COMMAND ${Python3_EXECUTABLE}
${CMAKE_SOURCE_DIR}/cmake/tests/find_pkg.py ${pkg}
COMMAND ${Python3_EXECUTABLE} -c "import ${pkg}"
RESULT_VARIABLE PKG_FOUND)
if(NOT PKG_FOUND EQUAL 0)
message(FATAL_ERROR "Python package '${pkg}' not found")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment