@@ -186,11 +186,13 @@ let
186186 } // (extraAttrs.gypFlags or {}));
187187
188188 configurePhase = ''
189+ # Precompile .pyc files to prevent race conditions during build
190+ python -m compileall -q -f . || : # ignore errors
191+
189192 # This is to ensure expansion of $out.
190193 libExecPath="${libExecPath}"
191194 python build/linux/unbundle/replace_gyp_files.py ${gypFlags}
192195 python build/gyp_chromium -f ninja --depth "$(pwd)" ${gypFlags}
193− find . -iname '*.py[co]' -delete
194196 '';
195197
196198 buildPhase = let