Skip to content

Commit

Permalink
Use pip install --user
Browse files Browse the repository at this point in the history
  • Loading branch information
messense committed Oct 21, 2024
1 parent d5002b5 commit af5852b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -11824,12 +11824,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 --user patchelf',
'python3 -m pip install --user 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 --user 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::"');
Expand All @@ -11843,7 +11843,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 --user "sccache>=0.4.0"', 'sccache --version', 'echo "::endgroup::"');
setupSccacheEnv();
}
commands.push(`maturin ${args.join(' ')}`);
Expand Down
8 changes: 4 additions & 4 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 --user patchelf',
'python3 -m pip install --user 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 --user ziglang',
'echo "::endgroup::"'
)
}
Expand Down Expand Up @@ -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 --user "sccache>=0.4.0"',
'sccache --version',
'echo "::endgroup::"'
)
Expand Down

0 comments on commit af5852b

Please sign in to comment.