We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 87456e4 commit b36a9c7Copy full SHA for b36a9c7
1 file changed
test/addon/CMakeLists.txt
@@ -3,6 +3,18 @@ if (NOT Python_Interpreter_FOUND)
3
return()
4
endif()
5
6
+# creating a virtual environment needs the venv and ensurepip modules - some
7
+# distributions ship them separately from the interpreter (e.g. the Debian/Ubuntu
8
+# python3-venv package)
9
+execute_process(COMMAND ${Python_EXECUTABLE} -c "import venv, ensurepip"
10
+ RESULT_VARIABLE PYTHON_VENV_RESULT
11
+ OUTPUT_QUIET
12
+ ERROR_QUIET)
13
+if (NOT PYTHON_VENV_RESULT EQUAL 0)
14
+ message(WARNING "Python venv module not available (e.g. install the python3-venv package) - skipping addon tests.")
15
+ return()
16
+endif()
17
+
18
set(VENV_DIR ${CMAKE_CURRENT_BINARY_DIR}/venv)
19
if (WIN32)
20
set(VENV_PYTHON ${VENV_DIR}/Scripts/python.exe)
0 commit comments