点如何识别为包装创建轮子 [英] How pip recognize to create wheel for a package

查看:80
本文介绍了点如何识别为包装创建轮子的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆