[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Best practice on how to package a python module along with a c++ program



On Friday, May 8, 2020 6:59:08 AM EDT Uwe Steinmann wrote:
> Hi,
> 
> not sure if this is the right list, but it was my closes guess.
> 
> 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
> 
> I thought about overriding dh_auto_build with
> 
> override_dh_auto_build:
>   make pymodule
>   dh_auto_build
> 
> which should at least build the module. But it still needs to be
> installed at the right place. What would be the preferred way?

First, you don't specify, but assuming this is python3:

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)

Then use dh_python3 and ${python3:Depends} to install it in the correct final 
location and generate appropriate Python interpreter dependencies.

Scott K

Attachment: signature.asc
Description: This is a digitally signed message part.


Reply to: