Skip to content

Commit

Permalink
Fix wheel build (#911)
Browse files Browse the repository at this point in the history
Workaround for #716
  • Loading branch information
kylebarron authored Dec 9, 2024
1 parent fa2ba45 commit 5e53eec
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 15 deletions.
27 changes: 19 additions & 8 deletions .github/workflows/python-core-wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,12 @@ jobs:
python-version: 3.x
- name: Build wheels
uses: PyO3/maturin-action@v1
env:
RUSTFLAGS: "-Zinline-mir=no"
with:
rust-toolchain: nightly
target: ${{ matrix.platform.target }}
args: --release --out dist --find-interpreter --manifest-path python/${{ matrix.module }}/Cargo.toml
args: --release --out dist -i 3.9 -i 3.10 -i 3.11 -i 3.12 -i 3.13 --manifest-path python/${{ matrix.module }}/Cargo.toml
sccache: "true"
manylinux: auto
- name: Upload wheels
Expand Down Expand Up @@ -80,9 +83,11 @@ jobs:
# python-version: 3.x
# - name: Build wheels
# uses: PyO3/maturin-action@v1
# env:
# RUSTFLAGS: "-Zinline-mir=no"
# with:
# target: ${{ matrix.platform.target }}
# args: --release --out dist --find-interpreter --manifest-path python/${{ matrix.module }}/Cargo.toml
# args: --release --out dist -i 3.9 -i 3.10 -i 3.11 -i 3.12 -i 3.13 --manifest-path python/${{ matrix.module }}/Cargo.toml
# sccache: "true"
# manylinux: musllinux_1_2
# - name: Upload wheels
Expand Down Expand Up @@ -111,9 +116,12 @@ jobs:
architecture: ${{ matrix.platform.target }}
- name: Build wheels
uses: PyO3/maturin-action@v1
env:
RUSTFLAGS: "-Zinline-mir=no"
with:
rust-toolchain: nightly
target: ${{ matrix.platform.target }}
args: --release --out dist --find-interpreter --manifest-path python/${{ matrix.module }}/Cargo.toml
args: --release --out dist -i 3.9 -i 3.10 -i 3.11 -i 3.12 --manifest-path python/${{ matrix.module }}/Cargo.toml
sccache: "true"
- name: Upload wheels
uses: actions/upload-artifact@v4
Expand Down Expand Up @@ -141,9 +149,12 @@ jobs:
python-version: 3.x
- name: Build wheels
uses: PyO3/maturin-action@v1
env:
RUSTFLAGS: "-Zinline-mir=no"
with:
rust-toolchain: nightly
target: ${{ matrix.platform.target }}
args: --release --out dist --find-interpreter --manifest-path python/${{ matrix.module }}/Cargo.toml
args: --release --out dist -i 3.9 -i 3.10 -i 3.11 -i 3.12 -i 3.13 --manifest-path python/${{ matrix.module }}/Cargo.toml
sccache: "true"
- name: Upload wheels
uses: actions/upload-artifact@v4
Expand Down Expand Up @@ -177,16 +188,16 @@ jobs:
- uses: actions/setup-python@v5
with:
python-version: ${{ env.PYTHON_VERSION }}
- run: |
echo RUSTFLAGS="-Zinline-mir=no" >> $GITHUB_ENV
- run: pip install pyodide-build
- name: Build wheels
uses: PyO3/maturin-action@v1
env:
RUSTFLAGS: "-Zinline-mir=no"
with:
rust-toolchain: nightly
target: ${{ matrix.platform.target }}
args: --release --out dist --find-interpreter --no-default-features --manifest-path python/${{ matrix.module }}/Cargo.toml
args: --release --out dist -i 3.9 -i 3.10 -i 3.11 -i 3.12 -i 3.13 --no-default-features --manifest-path python/${{ matrix.module }}/Cargo.toml
sccache: "true"
rust-toolchain: nightly
- name: Upload wheels
uses: actions/upload-artifact@v4
with:
Expand Down
30 changes: 23 additions & 7 deletions .github/workflows/python-io-wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,13 @@ jobs:

- name: Build wheels
uses: PyO3/maturin-action@v1
env:
RUSTFLAGS: "-Zinline-mir=no"
with:
rust-toolchain: nightly
target: ${{ matrix.target }}
manylinux: manylinux_2_28
args: --release --out dist --find-interpreter -m python/geoarrow-io/Cargo.toml
args: --release --out dist -i 3.9 -i 3.10 -i 3.11 -i 3.12 -i 3.13 -m python/geoarrow-io/Cargo.toml
before-script-linux: |
yum update -y
yum install openssl openssl-devel perl-IPC-Cmd -y
Expand Down Expand Up @@ -58,10 +61,13 @@ jobs:

# - name: Build wheels
# uses: PyO3/maturin-action@v1
# env:
# RUSTFLAGS: "-Zinline-mir=no"
# with:
# rust-toolchain: nightly
# target: ${{ matrix.target }}
# manylinux: auto
# args: --release --out dist --find-interpreter -m python/geoarrow-io/Cargo.toml
# args: --release --out dist -i 3.9 -i 3.10 -i 3.11 -i 3.12 -i 3.13 -m python/geoarrow-io/Cargo.toml

# # This is currently failing with
# # python: command not found
Expand Down Expand Up @@ -110,9 +116,12 @@ jobs:

- name: Build wheels - ${{ matrix.platform.target }}
uses: PyO3/maturin-action@v1
env:
RUSTFLAGS: "-Zinline-mir=no"
with:
rust-toolchain: nightly
target: ${{ matrix.platform.target }}
args: --release --out dist --find-interpreter -m python/geoarrow-io/Cargo.toml
args: --release --out dist -i 3.9 -i 3.10 -i 3.11 -i 3.12 -i 3.13 -m python/geoarrow-io/Cargo.toml
sccache: "true"

- name: Install built wheel - ${{ matrix.platform.target }}
Expand All @@ -136,16 +145,19 @@ jobs:

- uses: actions/setup-python@v4
with:
python-version: 3.x
python-version: 3.11
architecture: ${{ matrix.target }}

- uses: dtolnay/rust-toolchain@stable

- name: Build wheels
uses: PyO3/maturin-action@v1
env:
RUSTFLAGS: "-Zinline-mir=no"
with:
rust-toolchain: nightly
target: ${{ matrix.target }}
args: --release --out dist --find-interpreter -m python/geoarrow-io/Cargo.toml
args: --release --out dist -i 3.9 -i 3.10 -i 3.11 -i 3.12 -m python/geoarrow-io/Cargo.toml

- name: Install built wheel
run: |
Expand Down Expand Up @@ -178,9 +190,11 @@ jobs:
# - name: Build wheels
# uses: PyO3/maturin-action@v1
# with:
# rust-toolchain: nightly
# target: ${{ matrix.target }}
# manylinux: musllinux_1_2
# args: --release --out dist --find-interpreter -m python/geoarrow-io/Cargo.toml
# TODO: update rustflags env
# args: --release --out dist -i 3.9 -i 3.10 -i 3.11 -i 3.12 -i 3.13 -m python/geoarrow-io/Cargo.toml

# - name: Install built wheel
# if: matrix.target == 'x86_64-unknown-linux-musl'
Expand Down Expand Up @@ -220,9 +234,11 @@ jobs:
# - name: Build wheels
# uses: PyO3/maturin-action@v1
# with:
# rust-toolchain: nightly
# target: ${{ matrix.platform.target }}
# manylinux: musllinux_1_2
# args: --release --out dist --find-interpreter -m python/geoarrow-io/Cargo.toml
# TODO: update rustflags env
# args: --release --out dist -i 3.9 -i 3.10 -i 3.11 -i 3.12 -i 3.13 -m python/geoarrow-io/Cargo.toml

# - uses: uraimo/[email protected]
# name: Install built wheel
Expand Down
2 changes: 2 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@
members = ["rust/geoarrow"]
exclude = ["js"]
resolver = "2"

[workspace.package]

0 comments on commit 5e53eec

Please sign in to comment.