From 496f5b2b7fffe4b4e612bdac51b311bbd973d780 Mon Sep 17 00:00:00 2001 From: messense Date: Wed, 9 Oct 2024 19:56:49 +0800 Subject: [PATCH] Add --break-system-packages to pip install command --- dist/index.js | 8 ++++---- src/index.ts | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/dist/index.js b/dist/index.js index d272f1d..5bc9f5b 100644 --- a/dist/index.js +++ b/dist/index.js @@ -11803,12 +11803,12 @@ async function dockerBuild(container, maturinRelease, hostHomeMount, args) { 'echo "::group::Install maturin"', `curl -L ${url} | tar -xz -C /usr/local/bin`, 'maturin --version || true', - 'which patchelf > /dev/null || python3 -m pip install patchelf', - 'python3 -m pip install cffi || true', + 'which patchelf > /dev/null || python3 -m pip install --break-system-packages patchelf', + 'python3 -m pip install --break-system-packages cffi || true', 'echo "::endgroup::"' ]; if (args.includes('--zig')) { - commands.push('echo "::group::Install Zig"', 'python3 -m pip install ziglang', 'echo "::endgroup::"'); + commands.push('echo "::group::Install Zig"', 'python3 -m pip install --break-system-packages ziglang', 'echo "::endgroup::"'); } if (target.length > 0) { commands.push('echo "::group::Install Rust target"', `if [[ ! -d $(rustc --print target-libdir --target ${target}) ]]; then rustup target add ${target}; fi`, 'echo "::endgroup::"'); @@ -11822,7 +11822,7 @@ async function dockerBuild(container, maturinRelease, hostHomeMount, args) { commands.push('echo "::group::Run before script"', ...beforeScript.split('\n'), 'echo "::endgroup::"'); } if (sccache) { - commands.push('echo "::group::Install sccache"', 'python3 -m pip install "sccache>=0.4.0"', 'sccache --version', 'echo "::endgroup::"'); + commands.push('echo "::group::Install sccache"', 'python3 -m pip install --break-system-packages "sccache>=0.4.0"', 'sccache --version', 'echo "::endgroup::"'); setupSccacheEnv(); } commands.push(`maturin ${args.join(' ')}`); diff --git a/src/index.ts b/src/index.ts index eb69db0..ad46eb6 100644 --- a/src/index.ts +++ b/src/index.ts @@ -565,14 +565,14 @@ async function dockerBuild( 'echo "::group::Install maturin"', `curl -L ${url} | tar -xz -C /usr/local/bin`, 'maturin --version || true', - 'which patchelf > /dev/null || python3 -m pip install patchelf', - 'python3 -m pip install cffi || true', // Allow failure for now + 'which patchelf > /dev/null || python3 -m pip install --break-system-packages patchelf', + 'python3 -m pip install --break-system-packages cffi || true', // Allow failure for now 'echo "::endgroup::"' ] if (args.includes('--zig')) { commands.push( 'echo "::group::Install Zig"', - 'python3 -m pip install ziglang', + 'python3 -m pip install --break-system-packages ziglang', 'echo "::endgroup::"' ) } @@ -604,7 +604,7 @@ async function dockerBuild( if (sccache) { commands.push( 'echo "::group::Install sccache"', - 'python3 -m pip install "sccache>=0.4.0"', + 'python3 -m pip install --break-system-packages "sccache>=0.4.0"', 'sccache --version', 'echo "::endgroup::"' )