SIRF-SuperBuild icon indicating copy to clipboard operation
SIRF-SuperBuild copied to clipboard

NiftyPET installation

Open KrisThielemans opened this issue 4 years ago • 4 comments

NiftyPET's installation procedure has improved to be CMake only, see https://github.com/NiftyPET/NIPET#external-cmake-projects.

We can remove External_NiftyPET.cmake therefore and simplify , but only after https://github.com/UCL/STIR/issues/795 is resolved.

KrisThielemans avatar Jan 13 '21 14:01 KrisThielemans

In https://github.com/UCL/STIR/issues/795#issuecomment-759493898 @casperdcl said

NIPET code is strongly coupled to the cpython wrapping API, so building it requires python. I think the current (hacky) way STIR and/or the SuperBuild goes about things is directly look for source code and (re)builds it itself. While some of the source code is python-binding-free, I'm not sure if it is really building it that way.

I haven't checked how @rijobro builds it (link above), but now I'm somewhat worried about Python conflicts. Will any Python do to build NiftyPET now, or does it have to be Python 3?

KrisThielemans avatar Jan 13 '21 14:01 KrisThielemans

nipet<2.0.0 is py2-only, while nipet>=2.0.0 is py3-only. The NIPET libraries which STIR is linking against (https://github.com/UCL/STIR/blob/fe1af133aee5c44ce9fecd50993612f47d274b44/src/cmake/FindNiftyPET.cmake#L41-L45) are python modules so would've needed an appropriate version of python to build.

casperdcl avatar Jan 13 '21 15:01 casperdcl

The python requirements do complicate things. As we are still supporting Python2, largely due to the VM not being updated, it seems that we have to do some if/then/else stuff sadly, both in STIR and here. oh well.

KrisThielemans avatar Jan 13 '21 15:01 KrisThielemans

In fact, on second thought, we're not building NiftyPET on the VM anyway (as no cuda), so maybe we just drop support for nipet<2.0.0. That is fine for me, as long as STIR still "works".

KrisThielemans avatar Jan 13 '21 15:01 KrisThielemans