Add a dll/so to a python built distribution

时光总嘲笑我的痴心妄想 提交于 2019-12-13 12:04:49

问题


I've compiled the python wrapper of nanomsg and I want to create a python installer for the package.

The package can be created by running

python setup.py bdist --format=wininst

However I would like nanomsg.dll/nanomsg.so to be included in the installer/package but I haven't found any documentation regarding this issue.


回答1:


As stated in the documentation here one needs to add the following code to his setup.py script:

setup(
name='nanomsg',
version=__version__,
packages=[str('nanomsg'), str('_nanomsg_ctypes'), str('nanomsg_wrappers')],
data_files=[('lib\\site-packages\\',["C:\\Dev\\external\\nanomsg\\x86\\Release\\nanomsg.dll"])],


来源:https://stackoverflow.com/questions/33216691/add-a-dll-so-to-a-python-built-distribution

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