dist: Gracefully skip accidentally included Python .egg archives

This commit is contained in:
rdb 2025-11-26 11:17:58 +01:00
parent 1cfa61b435
commit c32d5146b3
1 changed files with 4 additions and 0 deletions

View File

@ -79,6 +79,10 @@ def _model_to_bam(_build_cmd, srcpath, dstpath):
_register_python_loaders()
if src_fn.get_extension() == 'egg' and zipfile.is_zipfile(src_fn.to_os_specific()):
_build_cmd.warn('Skipping %s as it appears to be a Python .egg archive, was this included by mistake?' % (src_fn.to_os_specific()))
return
loader = p3d.Loader.get_global_ptr()
options = p3d.LoaderOptions(p3d.LoaderOptions.LF_report_errors |
p3d.LoaderOptions.LF_no_ram_cache)