NKI-AI / xdrt

XDRT (XDR Toolkit) is a python toolkit to work with the Elekta XDR and XVI file formats.
https://docs.aiforoncology.nl/xdrt
Other
14 stars 4 forks source link

PyPi pip install xdrt does not correctly compile. #1

Closed jonasteuwen closed 3 years ago

jonasteuwen commented 3 years ago

When trying to install xdrt from PyPi, you might run into a compilation error. This needs further investigation. Installing from source as described should currently work.

ivanzhovannik commented 2 years ago

Hi @jonasteuwen,

I have encountered CMake issues on my Windows 10 workstation for both PyPi and source installation - xdrt_installation_traceback_CMake-fails-to-build-wheel.txt. Maybe it is due to CMake not able to define compiler properly? I am not sure how to force a standard compiler on it.

This link was useful to configure CMake and MinGW for Windows - maybe good to add it somewhere.

UPD: the PyPi pip install xdrt worked just fine for my Windows 10 HP laptop - so I think the issue with my desktop above is some CMake configuration. Maybe I need to pass compiler in setup.py here. Smth like

cmake_args = [
            "-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=" + extdir,
            "-DPYTHON_EXECUTABLE=" + sys.executable,
            "-DCMAKE_C_COMPILER=" + c_compiler_path,
            "-DCMAKE_CXX_COMPILER=" + cxx_compiler_path,
        ]