Skip to content

Commit

Permalink
Fix Python macos x86 build (#178)
Browse files Browse the repository at this point in the history
* Add x86_64 target.

* try to fix sdist.

* Add x86 target also for universal2.

* -b pyo3

* Move bindings def into pyproject.toml

* skip 313 in universal2.

* Skip universal2 alltogether.

* Use maturin build --sdist instead of maturin sdist.

* Bump pyo3 to 0.22

* Try pyo3 maturin-action.

* Bump numpy=0.22 as well.

* Revert to 0.19

* Pass --bindings pyo3 to pyo3/maturin-action

* Revert sdist changes.
  • Loading branch information
mlondschien authored Aug 20, 2024
1 parent 0113a1a commit bdaf6f0
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
9 changes: 6 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@ jobs:
os: macos-latest
- vers: x86_64
os: macos-latest
- vers: universal2
os: macos-latest

- vers: AMD64
os: windows-2019
Expand All @@ -56,9 +54,13 @@ jobs:
platforms: arm64

- name: Install darwin target for apple silicon
if: matrix.vers == 'universal2' || (matrix.vers == 'arm64' && matrix.os == 'macos-latest')
if: matrix.vers == 'arm64' && matrix.os == 'macos-latest'
run: rustup target add aarch64-apple-darwin

- name: Install target for apple x86
if: matrix.os == 'macos-latest' && matrix.vers == 'x86_64'
run: rustup target add x86_64-apple-darwin

- name: Setup env when not using docker
if: runner.os != 'Linux'
run: |
Expand Down Expand Up @@ -90,6 +92,7 @@ jobs:

- name: Install build dependencies
run: python -m pip install numpy maturin

- name: Build sdist
run: maturin sdist -m changeforest-py/Cargo.toml

Expand Down
3 changes: 3 additions & 0 deletions changeforest-py/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ classifiers = [
requires = ["maturin>=1.0,<2.0"]
build-backend = "maturin"

[tool.maturin]
bindings = "pyo3"

[tool.isort]
multi_line_output = 3
include_trailing_comma = true
Expand Down

0 comments on commit bdaf6f0

Please sign in to comment.