Setuptools with a dynamic shared library

Viewed 107

I try to make a very simple python package using setuptools for a project which contains a dynamic shared file, my folder is structured as follow :

project
 + setup.py
 + libmypackage
   + __init__.py (empty file)
   + libmypackage.so

the setup.py contains :

setup(
    name='mypackage',
    version='1.0',
    packages=['libmypackage'],
    package_data={'libmypackage': ['libspylizard.so']},
    include_package_data = True,   
)

I'd like to use the package mypackage just with import mypackage with everything in libmypackage visibible at the root level.

1 - After python setup install --user the package mypackage is installed (pip list) but i can't import it.

2 - I can import libmypackage (that's not the name of the name...) but it contains nothing. I tried to write from libmypackage import * in the __init__.py but without any success..

I'll really appreciate help.

Best regards.

0 Answers
Related