shluvme
shluvme

Reputation: 863

Add a dll/so to a python built distribution

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.

Upvotes: 12

Views: 9190

Answers (1)

shluvme
shluvme

Reputation: 863

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

Upvotes: 12

Related Questions