Skip to content

Commit adb2b3d

Browse files
authored
Merge pull request #41 from HiDiHlabs/dev
Switch to ABI3 builds
2 parents 6b9bad6 + 8a6259e commit adb2b3d

3 files changed

Lines changed: 8 additions & 4 deletions

File tree

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ num = { version = "0.4.1" }
1818
numpy = { version = "0.27" }
1919
polars = { version = "0.53", features = ["partition_by", "dtype-categorical"] }
2020
polars-arrow = { version = "0.53" }
21-
pyo3 = { version = "0.27", features = ["extension-module"] }
21+
pyo3 = { version = "0.27", features = ["extension-module", "abi3"] }
2222
pyo3-polars = { version = "0.26", features = ["dtype-categorical"] }
2323
rayon = { version = "1.8" }
2424
sprs = { version = "0.11.4", features = ["serde"] }

pyproject.toml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,8 @@ include = ["sainsc", "sainsc.io", "sainsc.lazykde", "sainsc.utils"]
6868
[tool.setuptools_scm]
6969

7070
[[tool.setuptools-rust.ext-modules]]
71-
target = "sainsc._utils_rust"
71+
target = "sainsc._utils_rust"
72+
py_limited_api = true
7273

7374

7475
[tool.ruff]
@@ -95,10 +96,10 @@ ignore-words-list = "coo,crate"
9596

9697
[tool.cibuildwheel]
9798
archs = 'auto64'
98-
# build = 'cp310-*'
99+
build = 'cp311-*' # only build minimum python version because we use ABI3 builds
99100
skip = "pp*" # skip PyPy
100101

101102
[tool.cibuildwheel.linux]
102103
# cibuildwheel runs linux in containers so we need to install rust there
103-
before-all = "curl -sSf https://sh.rustup.rs | sh -s -- -y"
104+
before-all = "curl -sSf https://sh.rustup.rs | sh -s -- -y"
104105
environment = { PATH = "$PATH:$HOME/.cargo/bin" }

setup.cfg

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[bdist_wheel]
2+
# replace with minimum Python version (used for ABI3)
3+
py_limited_api = cp311

0 commit comments

Comments
 (0)