Skip to content

Commit cda9cec

Browse files
committed
fix: Setting target arch for Linux/Windows to skylake
1 parent aa460de commit cda9cec

File tree

5 files changed

+17
-15
lines changed

5 files changed

+17
-15
lines changed

.github/workflows/publish_to_pypi.yml

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ permissions:
3131

3232
# Make sure CI fails on all warnings, including Clippy lints
3333
env:
34-
RUSTFLAGS: "-Dwarnings -Ctarget-cpu=native"
3534
POETRY_VERSION: 1.8.4
35+
TARGET_CPU: skylake
3636

3737
jobs:
3838
linux_tests:
@@ -74,10 +74,11 @@ jobs:
7474
uses: PyO3/maturin-action@v1
7575
with:
7676
target: ${{ matrix.target }}
77-
7877
args: --release --out dist --find-interpreter
7978
sccache: 'true'
8079
manylinux: auto
80+
env:
81+
RUSTFLAGS: "-Dwarnings -Ctarget-cpu=${{ env.TARGET_CPU }}"
8182

8283
- name: Upload wheels
8384
uses: actions/upload-artifact@v4
@@ -101,12 +102,11 @@ jobs:
101102
- name: Build wheels
102103
uses: PyO3/maturin-action@v1
103104
with:
104-
105105
target: ${{ matrix.target }}
106-
107106
args: --release --out dist --find-interpreter
108107
sccache: 'true'
109-
108+
env:
109+
RUSTFLAGS: "-Dwarnings -Ctarget-cpu=${{ env.TARGET_CPU }}"
110110
- name: Upload wheels
111111
uses: actions/upload-artifact@v4
112112
with:
@@ -118,6 +118,11 @@ jobs:
118118
strategy:
119119
matrix:
120120
target: [x86_64, aarch64]
121+
include:
122+
- target: x86_64
123+
apple_cpu_target: "skylake"
124+
- target: aarch64
125+
apple_cpu_target: "apple-m1"
121126
steps:
122127
- uses: actions/checkout@v3
123128
- uses: actions/setup-python@v4
@@ -137,8 +142,8 @@ jobs:
137142
with:
138143
name: wheels-macos-${{ matrix.target }}
139144
path: dist
140-
env:
141-
RUSTFLAGS: "-Clink-arg=-undefined -Clink-arg=dynamic_lookup"
145+
env:
146+
RUSTFLAGS: "-Dwarnings -Clink-arg=-undefined -Clink-arg=dynamic_lookup -Ctarget-cpu=${{ matrix.apple_cpu_target }}"
142147

143148
sdist:
144149
runs-on: ubuntu-latest

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "polars_bio"
3-
version = "0.5.2"
3+
version = "0.5.3"
44
edition = "2021"
55

66
[lib]

docs/quickstart.md

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,15 @@
33
pip install polars-bio
44
```
55
There are binary versions for Linux (x86_64), MacOS (x86_64 and arm64) and Windows (x86_64).
6-
!!! Note
7-
In case of Xeon processors, you are advised to build the package from source to avoid `Illegal instruction (core dumped)` errors.
8-
96
In case of other platforms (or errors indicating incompatibilites between Python's ABI), it is fairly easy to build polars-bio from source with [maturin](https://github.com/PyO3/maturin):
107
```shell
118
RUSTFLAGS="-Ctarget-cpu=native" maturin build --release -m Cargo.toml
129
```
1310
and you should see the following output:
1411
```shell
15-
Compiling polars_bio v0.2.11 (/Users/mwiewior/research/git/polars-bio)
12+
Compiling polars_bio v0.5.2 (/Users/mwiewior/research/git/polars-bio)
1613
Finished `release` profile [optimized] target(s) in 1m 25s
17-
📦 Built wheel for abi3 Python ≥ 3.8 to /Users/mwiewior/research/git/polars-bio/target/wheels/polars_bio-0.2.11-cp38-abi3-macosx_11_0_arm64.whl
14+
📦 Built wheel for abi3 Python ≥ 3.8 to /Users/mwiewior/research/git/polars-bio/target/wheels/polars_bio-0.5.2-cp38-abi3-macosx_11_0_arm64.whl
1815
```
1916
and finally install the package with pip:
2017
```bash

polars_bio/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
POLARS_BIO_MAX_THREADS = "datafusion.execution.target_partitions"
1717

1818

19-
__version__ = "0.5.2"
19+
__version__ = "0.5.3"
2020
__all__ = [
2121
"overlap",
2222
"nearest",

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "maturin"
44

55
[project]
66
name = "polars-bio"
7-
version = "0.5.2"
7+
version = "0.5.3"
88
description = "Blazing fast genomic operations on large Python dataframes"
99
authors = []
1010
requires-python = ">=3.9"

0 commit comments

Comments
 (0)