diff options
| author | Jason R. Coombs <jaraco@jaraco.com> | 2020-05-10 16:18:22 -0400 |
|---|---|---|
| committer | Jason R. Coombs <jaraco@jaraco.com> | 2020-05-10 16:18:22 -0400 |
| commit | 5638e4783fc0f4f5cc40e7ecfab0500983826fa0 (patch) | |
| tree | e681fe0fdc04eea980540cc61b398f033a7b3513 /pkg_resources/__init__.py | |
| parent | 7b0a818f9a877d5e1fe558cf1a817bf2034ddf9f (diff) | |
| download | external_python_setuptools-5638e4783fc0f4f5cc40e7ecfab0500983826fa0.tar.gz external_python_setuptools-5638e4783fc0f4f5cc40e7ecfab0500983826fa0.tar.bz2 external_python_setuptools-5638e4783fc0f4f5cc40e7ecfab0500983826fa0.zip | |
To assess the directoriness of an entry, include the path of that entry.
Diffstat (limited to 'pkg_resources/__init__.py')
| -rw-r--r-- | pkg_resources/__init__.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py index 0575a989..0512731d 100644 --- a/pkg_resources/__init__.py +++ b/pkg_resources/__init__.py @@ -2072,7 +2072,10 @@ def dist_factory(path_item, entry, only): """Return a dist_factory for the given entry.""" lower = entry.lower() is_egg_info = lower.endswith('.egg-info') - is_dist_info = lower.endswith('.dist-info') and not os.path.isfile(entry) + is_dist_info = ( + lower.endswith('.dist-info') and + os.path.isdir(os.path.join(path_item, entry)) + ) is_meta = is_egg_info or is_dist_info return ( distributions_from_metadata |
