Insight Toolkit (ITK) -- Official Repository. ITK builds on a proven, spatially-oriented architecture for processing, segmentation, and registration of scientific images in two, three, or more dimensions.
Before .wrap files were added to ITKCLEsperanto the error trace below was observed in Python CI at build time.
This is a low-severity issue as it is not typical that developers would try to build wrappings for a module defining no wrappings. However, it is not obvious from the index file is missing warning that the cause is that wrappings are built with no wrapping files present.
Steps to Reproduce
Create a new external module with no .wrap files
Attempt to build with Python wrappings turned on
Expected behavior
Build succeeds with no errors (do-nothing) OR fails with error clearly stating that at least one .wrap file must be present for wrapping to succeed.
Actual behavior
[4/111] Generating .pyi files for Python wrapper interface
FAILED: Wrapping/CMakeFiles/itk-stub-files C:/P/IPP/ITK-win_37-x64/Wrapping/Generators/Python/itk-stubs/_proxies.pyi C:/P/IPP/ITK-win_37-x64/Wrapping/Generators/Python/itk-stubs/__init__.pyi D:/a/im/_skbuild/win-amd64-3.7/cmake-build/Wrapping/CMakeFiles/itk-stub-files
cmd.exe /C "cd /D D:\a\im\_skbuild\win-amd64-3.7\cmake-build\Wrapping && C:\P\IPP\venv-37-x64\Scripts\python.exe C:/P/IPP/ITK-source/ITK/Wrapping/Generators/Python/itk/pyi_generator.py --pyi_dir C:/P/IPP/ITK-win_37-x64/Wrapping/Generators/Python/itk-stubs --pkl_dir C:/P/IPP/ITK-win_37-x64/Wrapping/Generators/Python/itk-pkl --index_list_file D:/a/im/_skbuild/win-amd64-3.7/cmake-build/Wrapping/GlobalIdxFilesList.txt"
WARNING: index file is missing, Python stub hints will not be generated for this file.
Exception: No index files were found in directory 'C:/P/IPP/ITK-win_37-x64/Wrapping/Generators/Python/itk-pkl'
Traceback (most recent call last):
File "C:/P/IPP/ITK-source/ITK/Wrapping/Generators/Python/itk/pyi_generator.py", line 569, in <module>
raise Exception(except_comment)
Exception: No index files were found in directory 'C:/P/IPP/ITK-win_37-x64/Wrapping/Generators/Python/itk-pkl'
Description
Before
.wrap
files were added toITKCLEsperanto
the error trace below was observed in Python CI at build time.This is a low-severity issue as it is not typical that developers would try to build wrappings for a module defining no wrappings. However, it is not obvious from the
index file is missing
warning that the cause is that wrappings are built with no wrapping files present.Steps to Reproduce
.wrap
filesExpected behavior
Build succeeds with no errors (do-nothing) OR fails with error clearly stating that at least one
.wrap
file must be present for wrapping to succeed.Actual behavior
Reproducibility
100%
Versions
v5.3rc04.post2
tagEnvironment
CMake 3.22.3 Visual Studio 2022 Windows 10
Additional Information
The issue may be sufficiently resolved by
index_files
parses correctly to 0 items when the list of wrapping index files is empty, thenpyi_generator.py
to exit with a warning or status message rather than an error whenindex_files
has zero elements. https://github.com/InsightSoftwareConsortium/ITK/blob/master/Wrapping/Generators/Python/itk/pyi_generator.py#L566