How pip recognize to create wheel for a package

前端 未结 1 374
余生分开走
余生分开走 2021-01-23 18:05

How pip decide to run setup.py bdist_wheel againest legacy setup.py install on a package?

相关标签:
1条回答
  • 2021-01-23 18:55

    I think it is described somewhere! but I dont know exacly where. maybe in one PEP.

    The main check of whether to create a wheel or not is in https://github.com/pypa/pip/blob/develop/pip/wheel.py#L773

    the pip.index.egg_info_matches checks basename of your package with r'([a-z0-9_.]+)-([a-z0-9_.!+-]+)'. That means setup.py containing folder name must be in form of mypackage-anything in first place! otherwise the above check will fail and the legacy installation will starts.

    0 讨论(0)
提交回复
热议问题