-
-
Notifications
You must be signed in to change notification settings - Fork 32.4k
Closed
Labels
docsDocumentation in the Doc dirDocumentation in the Doc dir
Description
From Creating Standalone Applications with zipapp, point 3 mentions you may delete .dist-info directories "as you won’t be making any further use of pip they aren’t required".
But you can have a nasty surprise this way - the problem is that this totally breaks importlib.metadata
usage.
E.g. if you have an argparse --version
in your app which uses importlib.metadata.version("myapp")
, but you've unlinked all the .dist-info metadata before making the zipapp, you'll get:
importlib.metadata.PackageNotFoundError: No package metadata was found for myapp
We don't know if/when third party libraries want to look at their own package metadata, so I think this suggestion in the docs should be removed outright.
Linked PRs
Metadata
Metadata
Assignees
Labels
docsDocumentation in the Doc dirDocumentation in the Doc dir