Merge branch 'fix/python-builder-racecondition' into 'releases/2.9'
[python] fix race condition in builder
See merge request !1166 (merged)
(cherry picked from commit 34068da6)
e927505b [python] fix race condition in builder 9f8bdd85 [python] try to minimize the sync_dir calls