Skip to content

Commit

Permalink
Build MacOS ARM wheels
Browse files Browse the repository at this point in the history
Note that we have to copy lots of code because it seems like toml files
do now allow to share flow any other way.
  • Loading branch information
achaikou committed Oct 27, 2023
1 parent 1c47d68 commit 3154db8
Show file tree
Hide file tree
Showing 3 changed files with 73 additions and 8 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/wheels.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ jobs:
arch: i686
- os: macos-11
arch: x86_64
- os: macos-13-xlarge
arch: arm64

steps:
- name: Disable autocrlf
Expand Down
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,14 +47,14 @@ pip install dlisio
```


| | macOS Intel | Windows 64bit | Windows 32bit | manylinux x86_64 | manylinux aarch64 | manylinux i686 | musllinux x86_64
|---------------|----|-----|-----|----|----|----|----|
| CPython 3.7 || ||||||
| CPython 3.8 ||||||||
| CPython 3.9 ||||||||
| CPython 3.10 ||||||||
| CPython 3.11 ||||||||
| CPython 3.12 ||||||||
| | macOS Intel | macOS ARM | Windows 64bit | Windows 32bit | manylinux x86_64 | manylinux aarch64 | manylinux i686 | musllinux x86_64
|---------------|----|-----|-----|----|----|----|----|----|
| CPython 3.7 || - | | |||||
| CPython 3.8 |||||||||
| CPython 3.9 |||||||||
| CPython 3.10 |||||||||
| CPython 3.11 |||||||||
| CPython 3.12 |||||||||

See [Build dlisio](#Build-dlisio) for building dlisio from source.

Expand Down
63 changes: 63 additions & 0 deletions python/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -114,3 +114,66 @@ before-build= [

[tool.cibuildwheel.macos]
environment = { CXXFLAGS="-L/usr/local/lib" }

before-all = [
"""curl \
-L https://github.com/fmtlib/fmt/archive/refs/tags/7.1.3.tar.gz \
-o fmt-7.1.3.tar.gz \
""",
"tar xf fmt-7.1.3.tar.gz",
"""cmake \
-S fmt-7.1.3 \
-B fmt-7.1.3/build \
-DFMT_TEST=OFF \
-DFMT_DOC=OFF \
""",
"""sudo cmake \
--build fmt-7.1.3/build \
--target install \
--config Release \
""",
"""git clone https://github.com/equinor/layered-file-protocols.git""",
"""cmake \
-S layered-file-protocols \
-B layered-file-protocols/build \
-DCMAKE_POSITION_INDEPENDENT_CODE=ON \
-DLFP_FMT_HEADER_ONLY=ON \
-DBUILD_TESTING=OFF \
""",
"""sudo cmake \
--build layered-file-protocols/build \
--target install \
--config Release \
""",
"""curl \
-L https://github.com/mpark/variant/archive/refs/tags/v1.4.0.tar.gz \
-o variant-1.4.0.tar.gz \
""",
"tar xf variant-1.4.0.tar.gz",
"""cmake \
-S variant-1.4.0 \
-B variant-1.4.0/build \
""",
"""sudo cmake \
--build variant-1.4.0/build \
--target install \
--config Release \
""",
]

before-build = [
"""cmake \
-S . \
-B build \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_POSITION_INDEPENDENT_CODE=ON \
-DBUILD_TESTING=OFF \
-DBUILD_PYTHON=OFF \
""",
"""sudo cmake \
--build build \
--parallel \
--target install \
--config Release \
""",
]

0 comments on commit 3154db8

Please sign in to comment.