Skip to content

Commit

Permalink
Merge pull request #616 from bartlettroscoe/610-python3
Browse files Browse the repository at this point in the history
Transition to find_package(Python3) (#610)
  • Loading branch information
bartlettroscoe authored Oct 9, 2024
2 parents b17ed5b + 701bb48 commit bd5ce80
Show file tree
Hide file tree
Showing 32 changed files with 270 additions and 138 deletions.
2 changes: 1 addition & 1 deletion dev_testing/cee-rhel8/do-configure.mpi-debug
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ if [ -d "${tribits_install_test_dir}" ] ; then
fi

${TRIBITS_BASE_DIR}/dev_testing/generic/do-configure-mpi-debug \
-DDART_TESTING_TIMEOUT=100 \
-DDART_TESTING_TIMEOUT=200 \
-DCTEST_PARALLEL_LEVEL=16 \
-DTriBITS_CTEST_DRIVER_COVERAGE_TESTS=TRUE \
-DTriBITS_CTEST_DRIVER_MEMORY_TESTS=TRUE \
Expand Down
1 change: 0 additions & 1 deletion dev_testing/generic/do-configure-mpi-debug
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ fi

cmake \
-D CMAKE_BUILD_TYPE:STRING="DEBUG" \
-D PYTHON_EXECUTABLE=$(which python3) \
-D TPL_ENABLE_MPI:BOOL=ON \
-D TriBITS_ENABLE_Fortran:BOOL=ON \
-D TriBITS_ENABLE_TESTS:BOOL=ON \
Expand Down
4 changes: 2 additions & 2 deletions refactoring/replace_include_directories_r.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ echo
echo "Replacing INCLUDE_DIRECTORIES with TRIBITS_INCLUDE_DIRECTORIES in all CMakeList.txt and *.cmake files ..."
echo

find . \( -name CMakeLists.txt -or -name "*.cmake" \) -exec ${_SCRIPT_DIR}/token-replace.py -t INCLUDE_DIRECTORIES -r TRIBITS_INCLUDE_DIRECTORIES -f {} \;
find . \( -name CMakeLists.txt -or -name "*.cmake" \) -exec ${_SCRIPT_DIR}/../tribits/refactoring/token-replace.py -t INCLUDE_DIRECTORIES -r TRIBITS_INCLUDE_DIRECTORIES -f {} \;

echo
echo "Replacing include_directories with tribits_include_directories in all CMakeList.txt and *.cmake files ..."
echo

find . \( -name CMakeLists.txt -or -name "*.cmake" \) -exec ${_SCRIPT_DIR}/token-replace.py -t include_directories -r tribits_include_directories -f {} \;
find . \( -name CMakeLists.txt -or -name "*.cmake" \) -exec ${_SCRIPT_DIR}/../tribits/refactoring/token-replace.py -t include_directories -r tribits_include_directories -f {} \;
4 changes: 2 additions & 2 deletions refactoring/replace_set_and_inc_dirs_r.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ echo
echo "Replacing SET_AND_INC_DIRS with TRIBITS_SET_AND_INC_DIRS in all CMakeList.txt and *.cmake files ..."
echo

find . \( -name CMakeLists.txt -or -name "*.cmake" \) -exec ${_SCRIPT_DIR}/token-replace.py -t SET_AND_INC_DIRS -r TRIBITS_SET_AND_INC_DIRS -f {} \;
find . \( -name CMakeLists.txt -or -name "*.cmake" \) -exec ${_SCRIPT_DIR}/../tribits/refactoring/token-replace.py -t SET_AND_INC_DIRS -r TRIBITS_SET_AND_INC_DIRS -f {} \;

echo
echo "Replacing set_and_inc_dirs with tribits_set_and_inc_dirs in all CMakeList.txt and *.cmake files ..."
echo

find . \( -name CMakeLists.txt -or -name "*.cmake" \) -exec ${_SCRIPT_DIR}/token-replace.py -t set_and_inc_dirs -r tribits_set_and_inc_dirs -f {} \;
find . \( -name CMakeLists.txt -or -name "*.cmake" \) -exec ${_SCRIPT_DIR}/../tribits/refactoring/token-replace.py -t set_and_inc_dirs -r tribits_set_and_inc_dirs -f {} \;
2 changes: 1 addition & 1 deletion test/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
add_subdirectory(core)

if (PYTHON_EXECUTABLE)
if (Python3_EXECUTABLE)
add_subdirectories(
python_utils
ci_support
Expand Down
38 changes: 19 additions & 19 deletions test/ci_support/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ tribits_add_advanced_test( XmlHtmlCDashOutputTest
tribits_add_advanced_test( TribitsDependencies_UnitTests
OVERALL_WORKING_DIRECTORY TEST_NAME
OVERALL_NUM_MPI_PROCS 1
TEST_0 CMND ${PYTHON_EXECUTABLE}
TEST_0 CMND ${Python3_EXECUTABLE}
ARGS ${CMAKE_CURRENT_SOURCE_DIR}/TribitsDependencies_UnitTests.py -v
PASS_REGULAR_EXPRESSION "OK"
)
Expand All @@ -102,7 +102,7 @@ tribits_add_advanced_test( TribitsDependencies_UnitTests
tribits_add_advanced_test( TribitsPackageFilePathUtils_UnitTests
OVERALL_WORKING_DIRECTORY TEST_NAME
OVERALL_NUM_MPI_PROCS 1
TEST_0 CMND ${PYTHON_EXECUTABLE}
TEST_0 CMND ${Python3_EXECUTABLE}
ARGS ${CMAKE_CURRENT_SOURCE_DIR}/TribitsPackageFilePathUtils_UnitTests.py -v
PASS_REGULAR_EXPRESSION "OK"
)
Expand All @@ -111,7 +111,7 @@ tribits_add_advanced_test( TribitsPackageFilePathUtils_UnitTests
tribits_add_advanced_test( TribitsPackageTestNameUtils_UnitTests
OVERALL_WORKING_DIRECTORY TEST_NAME
OVERALL_NUM_MPI_PROCS 1
TEST_0 CMND ${PYTHON_EXECUTABLE}
TEST_0 CMND ${Python3_EXECUTABLE}
ARGS ${CMAKE_CURRENT_SOURCE_DIR}/TribitsPackageTestNameUtils_UnitTests.py -v
PASS_REGULAR_EXPRESSION "OK"
)
Expand All @@ -124,7 +124,7 @@ tribits_add_advanced_test( get_tribits_packages_default
OVERALL_WORKING_DIRECTORY TEST_NAME
OVERALL_NUM_MPI_PROCS 1
TEST_0
CMND ${PYTHON_EXECUTABLE}
CMND ${Python3_EXECUTABLE}
ARGS
"${${PROJECT_NAME}_TRIBITS_DIR}/ci_support/get-tribits-packages.py"
--deps-xml-file="${CMAKE_CURRENT_SOURCE_DIR}/TrilinosPackageDependencies.gold.xml"
Expand All @@ -136,7 +136,7 @@ tribits_add_advanced_test( get_tribits_packages_only_toplevel_packages
OVERALL_WORKING_DIRECTORY TEST_NAME
OVERALL_NUM_MPI_PROCS 1
TEST_0
CMND ${PYTHON_EXECUTABLE}
CMND ${Python3_EXECUTABLE}
ARGS
"${${PROJECT_NAME}_TRIBITS_DIR}/ci_support/get-tribits-packages.py"
--deps-xml-file="${CMAKE_CURRENT_SOURCE_DIR}/TrilinosPackageDependencies.gold.xml"
Expand All @@ -149,7 +149,7 @@ tribits_add_advanced_test( get_tribits_packages_all_packages
OVERALL_WORKING_DIRECTORY TEST_NAME
OVERALL_NUM_MPI_PROCS 1
TEST_0
CMND ${PYTHON_EXECUTABLE}
CMND ${Python3_EXECUTABLE}
ARGS
"${${PROJECT_NAME}_TRIBITS_DIR}/ci_support/get-tribits-packages.py"
--deps-xml-file="${CMAKE_CURRENT_SOURCE_DIR}/TrilinosPackageDependencies.gold.xml"
Expand All @@ -166,7 +166,7 @@ tribits_add_advanced_test( get_tribits_packages_from_last_tests_failed_1
OVERALL_WORKING_DIRECTORY TEST_NAME
OVERALL_NUM_MPI_PROCS 1
TEST_0
CMND ${PYTHON_EXECUTABLE}
CMND ${Python3_EXECUTABLE}
ARGS
"${${PROJECT_NAME}_TRIBITS_DIR}/ci_support/get-tribits-packages-from-last-tests-failed.py"
--deps-xml-file="${CMAKE_CURRENT_SOURCE_DIR}/TrilinosPackageDependencies.gold.xml"
Expand All @@ -182,7 +182,7 @@ tribits_add_advanced_test( get_tribits_packages_from_last_tests_failed_1
tribits_add_advanced_test( TribitsExampleProject_ProjectCiFileChangeLogic_UnitTests
OVERALL_WORKING_DIRECTORY TEST_NAME
OVERALL_NUM_MPI_PROCS 1
TEST_0 CMND ${PYTHON_EXECUTABLE}
TEST_0 CMND ${Python3_EXECUTABLE}
ARGS ${CMAKE_CURRENT_SOURCE_DIR}/TribitsExampleProject_ProjectCiFileChangeLogic_UnitTests.py -v
PASS_REGULAR_EXPRESSION "OK"
)
Expand Down Expand Up @@ -216,7 +216,7 @@ function(test_tribitsexampleproject_get_tribits_packages_from_files_list
-P "${${PROJECT_NAME}_TRIBITS_DIR}/ci_support/TribitsDumpDepsXmlScript.cmake"

TEST_2
CMND ${PYTHON_EXECUTABLE}
CMND ${Python3_EXECUTABLE}
ARGS
"${${PROJECT_NAME}_TRIBITS_DIR}/ci_support/get-tribits-packages-from-files-list.py"
--deps-xml-file=TribitsExProjPackageDependencies.cmake
Expand Down Expand Up @@ -281,7 +281,7 @@ function(test_tribitsexampleproject_w_tribits_get_tribits_packages_from_files_li
-P "TribitsExampleProject/cmake/tribits/ci_support/TribitsDumpDepsXmlScript.cmake"

TEST_4
CMND ${PYTHON_EXECUTABLE}
CMND ${Python3_EXECUTABLE}
ARGS
"TribitsExampleProject/cmake/tribits/ci_support/get-tribits-packages-from-files-list.py"
--deps-xml-file=TribitsExProjPackageDependencies.cmake
Expand Down Expand Up @@ -313,7 +313,7 @@ test_tribitsexampleproject_w_tribits_get_tribits_packages_from_files_list(
tribits_add_advanced_test( clone_extra_repos_UnitTests
OVERALL_WORKING_DIRECTORY TEST_NAME
OVERALL_NUM_MPI_PROCS 1
TEST_0 CMND ${PYTHON_EXECUTABLE}
TEST_0 CMND ${Python3_EXECUTABLE}
ARGS ${CMAKE_CURRENT_SOURCE_DIR}/clone_extra_repos_UnitTests.py
--with-cmake="${CMAKE_COMMAND}"
-v
Expand All @@ -323,7 +323,7 @@ tribits_add_advanced_test( clone_extra_repos_UnitTests
tribits_add_advanced_test( CheckinTest_UnitTests
OVERALL_WORKING_DIRECTORY TEST_NAME
OVERALL_NUM_MPI_PROCS 1
TEST_0 CMND ${PYTHON_EXECUTABLE}
TEST_0 CMND ${Python3_EXECUTABLE}
ARGS ${CMAKE_CURRENT_SOURCE_DIR}/CheckinTest_UnitTests.py
--with-cmake="${CMAKE_COMMAND}"
-v
Expand All @@ -339,7 +339,7 @@ tribits_add_advanced_test( CheckinTest_UnitTests
tribits_add_advanced_test( cdash_build_testing_date_UnitTests
OVERALL_WORKING_DIRECTORY TEST_NAME
OVERALL_NUM_MPI_PROCS 1
TEST_0 CMND ${PYTHON_EXECUTABLE}
TEST_0 CMND ${Python3_EXECUTABLE}
ARGS ${CMAKE_CURRENT_SOURCE_DIR}/cdash_build_testing_date_UnitTests.py
-v
PASS_REGULAR_EXPRESSION "OK"
Expand Down Expand Up @@ -383,7 +383,7 @@ tribits_add_advanced_test( TribitsStripCommentsFromCMakeCacheFile_large
tribits_add_advanced_test( CDashQueryAnalyzeReport_UnitTests
OVERALL_WORKING_DIRECTORY TEST_NAME
OVERALL_NUM_MPI_PROCS 1
TEST_0 CMND ${PYTHON_EXECUTABLE}
TEST_0 CMND ${Python3_EXECUTABLE}
ARGS ${CMAKE_CURRENT_SOURCE_DIR}/CDashQueryAnalyzeReport_UnitTests.py -v
PASS_REGULAR_EXPRESSION "OK"
ALWAYS_FAIL_ON_NONZERO_RETURN
Expand All @@ -392,7 +392,7 @@ tribits_add_advanced_test( CDashQueryAnalyzeReport_UnitTests
tribits_add_advanced_test( cdash_analyze_and_report_UnitTests
OVERALL_WORKING_DIRECTORY TEST_NAME
OVERALL_NUM_MPI_PROCS 1
TEST_0 CMND ${PYTHON_EXECUTABLE}
TEST_0 CMND ${Python3_EXECUTABLE}
ARGS ${CMAKE_CURRENT_SOURCE_DIR}/cdash_analyze_and_report_UnitTests.py -v
PASS_REGULAR_EXPRESSION "OK"
ALWAYS_FAIL_ON_NONZERO_RETURN
Expand All @@ -401,7 +401,7 @@ tribits_add_advanced_test( cdash_analyze_and_report_UnitTests
tribits_add_advanced_test( CDashAnalyzeReportRandomFailures_UnitTests
OVERALL_WORKING_DIRECTORY TEST_NAME
OVERALL_NUM_MPI_PROCS 1
TEST_0 CMND ${PYTHON_EXECUTABLE}
TEST_0 CMND ${Python3_EXECUTABLE}
ARGS ${CMAKE_CURRENT_SOURCE_DIR}/CDashAnalyzeReportRandomFailures_UnitTests.py -v
PASS_REGULAR_EXPRESSION "OK"
ALWAYS_FAIL_ON_NONZERO_RETURN
Expand All @@ -410,7 +410,7 @@ tribits_add_advanced_test( CDashAnalyzeReportRandomFailures_UnitTests
tribits_add_advanced_test( cdash_analyze_and_report_random_failures_UnitTests
OVERALL_WORKING_DIRECTORY TEST_NAME
OVERALL_NUM_MPI_PROCS 1
TEST_0 CMND ${PYTHON_EXECUTABLE}
TEST_0 CMND ${Python3_EXECUTABLE}
ARGS ${CMAKE_CURRENT_SOURCE_DIR}/cdash_analyze_and_report_random_failures_UnitTests.py -v
PASS_REGULAR_EXPRESSION "OK"
ALWAYS_FAIL_ON_NONZERO_RETURN
Expand All @@ -419,7 +419,7 @@ tribits_add_advanced_test( cdash_analyze_and_report_random_failures_UnitTests
tribits_add_advanced_test( CreateIssueTrackerFromCDashQuery_UnitTests
OVERALL_WORKING_DIRECTORY TEST_NAME
OVERALL_NUM_MPI_PROCS 1
TEST_0 CMND ${PYTHON_EXECUTABLE}
TEST_0 CMND ${Python3_EXECUTABLE}
ARGS ${CMAKE_CURRENT_SOURCE_DIR}/CreateIssueTrackerFromCDashQuery_UnitTests.py -v
PASS_REGULAR_EXPRESSION "OK"
ALWAYS_FAIL_ON_NONZERO_RETURN
Expand Down Expand Up @@ -452,7 +452,7 @@ tribits_add_advanced_test( TribitsExampleProject_checkin_test

TEST_2
MESSAGE "Run checkin-test.py script to make sure it finds base dir"
CMND ${PYTHON_EXECUTABLE}
CMND ${Python3_EXECUTABLE}
ARGS -E TribitsExampleProject/cmake/tribits/ci_support/checkin-test.py
--enable-all-packages=on --send-email-to= --send-email-to-on-push= --allow-no-pull
PASS_REGULAR_EXPRESSION_ALL
Expand Down
2 changes: 1 addition & 1 deletion test/core/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ tribits_add_advanced_test( TestingFunctionMacro_UnitTests
-D${PROJECT_NAME}_TRIBITS_DIR=${${PROJECT_NAME}_TRIBITS_DIR}
-P "${CMAKE_CURRENT_SOURCE_DIR}/TestingFunctionMacro_UnitTests.cmake"
PASS_REGULAR_EXPRESSION_ALL
"Final UnitTests Result: num_run = 720"
"Final UnitTests Result: num_run = 724"
"Final UnitTests Result: PASSED"
)

Expand Down
4 changes: 2 additions & 2 deletions test/core/ExamplesUnitTests/TribitsExampleProject_Tests.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -1688,14 +1688,14 @@ tribits_add_advanced_test( TribitsExampleProject_ALL_ST_LibUsage
${TribitsExampleProject_COMMON_CONFIG_ARGS}
-DTribitsExProj_TRIBITS_DIR=${${PROJECT_NAME}_TRIBITS_DIR}
-DTribitsExProj_ENABLE_Fortran=ON
-DPYTHON_EXECUTABLE=
-DPython3_EXECUTABLE=
-DTribitsExProj_ENABLE_ALL_PACKAGES=ON
-DTribitsExProj_ENABLE_TESTS=ON
-DTribitsExProj_ENABLE_SECONDARY_TESTED_CODE=ON
-DTribitsExProj_ENABLE_INSTALL_CMAKE_CONFIG_FILES=OFF
${${PROJECT_NAME}_TRIBITS_DIR}/examples/TribitsExampleProject
PASS_REGULAR_EXPRESSION_ALL
"NOTE: Setting TribitsExProj_ENABLE_WrapExternal=OFF because PYTHON_EXECUTABLE=''"
"NOTE: Setting TribitsExProj_ENABLE_WrapExternal=OFF because Python3_EXECUTABLE=''"
"Final set of enabled top-level packages: SimpleCxx MixedLang WithSubpackages 3"
"Final set of enabled packages: SimpleCxx MixedLang WithSubpackagesA WithSubpackagesB WithSubpackagesC WithSubpackages 6"
"Configuring done"
Expand Down
92 changes: 73 additions & 19 deletions test/core/TestingFunctionMacro_UnitTests.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,8 @@ function(unittest_tribits_create_reverse_list)
endfunction()


##########################################################################################

function(unittest_tribits_find_python_interp)

message("\n***")
Expand All @@ -166,55 +168,107 @@ function(unittest_tribits_find_python_interp)
set(MESSAGE_WRAPPER_UNIT_TEST_MODE TRUE)
set(TRIBITS_FIND_PYTHON_UNITTEST TRUE)

tribits_find_python_interp_uses_python_false()
tribits_find_python_interp_uses_python_empty()
tribits_find_python_interp_uses_python_true()
tribits_find_python_interp_requires_python_true()
tribits_find_python_interp_find_version_too_low()
tribits_find_python_interp_find_version_higher()
tribits_find_python_interp_python_executable_backward_compatible()

endfunction()


function(tribits_find_python_interp_uses_python_false)
message("tribits_find_python_interp(): ${PROJECT_NAME}_USES_PYTHON=FALSE")
set(${PROJECT_NAME}_USES_PYTHON FALSE)
global_set(MESSAGE_WRAPPER_INPUT)
tribits_find_python_interp()
unittest_compare_const(MESSAGE_WRAPPER_INPUT
"-- ;NOTE: Skipping check for Python because; ${PROJECT_NAME}_USES_PYTHON='FALSE'")
unittest_compare_const(FIND_PythonInterp_ARGS
unittest_compare_const(FIND_Python3_ARGS
"")
endfunction()

message("tribits_find_python_interp(): ${PROJECT_NAME}_USES_PYTHON=")
global_set(MESSAGE_WRAPPER_INPUT)
set(${PROJECT_NAME}_USES_PYTHON)
set(PYTHON_EXECUTABLE_UNITTEST_VAL /path/to/python2.4)

function(tribits_find_python_interp_uses_python_empty)
message("tribits_find_python_interp(): ${PROJECT_NAME}_USES_PYTHON=''")
global_set(MESSAGE_WRAPPER_INPUT "")
set(${PROJECT_NAME}_USES_PYTHON "")
set(Python3_EXECUTABLE_UNITTEST_VAL /path/to/python3.6)
tribits_find_python_interp()
unittest_compare_const(MESSAGE_WRAPPER_INPUT
"-- ;PYTHON_EXECUTABLE='/path/to/python2.4'")
"-- ;Python3_EXECUTABLE='/path/to/python3.6'")
endfunction()


function(tribits_find_python_interp_uses_python_true)
message("tribits_find_python_interp(): ${PROJECT_NAME}_USES_PYTHON=TRUE")
global_set(MESSAGE_WRAPPER_INPUT)
set(${PROJECT_NAME}_USES_PYTHON TRUE)
global_set(PYTHON_EXECUTABLE_UNITTEST_VAL /path/to/python2.4)
global_set(Python3_EXECUTABLE_UNITTEST_VAL /path/to/python3.6)
tribits_find_python_interp()
unittest_compare_const(MESSAGE_WRAPPER_INPUT
"-- ;PYTHON_EXECUTABLE='/path/to/python2.4'")
unittest_compare_const(FIND_PythonInterp_ARGS
"PythonInterp")
"-- ;Python3_EXECUTABLE='/path/to/python3.6'")
unittest_compare_const(FIND_Python3_ARGS
"Python3;3.6")
endfunction()


function(tribits_find_python_interp_requires_python_true)
message("tribits_find_python_interp(): ${PROJECT_NAME}_REQUIRES_PYTHON=TRUE")
global_set(MESSAGE_WRAPPER_INPUT)
set(${PROJECT_NAME}_USES_PYTHON FALSE)
set(${PROJECT_NAME}_REQUIRES_PYTHON TRUE)
set(PYTHON_EXECUTABLE_UNITTEST_VAL /path/to/python2.4)
set(Python3_EXECUTABLE_UNITTEST_VAL /path/to/python3.6)
tribits_find_python_interp()
unittest_compare_const(MESSAGE_WRAPPER_INPUT
"-- ;PYTHON_EXECUTABLE='/path/to/python2.4'")
unittest_compare_const(FIND_PythonInterp_ARGS
"PythonInterp;REQUIRED")
"-- ;Python3_EXECUTABLE='/path/to/python3.6'")
unittest_compare_const(FIND_Python3_ARGS
"Python3;3.6;REQUIRED")
endfunction()


message("tribits_find_python_interp(): PythonInterp_FIND_VERSION=2.3")
function(tribits_find_python_interp_find_version_too_low)
message("tribits_find_python_interp(): ${PROJECT_NAME}_Python3_FIND_VERSION=3.5 (too low)")
global_set(MESSAGE_WRAPPER_INPUT)
set(PythonInterp_FIND_VERSION 2.3)
set(PYTHON_EXECUTABLE_UNITTEST_VAL /dummy)
set(${PROJECT_NAME}_Python3_FIND_VERSION 3.5)
set(Python3_EXECUTABLE_UNITTEST_VAL /dummy)
tribits_find_python_interp()
unittest_compare_const(MESSAGE_WRAPPER_INPUT
"FATAL_ERROR;Error,; PythonInterp_FIND_VERSION=2.3 < 2.6; is not allowed!;-- ;PYTHON_EXECUTABLE='/dummy'")
"FATAL_ERROR;Error,; ${PROJECT_NAME}_Python3_FIND_VERSION=3.5 < 3.6; is not allowed!;-- ;Python3_EXECUTABLE='/dummy'")
endfunction()


function(tribits_find_python_interp_find_version_higher)
message("tribits_find_python_interp(): ${PROJECT_NAME}_Python3_FIND_VERSION=3.11")
global_set(MESSAGE_WRAPPER_INPUT)
set(${PROJECT_NAME}_REQUIRES_PYTHON TRUE)
set(${PROJECT_NAME}_Python3_FIND_VERSION 3.11)
set(Python3_EXECUTABLE_UNITTEST_VAL /path/to/python3.11)
tribits_find_python_interp()
unittest_compare_const(MESSAGE_WRAPPER_INPUT
"-- ;Python3_EXECUTABLE='/path/to/python3.11'")
unittest_compare_const(FIND_Python3_ARGS
"Python3;3.11;REQUIRED")
endfunction()


function(tribits_find_python_interp_python_executable_backward_compatible)
message("tribits_find_python_interp(): PYTHON_EXECUTABLE backward compatibility")
global_set(MESSAGE_WRAPPER_INPUT)
set(PYTHON_EXECUTABLE /path/to/python3.10.2)
tribits_find_python_interp()
unittest_compare_const(MESSAGE_WRAPPER_INPUT
"DEPRECATION;Python3_EXECUTABLE being set by default to PYTHON_EXECUTABLE = '/path/to/python3.10.2' is deprecated!;\n\nNOTE: To Make these warnings go away, set -D; TRIBITS_HANDLE_TRIBITS_DEPRECATED_CODE=IGNORE (see the build reference guide).;-- ;Python3_EXECUTABLE='/path/to/python3.10.2'")
unittest_compare_const(FIND_Python3_ARGS
"Python3;3.6")
endfunction()


##########################################################################################


function(unittest_tribits_standardize_abs_paths)

message("\n***")
Expand Down Expand Up @@ -4844,4 +4898,4 @@ message("*** Determine final result of all unit tests")
message("***\n")

# Pass in the number of expected tests that must pass!
unittest_final_result(720)
unittest_final_result(724)
Loading

0 comments on commit bd5ce80

Please sign in to comment.