Problem:
When running colcon build --symlink-install --merge-install
, on multiple python packages (via a setup.py), sometimes a subset of the packages are inaccessible, despite otherwise installing fine (eg. a ModuleNotFoundError)
Steps to reproduce:
Run colcon build --symlink-install --merge-install
on a source tree with multiple python packages.
Since this is a parallelization issue, it will not always occur. (eg. system/load dependent)
Hypothesis:
When a python package is installed in symlink mode, an '.egg-link' and line in 'easy-install.pth' are added to install/lib/python3.7/site-packages/, which references the package's respective directory in build.
However, if multiple install operations attempt to edit 'easy-install.pth' simultaneously, the changes made by one package are negated by the subsequent changes of the other package.
For instance, if I watch 'easy-install.pth' at a high enough poll rate, I can see the path for package1 being appended. Shortly after the entry for package1 disappears and package2 appears.
Possible Solution:
Disable parallel for python packages installed via a setup.py when using symlink install.