>> I'm packaging a c++ program (horizon-eda) which also contains a >> python module written in c++. Upstream's Makefile has a target 'pymodule' >> and 'make pymodule' creates horizon.so in the build directory. >> According to upstream this has to be copied Ń–nto python's sys.path > > The preferred mechanism would be to install the .so file into: > > usr/lib/python3.X/dist-packages/ (where X is the python3 version you are > building with)
"horizon.so" isn't multi-arch safe, so please ensure it gets a suitable filename on installation. All CPython modules I can find on my system use one of these forms: /usr/lib/python3/dist-packages/package.cpython-38-x86_64-linux-gnu.so /usr/lib/python3/dist-packages/package/module.cpython-38-x86_64-linux-gnu.so /usr/lib/python3.8/dist-packages/package/module.cpython-38-x86_64-linux-gnu.so I assume this would normally be done by distutils, or is it handled by dh_python3 automatically?