Skip to content

Commit

Permalink
Fix Python wheel build for arm64
Browse files Browse the repository at this point in the history
  • Loading branch information
nhusung committed Feb 18, 2025
1 parent 1183f2d commit 270d8d0
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 7 deletions.
8 changes: 3 additions & 5 deletions .github/workflows/python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -177,8 +177,6 @@ jobs:
3.x
- name: Install Python (i686)
run: nuget install pythonx86 -OutputDirectory .python
- name: Install Python (aarch64)
run: nuget install pythonarm64 -OutputDirectory .python
- name: Install Python build dependencies
run: python -m pip install ruff
- name: Build CPython wheel (x86_64)
Expand All @@ -190,9 +188,9 @@ jobs:
- name: Build CPython wheel (i686)
run: maturin build --release --out dist --interpreter "$(get-item .python\pythonx86*\tools\python.exe)" --target i686-pc-windows-msvc
- name: Build CPython wheel (aarch64)
run: |
$env:PYO3_CROSS_LIB_DIR = "$(get-item .python\pythonarm64*\tools\libs)"
maturin build --release --out dist --target aarch64-pc-windows-msvc
run: maturin build --release --out dist --target aarch64-pc-windows-msvc
env:
PYO3_CROSS: 1
- name: Test
run: |
python -m venv .venv-cp
Expand Down
25 changes: 25 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 6 additions & 1 deletion crates/oxidd-ffi-python/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,12 @@ oxidd-core = { workspace = true }
oxidd-dump = { workspace = true, features = ["dddmp", "dot"] }
oxidd = { workspace = true, features = ["bdd", "bcdd", "zbdd"] }

pyo3 = { version = "0.23.1", features = ["extension-module", "abi3-py39", "num-bigint"] }
pyo3 = { version = "0.23.1", features = [
"extension-module",
"abi3-py39",
"num-bigint",
"generate-import-lib",
] }

# big integers
num-bigint = "0.4"
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ test = ["pytest >= 8.0"]


[build-system]
requires = ["maturin ~= 1.7.4"]
requires = ["maturin ~= 1.8.0"]
build-backend = "maturin"

[tool.maturin]
Expand Down

0 comments on commit 270d8d0

Please sign in to comment.