向python构建的发行版添加dll/so

2024-04-29 10:34:01 发布

您现在位置:Python中文网/ 问答频道 /正文

我已经编译了nanomsgpython wrapper,我想为这个包创建一个python安装程序。

可以通过运行

python setup.py bdist --format=wininst

不过,我希望nanomsg.dll/nanomsg.so包含在安装程序/包中,但我没有找到任何有关此问题的文档。在


Tags: 文档pyformatsosetupwrapperbdistdll
1条回答
网友
1楼 · 发布于 2024-04-29 10:34:01

如文档here中所述,需要将以下代码添加到他的setup.py脚本中:

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"])],

相关问题 更多 >