diff --git a/cranelift/test-all.sh b/cranelift/test-all.sh index 6a9291d82e..2402eb7a39 100755 --- a/cranelift/test-all.sh +++ b/cranelift/test-all.sh @@ -11,6 +11,10 @@ set -euo pipefail # # All tests run by this script should be passing at all times. +# Disable generation of .pyc files because they cause trouble for vendoring +# scripts, and this is a build step that isn't run very often anyway. +export PYTHONDONTWRITEBYTECODE=1 + # Repository top-level directory. cd $(dirname "$0") topdir=$(pwd) diff --git a/lib/cretonne/build.rs b/lib/cretonne/build.rs index d2ef3905b1..69be14de94 100644 --- a/lib/cretonne/build.rs +++ b/lib/cretonne/build.rs @@ -59,8 +59,11 @@ fn main() { let build_script = meta_dir.join("build.py"); // Launch build script with Python. We'll just find python in the path. + // Use -B to disable .pyc files, because they cause trouble for vendoring + // scripts, and this is a build step that isn't run very often anyway. let status = process::Command::new("python") .current_dir(crate_dir) + .arg("-B") .arg(build_script) .arg("--out-dir") .arg(out_dir)