Distribute a Python package with a compiled dynamic shared library

What I ended up doing is:

setup(
    name="py_my_lib",
    version=version,  # specified elsewhere
    packages=[''],
    package_dir={'': '.'},
    package_data={'': ['py_my_lib.so']},
)

This way I get to import the lib by its name, and don’t have another level of nestedness:

import py_my_lib

and not

from py_my_lib_wrapper import py_my_lib

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)