点如何识别为包装创建轮子 [英] How pip recognize to create wheel for a package
问题描述
pip
如何决定在软件包上再次运行setup.py bdist_wheel
旧版setup.py install
?
How pip
decide to run setup.py bdist_wheel
againest legacy setup.py install
on a package?
推荐答案
我认为它是在某处描述的!但我不知道到底在哪里.也许在一个PEP中.
I think it is described somewhere! but I dont know exacly where. maybe in one PEP.
是否要创建轮子的主要检查是在 https://github.com/pypa/pip/blob/develop/pip/wheel.py#L773
The main check of whether to create a wheel or not is in https://github.com/pypa/pip/blob/develop/pip/wheel.py#L773
pip.index.egg_info_matches
使用r'([a-z0-9_.]+)-([a-z0-9_.!+-]+)'
检查软件包的基本名称.这意味着包含文件夹名称的setup.py
首先必须采用mypackage-anything
的形式!否则,上述检查将失败,并且旧版安装将开始.
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.
这篇关于点如何识别为包装创建轮子的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!