How do I distribute precompiled extension modules for Windows on pypi for multiple versions of Python?

空扰寡人 提交于 2019-12-08 06:44:33

问题


I would like to distribute a precompiled C extension module for Python 2.6 and Python 2.7 for 32- and 64-bit versions of Python. How should I build and distribute that on pypi? Should I just use bdist_egg? Can I retain compatibility with pip?

I notice ordinary bdist just creates a .zip that does not include the Python version, although the internal folder structure does. Can this .zip just contain e.g. a Python26 and Python27 subdirectory?


回答1:


You generally need to run bdist_something with each version of Python you need to support. bdist_egg does indeed work with PIP afaik (you can easily test it).

The Zope Toolkit has several binary distributions for Windows, and it's using binary eggs: http://pypi.python.org/pypi/zope.interface



来源:https://stackoverflow.com/questions/4618918/how-do-i-distribute-precompiled-extension-modules-for-windows-on-pypi-for-multip

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