I want to distribute a Python package which has a closed source dependency. I am using setup.py and everything works if I also do the compilation with setup.py.
Neither answers to this question nor answers to that question solve my problem.
I have the following file structure:
.
├── closed_source
│ ├── compiled.so
├── python_modules
│ ├── file1.py
│ ├── file2.py
│ ├── ...
│ └── __init__.py
└── setup.py
I also tried to include compiled.so
in python_modules
. In file1.py
I use import compiled
which fails.
The following works, but silently fails to include the dynamic library:
setup(
name='my_package',
version=0.1,
packages=['python_modules'],
package_dir={'python_modules': 'python_modules'},
package_data={'': ['closed_source/compiled.so']}, # also tried using key compiled
include_package_data=True,
)