pypa/pipx

Normalise entry point and package name to make 'pip run' more permissive

Open

#618 创建于 2021年2月1日

在 GitHub 查看
 (3 评论) (0 反应) (0 负责人)Python (7,844 star) (363 fork)batch import
enhancementhelp wanted

描述

Continuing the discussion in https://github.com/pipxproject/pipx/pull/615#issuecomment-770336369

I'm assuming the following will not work:

pipx run bUiLd --help

It will download and install build properly from PyPI (I believe) but it won't match the likely pipx.run endpoint name of "build".

console scripts in conjunction with pipx run would face the same issue.

How can we improve this? I guess it’s not too controversial that the names should be case-insensitive. How about dashes, underscores, and dots? Do we use the same normalisation logic as PEP 503?

This change would also make the check here more difficult:

https://github.com/pipxproject/pipx/blob/25a227b2092f672c88622209d99953a758502f18/src/pipx/commands/run.py#L59-L69

Since now we will need to walk through PATH and make sure none of the variants exist on it?

贡献者指南