Skip to content

Gracefully fall back when version metadata is missing #4324

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

mohiuddin-khan-shiam
Copy link

Importing Manim directly from a source checkout crashed with
importlib.metadata.PackageNotFoundError because distribution metadata
is absent until the package is installed.
manim/init.py now catches that exception and provides a fallback
"0.0.0+dev" version string, allowing import manim to succeed
immediately after cloning the repository while preserving the correct
behaviour for installed distributions.

Copy link
Member

@behackl behackl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems like a good idea to me, I have one suggestion about the chosen placeholder string.

Co-authored-by: Benjamin Hackl <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 🆕 New
Development

Successfully merging this pull request may close these issues.

2 participants