From c32d5146b330c934d6c80024e91e0b8658e4fd72 Mon Sep 17 00:00:00 2001 From: rdb Date: Wed, 26 Nov 2025 11:17:58 +0100 Subject: [PATCH] dist: Gracefully skip accidentally included Python .egg archives --- direct/src/dist/commands.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/direct/src/dist/commands.py b/direct/src/dist/commands.py index d0b4af8814..cf0316b1ba 100644 --- a/direct/src/dist/commands.py +++ b/direct/src/dist/commands.py @@ -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)