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

Fix .egg-info metadata support for zipimport #2490

Merged
merged 3 commits into from Jan 16, 2021
Merged

Fix .egg-info metadata support for zipimport #2490

merged 3 commits into from Jan 16, 2021

Conversation

thatch
Copy link
Contributor

@thatch thatch commented Dec 14, 2020

Summary of changes

Previously pkg_resources behavior differed between regular path items and zipimport:

  • regular: supports .dist-info and .egg-info metadata
  • zipimport: only .dist-info

Extracting an sdist in most cases works for pkg_resources; the change lets you also repack the zip removing the top-level dir (or build with buck/bazel).

Closes #2489

Pull Request Checklist

@thatch
Copy link
Contributor Author

thatch commented Dec 14, 2020

The tests do not run on pytest 6; that one-line change to the version constraint seems necessary, although not directly related to this PR. I didn't see guidance on the order of commits, e.g. whether CI needs to pass on every rev, or you'd rather see a failing test then the fix. Let me know any changes you'd like to see.

setup.cfg Outdated Show resolved Hide resolved
pkg_resources/__init__.py Outdated Show resolved Hide resolved
Co-authored-by: Sviatoslav Sydorenko <wk.cvs.github@sydorenko.org.ua>
@jaraco jaraco merged commit 886dd34 into pypa:main Jan 16, 2021
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.

pkg_resources does not find .egg-info dirs from zipimport
4 participants