Wheel Incompatibility between Python Minor Versions

自作多情 提交于 2021-02-05 11:14:19

问题


I'm releasing a package on PyPi which will support Python 3.6+, and would like to build as few wheels as possible.

I've read up on Python's packaging system for wheels and looked at the NumPy project for an example. Reading PEP 513 and PEP 571 was also insightful.

Here's the question: why are wheels forwards-incompatible with Python minor version changes?

Upgrading from 3.5 to 3.6, for example, brings f-strings. But it seems like a wheel built with Python 3.5 (not using f-strings) should be able to run just fine on a Python 3.6 environment. What's the issue here?


回答1:


Code written in pure Python in a 2-and-3 compatible way can be released in a universal wheel. One wheel that fits all Python versions. Example: https://pypi.org/project/SQLObject/#files

But projects that include modules written in C must be released separately for every platform (processor architecture and 32/64-bitness), OS and Python version simply because the C code must be compiled differently. Example: https://pypi.org/project/Cheetah3/#files

PS. Full disclosure: I'm the maintainer for both projects used as examples.



来源:https://stackoverflow.com/questions/58441857/wheel-incompatibility-between-python-minor-versions

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