Skip to content

Commit

Permalink
Search entry points only in the main package
Browse files Browse the repository at this point in the history
  • Loading branch information
uranusjr committed Feb 9, 2021
1 parent cebdc53 commit 6ffe136
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/pipx/venv.py
Original file line number Diff line number Diff line change
Expand Up @@ -345,8 +345,11 @@ def list_installed_packages(self) -> Set[str]:
def _find_entry_point(self, app: str) -> Optional[EntryPoint]:
if not self.python_path.exists():
return None
site_packages = get_site_packages(self.python_path)
for dist in Distribution.discover(path=[str(site_packages)]):
dists = Distribution.discover(
name=self.main_package_name,
path=[str(get_site_packages(self.python_path))],
)
for dist in dists:
for ep in dist.entry_points:
if ep.group == "pipx.run" and ep.name == app:
return ep
Expand Down

0 comments on commit 6ffe136

Please sign in to comment.