I have a shared library that I have created using pybind11.
called dddd.so
when I open python and type
import dddd
print(dddd.test_function())
I get my desired result, and that's fantastic.
However, my goal is to create a conda installable package, so that I could create a conda environment, and then type:
conda install dddd
And have that work.
So I am trying to create a setup.py file that will allow me to create this using python setup.py bdist or python setup.py bdist_conda
I have not been able to get my shared library to go into a bdist module.
My directory structure at the moment is
dddd/
- dddd/
-dddd.so
-__init__.py
setup.py
I have tried a lot of things, including Distribute a Python package with a compiled dynamic shared library , but I have not been able to get it to work.
When I try this as my setup.py:
from distutils.core import setup
setup(
name='dddd',
version='0.2',
packages=['dddd'],
package_dir={'dddd': 'dddd'},
package_data={'dddd': ['dddd.so']},
)
I am able to get python setup.py bdist_conda to work.
However when I run this conda module, my module can now not be directly accessed, I have to do:
import dddd.dddd
dddd.dddd.test_function()
Which is not what I want.
I can't seem to achieve what was achieved in the answer in my link.