Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Install rustup as piwheels user #328

Merged
merged 10 commits into from Sep 5, 2023
3 changes: 1 addition & 2 deletions deploy_slave.sh
Expand Up @@ -78,8 +78,7 @@ getent group piwheels || groupadd piwheels
getent passwd piwheels || useradd -g piwheels -m -s /bin/bash piwheels
passwd -d piwheels

curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
cat .cargo/env >> /home/piwheels/.bashrc
curl -sSf 'https://sh.rustup.rs' | runuser -- - piwheels -s -- -y --profile minimal --default-host arm-unknown-linux-gnueabihf

if [ -d piwheels ]; then
cd piwheels
Expand Down
5 changes: 5 additions & 0 deletions piwheels/slave/builder.py
Expand Up @@ -438,6 +438,11 @@ def build_environment(self):

# allow projects to detect they are built in piwheels
env['PIWHEELS_BUILD'] = "1"

# Add Rust compiler to PATH if missing
if '.cargo/bin' not in env['PATH']:
env['PATH'] = f"{env['HOME']}/.cargo/bin:{env['PATH']}"

return env

def build_command(self, log_file):
Expand Down