SimpleITK / SimpleITKPythonPackage

A setup script to generate a Python Wheels
17 stars 11 forks source link

Fix having to copy sitkSourceVersionVars.cmake from build to source for `sdist` #38

Open blowekamp opened 7 years ago

blowekamp commented 7 years ago

To produce a valid source distribution the following file needs to be copied from a build to the SimpleITK source git submodule:

cp _skbuild/cmake-build/sitk-sb/SimpleITK-build/sitkSourceVersionVars.cmake ./SimpleITK/CMake/

If the file is not copied then the following error message occurs when compiling the sdsit:

    CMake Error at CMake/sitkSourceVersion.cmake:38 (include):
      include could not find load file:

        /tmp/pip-bKa1cY-build/SimpleITK/CMake/sitkSourceVersionVars.cmake
    Call Stack (most recent call first):
      Version.cmake:17 (include)
      CMakeLists.txt:25 (include)
jcfr commented 7 years ago

This could be address by adding an install rule for that file. The destination could be somewhere in the SimpleITK module.

The install rule could be added directly to the SimpleITK project or to SimpleITKPythonPackage.

blowekamp commented 7 years ago

Are you talking about adding an install run to the setup.py? Do you have an example?

A CMake script needs to be written to generate this file on demand and make this information available to Python.