如何检测 setup.py 以使用轮包 [英] How to instrument setup.py to use wheel packages

查看:56
本文介绍了如何检测 setup.py 以使用轮包的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的 setup.py 中,我有一个对 numpy 的依赖(在 install_requires 中).

In my setup.py I have a dependency for numpy (in install_requires).

是否可以检测 setup 函数以使用轮包而不是源包而不是编译整个 numpy?

Is it possible to instrument the setup function to use wheel packages rather then source ones and not compile the whole numpy?

注意:当我执行 pip install numpy 时,它会下载 numpy 的二进制包.但是 python setup.py install 获取源包.

Note: When I do pip install numpy it downloads the binary package of numpy. However python setup.py install gets the source package.

推荐答案

wheel 包是 引入 的目的是解决setuptools 使用的源代码分发的问题.尽管 setuptools 有自己的 Egg 格式用于构建发行版比 wheel 早 8 年,wheel 目前被 考虑Python 构建和二进制打包的标准.截至今天,setuptools 尚不支持wheel 格式.

The wheel package was introduced with the purpose of fixing the problems with source distributions that were used by setuptools. Although setuptools had their own Egg format for built distributions that predated wheel by 8 years, wheel is currently considered the standard for built and binary packaging for Python. As of today, setuptools don't yet support the wheel format.

这篇关于如何检测 setup.py 以使用轮包的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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