Skip to content

Commit

Permalink
Merge pull request SyneRBI#623 from KrisThielemans/PYTHON_DEST_fixes
Browse files Browse the repository at this point in the history
PYTHON_DEST fixes for SIRF

fixes #1020
  • Loading branch information
KrisThielemans authored Nov 6, 2021
2 parents 053bfab + 2984757 commit 4483562
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 38 deletions.
4 changes: 2 additions & 2 deletions SuperBuild.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -121,14 +121,14 @@ else()
# Set destinations for Python files
set (BUILD_PYTHON ${PYTHONLIBS_FOUND})
if (BUILD_PYTHON)
set(PYTHON_DEST_DIR "" CACHE PATH "Directory of the SIRF and/or STIR Python modules")
set(PYTHON_DEST_DIR "" CACHE PATH "Directory of the Python modules (if not set, use ${CMAKE_INSTALL_PREFIX}/python)")
if (PYTHON_DEST_DIR)
set(PYTHON_DEST "${PYTHON_DEST_DIR}")
else()
set(PYTHON_DEST "${CMAKE_INSTALL_PREFIX}/python")
endif()
message(STATUS "Python libraries found")
message(STATUS "SIRF and/or STIR Python modules will be installed in " ${PYTHON_DEST})
message(STATUS "Python modules will be installed in " ${PYTHON_DEST})

set(PYTHON_STRATEGY "PYTHONPATH" CACHE STRING "\
PYTHONPATH: prefix PYTHONPATH \n\
Expand Down
16 changes: 0 additions & 16 deletions SuperBuild/External_CCPi-Regularisation-Toolkit.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -54,22 +54,6 @@ if(NOT ( DEFINED "USE_SYSTEM_${externalProjName}" AND "${USE_SYSTEM_${externalPr
if("${PYTHON_STRATEGY}" STREQUAL "PYTHONPATH")
# in case of PYTHONPATH it is sufficient to copy the files to the
# $PYTHONPATH directory
set (BUILD_PYTHON ${PYTHONLIBS_FOUND})
if (BUILD_PYTHON)
set(PYTHON_DEST_DIR "" CACHE PATH "Directory of the CIL regularisation Python modules")
if (PYTHON_DEST_DIR)
set(PYTHON_DEST "${PYTHON_DEST_DIR}")
else()
set(PYTHON_DEST "${CMAKE_INSTALL_PREFIX}/python")
endif()
message(STATUS "Python libraries found")
message(STATUS "CIL Regularisation Python modules will be installed in " ${PYTHON_DEST})
endif()
set(PYTHON_STRATEGY "PYTHONPATH" CACHE STRING "\
PYTHONPATH: prefix PYTHONPATH \n\
SETUP_PY: execute ${PYTHON_EXECUTABLE} setup.py install \n\
CONDA: do nothing")
set_property(CACHE PYTHON_STRATEGY PROPERTY STRINGS PYTHONPATH SETUP_PY CONDA)

# Sets ${proj}_URL_MODIFIED and ${proj}_TAG_MODIFIED

Expand Down
2 changes: 1 addition & 1 deletion SuperBuild/External_SIRF.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ if(NOT ( DEFINED "USE_SYSTEM_${externalProjName}" AND "${USE_SYSTEM_${externalPr
-DSWIG_EXECUTABLE:FILEPATH=${SWIG_EXECUTABLE}
-DDISABLE_PYTHON:BOOL=${DISABLE_PYTHON}
${PYTHONLIBS_CMAKE_ARGS}
-DPYTHON_DEST_DIR:PATH=${PYTHON_DEST_DIR}
-DPYTHON_DEST_DIR:PATH=${PYTHON_DEST}
-DPYTHON_STRATEGY=${PYTHON_STRATEGY}
-DNIFTYREG_DIR:PATH=${NIFTYREG_DIR}
-DREG_ENABLE:BOOL=${BUILD_SIRF_Registration}
Expand Down
3 changes: 1 addition & 2 deletions SuperBuild/External_TomoPhantom.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,7 @@ if(NOT ( DEFINED "USE_SYSTEM_${externalProjName}" AND "${USE_SYSTEM_${externalPr
-DCONDA_BUILD=OFF
-DBUILD_PYTHON_WRAPPER=ON
${PYTHONLIBS_CMAKE_ARGS}
-DPYTHON_DEST_DIR:PATH=${PYTHON_DEST_DIR}
-DPYTHON_STRATEGY=${PYTHON_STRATEGY}
-DPYTHON_DEST_DIR:PATH=${PYTHON_DEST}
${${proj}_EXTRA_CMAKE_ARGS}
# TODO this relies on using "make", but we could be build with something else
#INSTALL_COMMAND make TomoPhantom
Expand Down
17 changes: 0 additions & 17 deletions SuperBuild/External_astra-python-wrapper.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -61,23 +61,6 @@ if(NOT ( DEFINED "USE_SYSTEM_${externalProjName}" AND "${USE_SYSTEM_${externalPr
if("${PYTHON_STRATEGY}" STREQUAL "PYTHONPATH")
# in case of PYTHONPATH it is sufficient to copy the files to the
# $PYTHONPATH directory
set (BUILD_PYTHON ${PYTHONLIBS_FOUND})
if (BUILD_PYTHON)
set(PYTHON_DEST_DIR "" CACHE PATH "Directory of the ${proj} Python modules")
if (PYTHON_DEST_DIR)
set(PYTHON_DEST "${PYTHON_DEST_DIR}")
else()
set(PYTHON_DEST "${CMAKE_INSTALL_PREFIX}/python")
endif()
message(STATUS "Python libraries found")
message(STATUS "${proj} Python modules will be installed in " ${PYTHON_DEST})
endif()
set(PYTHON_STRATEGY "PYTHONPATH" CACHE STRING "\
PYTHONPATH: prefix PYTHONPATH \n\
SETUP_PY: execute ${PYTHON_EXECUTABLE} setup.py install \n\
CONDA: do nothing")
set_property(CACHE PYTHON_STRATEGY PROPERTY STRINGS PYTHONPATH SETUP_PY CONDA)


set(cmd "${${proj}_SOURCE_DIR}/build/linux/configure")
list(APPEND cmd "CPPFLAGS=-I${SUPERBUILD_INSTALL_DIR}/include -L${SUPERBUILD_INSTALL_DIR}/lib")
Expand Down

0 comments on commit 4483562

Please sign in to comment.