Skip to content

fix(cli): resolve checkhealth false positive for uv launcher shims#4889

Open
srinu2003 wants to merge 2 commits into
ManimCommunity:mainfrom
srinu2003:fix/checkhealth-uv-shim
Open

fix(cli): resolve checkhealth false positive for uv launcher shims#4889
srinu2003 wants to merge 2 commits into
ManimCommunity:mainfrom
srinu2003:fix/checkhealth-uv-shim

Conversation

@srinu2003

Copy link
Copy Markdown

Overview: What does this pull request change?

It updates the is_manim_executable_associated_to_this_library health check in manim/cli/checkhealth/checks.py to support uv toolchain shims. If a companion .__script__.py file exists next to the resolved manim executable, it reads its contents and includes them in the verification check.

Motivation and Explanation: Why and how do your changes improve the library?

When Manim is installed globally or managed via uv, the manim executable on the user's PATH is often a compiled Rust launcher shim (e.g. C:\Users\<username>\AppData\Local\Python\bin\manim.exe).

Because this wrapper is a compiled binary, it does not contain the entrypoint string manim.__main__ directly inside it. Instead, the python entrypoint code is written to a companion script file named manim.exe.__script__.py. This causes manim checkhealth to falsely report that the executable does not belong to the Manim Community library.

This fix resolves the false positive warning for all users using the modern uv Python toolchain.

Links to added or changed documentation pages

Not applicable (No documentation changes required).

Further Information and Comments

This change is non-breaking, cross-platform, and falls back gracefully when no uv shim is present.

Reviewer Checklist

  • The PR title is descriptive enough for the changelog, and the PR is labeled correctly
  • If applicable: newly added non-private functions and classes have a docstring including a short summary and a PARAMETERS section
  • If applicable: newly added functions and classes are tested

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

Successfully merging this pull request may close these issues.

1 participant