我正在使用C库和ctypes构建一个python包.
我找到了一个策略,在安装包的过程中使用build_ext
和pip
来构建库.它会根据目标的平台创建libfoo.dll
或libfoo.dylib
或libfoo.so
.
问题是我的用户需要安装CMake.
在安装过程中是否存在另一种避免建筑的策略?我必须在包中Bundle 构建的库吗?
我想让我的用户保持pip install mylib
.
Edit:感谢@Dawid comment,我正试图用python setup.py bdist_wheel
命令生成一个python wheel
,但没有成功.
How can I create my python wheel for different platform with the embedded library ?
Edit 2:我使用的是python 3.4和Mac OS X,但我可以使用Windows电脑和Linux电脑