colcon to build a python "vendor"ised library

asked 2021-06-23 21:21:02 -0500

flimsypondreed gravatar image

updated 2021-06-23 21:21:56 -0500

I use a project that provides python bindings as source only, but the (c++ compiled) library itself is compiled and available as a debian pkg. I have a patch to the setup.py that makes the bindings use the system installed version, and now I would like to instruct colcon to build and install the python library.

I have created a new package called blah_vendor and cloned the vendor code into blah. The setup.py lives within the python subdirectory of blah.

blah_vendor/blah/* <-- cmake, source code etc etc
blah_vendor/blah/python/setup.py <-- what I want to install
blah_vendor/package.xml <-- My package.xml

What do I have to do for colcon to understand how to build/install using that setup.py?

I have already created a _vendor package for an unrelated c++ package due to the authors being awkward and not following standard practices, and it works really well, takes all the work out of managing dependencies like that. However that used CMake and ExternalProject calls within it. How do I do the same for python libraries?

edit retag flag offensive close merge delete