Skip to content

Commit

Permalink
Pin rust compiler version to 1.73 for wheel builds
Browse files Browse the repository at this point in the history
With the release 1.74 on 11-16-2023 the minimum supported macOS version
by the Rust compiler is 10.12. For the 0.45.x release series we still
support macOS 10.9 (this will change in 1.0 see Qiskit#10902). To faciliate
still publishing wheels that will support macOS 10.9 for any future
bugfix releases on 0.45.x release series (and 0.46.x too) this commit
pins the rust toolchain version we use to 1.73 which is the last
release that support 10.9.
  • Loading branch information
mtreinish committed Nov 17, 2023
1 parent 4b1d392 commit e0d6dc7
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
name: Install Python
with:
python-version: '3.10'
- uses: dtolnay/rust-toolchain@stable
- uses: dtolnay/rust-toolchain@1.73
- name: Build wheels
uses: pypa/cibuildwheel@v2.13.0
- uses: actions/upload-artifact@v3
Expand All @@ -40,7 +40,7 @@ jobs:
name: Install Python
with:
python-version: '3.10'
- uses: dtolnay/rust-toolchain@stable
- uses: dtolnay/rust-toolchain@1.73
- name: Build wheels
uses: pypa/cibuildwheel@v2.13.0
env:
Expand Down Expand Up @@ -85,7 +85,7 @@ jobs:
name: Install Python
with:
python-version: '3.10'
- uses: dtolnay/rust-toolchain@stable
- uses: dtolnay/rust-toolchain@1.73
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
with:
Expand Down Expand Up @@ -118,7 +118,7 @@ jobs:
name: Install Python
with:
python-version: '3.10'
- uses: dtolnay/rust-toolchain@stable
- uses: dtolnay/rust-toolchain@1.73
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
with:
Expand Down Expand Up @@ -151,7 +151,7 @@ jobs:
name: Install Python
with:
python-version: '3.10'
- uses: dtolnay/rust-toolchain@stable
- uses: dtolnay/rust-toolchain@1.73
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
with:
Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ test-command = "python {project}/examples/python/stochastic_swap.py"
# Numpy 1.22 there are no i686 wheels, so we force pip to use older ones without
# restricting any dependencies that Numpy and Scipy might have.
before-test = "pip install --only-binary=numpy,scipy numpy scipy"
environment = 'RUSTUP_TOOLCHAIN="stable"'
environment = 'RUSTUP_TOOLCHAIN="1.73"'

[tool.cibuildwheel.linux]
before-all = "yum install -y wget && {package}/tools/install_rust.sh"
environment = 'PATH="$PATH:$HOME/.cargo/bin" CARGO_NET_GIT_FETCH_WITH_CLI="true" RUSTUP_TOOLCHAIN="stable"'
environment = 'PATH="$PATH:$HOME/.cargo/bin" CARGO_NET_GIT_FETCH_WITH_CLI="true" RUSTUP_TOOLCHAIN="1.73"'
repair-wheel-command = "auditwheel repair -w {dest_dir} {wheel} && pipx run abi3audit --strict --report {wheel}"

[tool.cibuildwheel.macos]
Expand Down
2 changes: 1 addition & 1 deletion tools/install_rust.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
if [ ! -d rust-installer ]; then
mkdir rust-installer
wget https://sh.rustup.rs -O rust-installer/rustup.sh
sh rust-installer/rustup.sh -y
sh rust-installer/rustup.sh -y --default-toolchain 1.73
fi

0 comments on commit e0d6dc7

Please sign in to comment.