Add dll / so to the built python distribution

I have compiled a python shell nanomsg and I want to create a python installer for the package.

You can create a package by running

python setup.py bdist --format=wininst

However, I would like it to nanomsg.dll/nanomsg.sobe included in the installation file / package, but I did not find any documentation on this issue.

+4
source share
1 answer

As stated in the documentation here , you need to add the following code to your script 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"])],
+1
source

Source: https://habr.com/ru/post/1612264/


All Articles