How do I distribute precompiled extension modules

2019-06-07 02:03发布

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条回答
相关推荐>>
2楼-- · 2019-06-07 02:44

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

查看更多
登录 后发表回答