How pip recognize to create wheel for a package

℡╲_俬逩灬. 提交于 2019-12-02 08:26:37

问题


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


回答1:


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.



来源:https://stackoverflow.com/questions/35589293/how-pip-recognize-to-create-wheel-for-a-package

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!