Skip to content

Commit

Permalink
Merge pull request #511 from thewtex/python-executable
Browse files Browse the repository at this point in the history
COMP: Update python executable location and usage
  • Loading branch information
fedorov authored Dec 10, 2024
2 parents 1f82832 + 027ccb3 commit 011237d
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/cmake-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
fetch-tags: true
- uses: actions/setup-python@v4
with:
python-version: '3.7.14'
python-version: '3.9'

- name: "Install jsondiff"
run: pip install jsondiff
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/cmake-win.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:

- uses: actions/setup-python@v4
with:
python-version: '3.8.0'
python-version: '3.9.0'

- name: Download prerequisite packages
run: |
Expand Down
6 changes: 3 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -246,10 +246,10 @@ mark_as_superbuild(JsonCpp_INCLUDE_DIR:PATH)
mark_as_superbuild(JsonCpp_LIBRARY:FILEPATH)
mark_as_superbuild(DCMQI_BUILTIN_JSONCPP:BOOL)

# Python 2.7
# Python 3
if(BUILD_TESTING)
find_package(PythonInterp 2.7 REQUIRED)
mark_as_superbuild(PYTHON_EXECUTABLE)
find_package(Python3 COMPONENTS Interpreter REQUIRED)
mark_as_superbuild(Python3_EXECUTABLE)
endif()

#-----------------------------------------------------------------------------
Expand Down
4 changes: 2 additions & 2 deletions apps/paramaps/Testing/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ dcmqi_add_test(
dcmqi_add_test(
NAME ${MODULE_NAME}_meta_roundtrip
MODULE_NAME ${MODULE_NAME}
COMMAND python ${CMAKE_SOURCE_DIR}/util/comparejson.py
COMMAND ${Python3_EXECUTABLE} ${CMAKE_SOURCE_DIR}/util/comparejson.py
${CMAKE_SOURCE_DIR}/doc/examples/pm-example.json
${MODULE_TEMP_DIR}/makeNRRDParametricMap-meta.json
TEST_DEPENDS
Expand All @@ -153,7 +153,7 @@ dcmqi_add_test(
dcmqi_add_test(
NAME ${MODULE_NAME}_FP_meta_roundtrip
MODULE_NAME ${MODULE_NAME}
COMMAND python ${CMAKE_SOURCE_DIR}/util/comparejson.py
COMMAND ${Python3_EXECUTABLE} ${CMAKE_SOURCE_DIR}/util/comparejson.py
${CMAKE_SOURCE_DIR}/doc/examples/pm-example-float.json
${MODULE_TEMP_DIR}/makeNRRDParametricMapFP-meta.json
TEST_DEPENDS
Expand Down
4 changes: 2 additions & 2 deletions apps/seg/Testing/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ dcmqi_add_test(
dcmqi_add_test(
NAME seg_meta_roundtrip
MODULE_NAME ${MODULE_NAME}
COMMAND python ${CMAKE_SOURCE_DIR}/util/comparejson.py
COMMAND ${Python3_EXECUTABLE} ${CMAKE_SOURCE_DIR}/util/comparejson.py
${CMAKE_SOURCE_DIR}/doc/examples/seg-example.json
${MODULE_TEMP_DIR}/makeNRRD-meta.json
TEST_DEPENDS
Expand All @@ -273,7 +273,7 @@ dcmqi_add_test(
dcmqi_add_test(
NAME multi_seg_meta_roundtrip
MODULE_NAME ${MODULE_NAME}
COMMAND python ${CMAKE_SOURCE_DIR}/util/comparejson.py
COMMAND ${Python3_EXECUTABLE} ${CMAKE_SOURCE_DIR}/util/comparejson.py
${CMAKE_SOURCE_DIR}/doc/examples/seg-example_multiple_segments.json
${MODULE_TEMP_DIR}/makeNRRD_multiple_segments-meta.json
"['labelID']"
Expand Down
2 changes: 1 addition & 1 deletion apps/sr/Testing/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ set(MODULE_NAME tid1500)
dcmqi_add_test(
NAME ${MODULE_NAME}_meta_roundtrip
MODULE_NAME ${READER_MODULE_NAME}
COMMAND python ${CMAKE_SOURCE_DIR}/util/comparejson.py
COMMAND ${Python3_EXECUTABLE} ${CMAKE_SOURCE_DIR}/util/comparejson.py
${EXAMPLES}/sr-tid1500-ct-liver-example.json
${MODULE_TEMP_DIR}/sr-tid1500-ct-liver-example.json
"['activitySession', 'timePoint', 'imageLibrary', 'compositeContext','procedureReported']"
Expand Down

0 comments on commit 011237d

Please sign in to comment.