Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
setuptools
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jérome Perrin
setuptools
Commits
c3019cf0
Commit
c3019cf0
authored
Dec 14, 2020
by
Tim Hatch
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Find .egg-info in zipimport too
Fixes #2489
parent
44d45ae2
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
1 deletion
+4
-1
changelog.d/2489.change.rst
changelog.d/2489.change.rst
+2
-0
pkg_resources/__init__.py
pkg_resources/__init__.py
+2
-1
No files found.
changelog.d/2489.change.rst
0 → 100644
View file @
c3019cf0
``pkg_resources`` behavior for zipimport now matches the regular behavior, and finds
``.egg-info`` (previoulsy would only find ``.dist-info``) -- by :user:`thatch`
pkg_resources/__init__.py
View file @
c3019cf0
...
...
@@ -1978,12 +1978,13 @@ def find_eggs_in_zip(importer, path_item, only=False):
# don't yield nested distros
return
for subitem in metadata.resource_listdir(''):
lower = subitem.lower()
if _is_egg_path(subitem):
subpath = os.path.join(path_item, subitem)
dists = find_eggs_in_zip(zipimport.zipimporter(subpath), subpath)
for dist in dists:
yield dist
elif
subitem.lower().endswith('.dist-info'
):
elif
any(map(lower.endswith, ('.dist-info', '.egg-info'))
):
subpath = os.path.join(path_item, subitem)
submeta = EggMetadata(zipimport.zipimporter(subpath))
submeta.egg_info = subpath
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment