diff options
author | V3n3RiX <venerix@koprulu.sector> | 2022-12-06 03:08:16 +0000 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2022-12-06 03:08:16 +0000 |
commit | 7bf9e3db263e64d6cbc306440a7f3c44e551bb13 (patch) | |
tree | 69c4367f0e4c2350bfb04e76bb55bfc2e353b052 /app-antivirus/clamav/files | |
parent | 7ac0e89e1c8027ed5be76f6005e8cb52b1e5d484 (diff) |
gentoo auto-resync : 06:12:2022 - 03:08:16
Diffstat (limited to 'app-antivirus/clamav/files')
-rw-r--r-- | app-antivirus/clamav/files/clamav-1.0.0-select-python.patch | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/app-antivirus/clamav/files/clamav-1.0.0-select-python.patch b/app-antivirus/clamav/files/clamav-1.0.0-select-python.patch new file mode 100644 index 000000000000..70bedc029399 --- /dev/null +++ b/app-antivirus/clamav/files/clamav-1.0.0-select-python.patch @@ -0,0 +1,44 @@ +This patch enables us to tell CMake to find a particular python +impl on a multi-impl system. + +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -223,20 +223,26 @@ if(ENABLE_TESTS) + find_package(Libcheck REQUIRED) + + # Used to generate the test files and for the application feature test framework +- find_package(Python3 REQUIRED) ++ # In distros that support multiple implementations of python it is helpful to specify the impl to use ++ if(DEFINED PYTHON_FIND_VERSION) ++ find_package(Python3 EXACT ${PYTHON_FIND_VERSION} REQUIRED) ++ else() ++ find_package(Python3 REQUIRED) ++ # Not requesting a specific python impl; try using pytest from the PATH ++ execute_process( ++ COMMAND pytest --version ++ RESULT_VARIABLE PYTEST_EXIT_CODE ++ ERROR_QUIET OUTPUT_QUIET ++ ) + +- # First try using pytest from the PATH +- execute_process( +- COMMAND pytest --version +- RESULT_VARIABLE PYTEST_EXIT_CODE +- ERROR_QUIET OUTPUT_QUIET +- ) ++ if(${PYTEST_EXIT_CODE} EQUAL 0) ++ # pytest found in the path. ++ set(PythonTest_COMMAND "pytest;-v") ++ endif() ++ endif() + +- if(${PYTEST_EXIT_CODE} EQUAL 0) +- # pytest found in the path. +- set(PythonTest_COMMAND "pytest;-v") +- else() +- # Not in the path, try using: python3 -m pytest ++ if("${PythonTest_COMMAND}" STREQUAL "") ++ # Not in the path or specified a python impl; try using: python3 -m pytest + execute_process( + COMMAND ${Python3_EXECUTABLE} -m pytest --version + RESULT_VARIABLE PYTEST_MODULE_EXIT_CODE |