SimpleITKPythonPackage
SimpleITKPythonPackage copied to clipboard
Fix having to copy sitkSourceVersionVars.cmake from build to source for `sdist`
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)
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.
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.