From a7a50fc833ed997afb44f1c9cfb50abc05b8f51f Mon Sep 17 00:00:00 2001 From: Jesper Friis Date: Tue, 15 Aug 2023 18:07:56 +0200 Subject: [PATCH] Moved installing of rust to a separte python script --- .github/install_rust.py | 10 ++++++++++ .github/workflows/ci_build_wheels.yml | 6 +++++- 2 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 .github/install_rust.py diff --git a/.github/install_rust.py b/.github/install_rust.py new file mode 100644 index 000000000..4242ee049 --- /dev/null +++ b/.github/install_rust.py @@ -0,0 +1,10 @@ +# A python script for installing rust in a Linux environment +import subprocess +import sys + + +if sys.platform.startswith("linux"): + subprocess.run( + "sudo apt install -y rustc cargo && python -m pip install -U poetry", + check=True, shell=True, + ) diff --git a/.github/workflows/ci_build_wheels.yml b/.github/workflows/ci_build_wheels.yml index 7adf64cfa..3d2c7bc4a 100644 --- a/.github/workflows/ci_build_wheels.yml +++ b/.github/workflows/ci_build_wheels.yml @@ -95,8 +95,12 @@ jobs: # source $HOME/.cargo/env && # python -m pip install -U poetry # ", check=True, shell=True)' + #run: | + # python -c "import sys, subprocess; sys.platform.startswith(\"linux\") and subprocess.run(\"sudo apt install -y rustc cargo && python -m pip install -U poetry\", check=True, shell=True)" run: | - python -c "import sys, subprocess; sys.platform.startswith(\"linux\") and subprocess.run(\"sudo apt install -y rustc cargo && python -m pip install -U poetry\", check=True, shell=True)" + pwd + ls + python .github/install_rust.py - name: Install cibuildwheel run: | python -m pip install -U setuptools wheel