git.iko.soy/typeable/nixpkgs
on master help sign in
chromium: Precompile pycs instead of deleting.

This is more of an attempt rather than a real fix (or maybe it is? let's see) for the corrupted .pyc files during build. I believe the reason we get these are likely due to several instances of the Python interpreter that run in parallel and one of these processes might still be writing the .pyc file. So, rather than deleting all .pyc files, we now precompile then in order to avoid any build process trying to generate any .pyc file. Signed-off-by: aszlig <aszlig@redmoonstudios.org>

commit597373bbd5ca3237f3b198c150cf7dbb63183fb1 authoraszlig <aszlig@redmoonstudios.org> dateWed 24 Dec 2014, 18:09 (12 years ago) parent8127edc
1 file changed+3−1
pkgs/applications/networking/browsers/chromium/common.nix+3−1
pkgs/applications/networking/browsers/chromium/common.nix+3−1
@@ -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