Skip to content

armgit / manim

Public Imported from GitHub
0

A community-maintained Python framework for creating mathematical animations.

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

Srinivas Rao Tammireddy1405af6005c8
diff --git a/manim/cli/checkhealth/checks.py b/manim/cli/checkhealth/checks.py
index aabb2b3b4..ec63ad7cd 100644
--- a/manim/cli/checkhealth/checks.py
+++ b/manim/cli/checkhealth/checks.py
@@ -140,6 +140,12 @@ def is_manim_executable_associated_to_this_library() -> bool:
with open(path_to_manim, "rb") as manim_binary:
manim_exec = manim_binary.read()
+ # support uv toolchain's shim executable structure
+ companion_script = path_to_manim + ".__script__.py"
+ if os.path.isfile(companion_script):
+ with open(companion_script, "rb") as f:
+ manim_exec += f.read()
+
# first condition below corresponds to the executable being
# some sort of python script. second condition happens when
# the executable is actually a Windows batch file.