Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Infinite recursion when packaging a Mitsuba dependency with pyinstaller #1487

Open
ThomasAuzinger opened this issue Feb 7, 2025 · 0 comments

Comments

@ThomasAuzinger
Copy link

pyinstaller can be used to package a Python script with all its dependencies into a single executable.

When using it on a python script that depends on Mitsuba (i.e., pyinstaller script.py -p . --collect-all mitsuba), it traverses all Mitsuba subpackages and runs into an infinite recursion via mitsuba, mitsuba.mitsuba_stubs, mitsuba.mitsuba_stubs.mitsuba_stubs, mitsuba.mitsuba_stubs.mitsuba_stubs.mitsuba_stubs, ...

A workaround is to enumerate the relevant subpackages of Mitsuba by hand:

pyinstaller script.py -p . 
  --collect-data mitsuba --collect-binaries mitsuba --collect-all mitsuba.test
  --collect-all mitsuba.ad --collect-all mitsuba.python --collect-all mitsuba.mitsuba_ext
  --collect-all mitsuba.llvm_ad_rgb --collect-all drjit

I do not think that there's anything to actually fix but I wanted to share this workaround in case anyone else runs into this problem.

@merlinND merlinND self-assigned this Feb 11, 2025
@merlinND merlinND removed their assignment Feb 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants