From 6de2dc6cd4245dc64c042c7eef639758361a062c Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Sat, 4 Dec 2021 16:43:56 +1000 Subject: [PATCH] place .cargo/bin at end of path when packaging Otherwise a system-installed older Rust will override the version we have set with cargo-env, which can break the build. --- qt/package/build.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/qt/package/build.py b/qt/package/build.py index 0d186cc67..0c792a68c 100644 --- a/qt/package/build.py +++ b/qt/package/build.py @@ -23,11 +23,11 @@ pyo3_config = output_root / "pyo3-build-config-file.txt" if is_win: python_bin_folder = venv / "scripts" - os.environ["PATH"] = os.getenv("USERPROFILE") + r"\.cargo\bin;" + os.getenv("PATH") + os.environ["PATH"] += fr";{os.getenv('USERPROFILE')}\.cargo\bin" cargo_features = "build-mode-prebuilt-artifacts" else: python_bin_folder = venv / "bin" - os.environ["PATH"] = os.getenv("HOME") + "/.cargo/bin:" + os.getenv("PATH") + os.environ["PATH"] += f":{os.getenv('HOME')}/.cargo/bin" cargo_features = ( "build-mode-prebuilt-artifacts global-allocator-jemalloc allocator-jemalloc" )