Distributing pre-built libraries with python modules

 ̄綄美尐妖づ 提交于 2019-12-01 07:33:53

Unfortunately package_data looks for files relative to the top of the package. One fix is to move the helper library under the module dir with the rest of the code:

% mv lib64/mhelper.so module/

Then modify the package_data argument accordingly:

package_data = {'mtester': ['mhelper.so']}
...

Then test:

% python setup.py bdist
% tar tf dist/mtester-0.1.linux-x86_64.tar.gz | grep mhelper
./usr/local/lib/python2.5/dist-packages/mtester/mhelper.so
标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!