I am working on a python script to organize a project consisting of several repos. Some of the targets are build using catkin. Since catkin is a python tool, I suspect there has to be a way to call an equivalent to catkin build
from within a python script.
However, I am struggeling to do so. The closest I have come so far is:
from catkin_tools.commands import catkin
catkin.main(["build"])
However, this does not look correct to me, apart from the fact that upon finishing the build process, I end up with:
Exception ignored in: <bound method BaseEventLoop.__del__ of <_UnixSelectorEventLoop running=False closed=True debug=False>>
Traceback (most recent call last):
File "/home/user/.local/lib/python3.6/site-packages/trollius/base_events.py", line 395, in __del__
File "/home/user/.local/lib/python3.6/site-packages/trollius/unix_events.py", line 65, in close
File "/home/user/.local/lib/python3.6/site-packages/trollius/unix_events.py", line 166, in remove_signal_handler
File "/usr/lib/python3.6/signal.py", line 47, in signal
TypeError: signal handler must be signal.SIG_IGN, signal.SIG_DFL, or a callable object
Is there some pythonic way to build catkin packages from withing a running python programm?