Skip to content

Commit

Permalink
cibuildwheel: move config to pyproject.toml
Browse files Browse the repository at this point in the history
  • Loading branch information
NathanDunfield committed Jan 14, 2025
1 parent 3cc9e68 commit 7064227
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 23 deletions.
22 changes: 1 addition & 21 deletions .github/workflows/wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,27 +15,7 @@ jobs:
- uses: actions/checkout@v4

- name: Build wheels
uses: pypa/cibuildwheel@v2.19.2
env:
# Skip Python 32 bit Linux, and PyPy
CIBW_ENVIRONMENT: SNAPPY_ALWAYS_BUILD_CYOPENGL=True
CIBW_ENVIRONMENT_MACOS: >
SNAPPY_ALWAYS_BUILD_CYOPENGL=True
MACOSX_DEPLOYMENT_TARGET=10.12
CIBW_BUILD: "cp38-* cp39-* cp310-* cp311-* cp312-*"
CIBW_SKIP: "*-manylinux_i686 *musllinux* pp*"
CIBW_BEFORE_ALL_LINUX: yum install -y tk
CIBW_BEFORE_BUILD: >
pip install cython
CIBW_BEFORE_TEST: >
pip install low_index &&
pip install --pre --extra-index-url https://test.pypi.org/simple cypari &&
pip install git+https://github.com/3-manifolds/PLink &&
pip install git+https://github.com/3-manifolds/snappy_manifolds &&
pip install git+https://github.com/3-manifolds/Spherogram
CIBW_REPAIR_WHEEL_COMMAND_LINUX: auditwheel repair --strip -w {dest_dir} {wheel}
CIBW_TEST_COMMAND: python -m snappy.test --skip-gui

uses: pypa/cibuildwheel@v2.22

- uses: actions/upload-artifact@v4
with:
Expand Down
25 changes: 23 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,27 @@
requires = ["setuptools", "wheel", "cython"]

[tool.cibuildwheel]
build = "cp312-macosx_*"
test-command = "python -m snappy.test"
build = "cp38* cp39* cp310* cp311* cp312* cp313*"
skip = "*musllinux*"
test-command = "python -m snappy.test --skip-gui"
environment = { SNAPPY_ALWAYS_BUILD_CYOPENGL="True" }
before-test = [
"pip install low_index",
"pip install --pre --extra-index-url https://test.pypi.org/simple cypari",
"pip install git+https://github.com/3-manifolds/PLink",
"pip install git+https://github.com/3-manifolds/snappy_manifolds",
"pip install git+https://github.com/3-manifolds/Spherogram"
]

[tool.cibuildwheel.macos]
archs = "auto"
environment = { SNAPPY_ALWAYS_BUILD_CYOPENGL="True", MACOSX_DEPLOYMENT_TARGET="10.12" }

[tool.cibuildwheel.linux]
archs = "native"
before-all = "yum install -y tk"
repair-wheel-command = "auditwheel repair --strip -w {dest_dir} {wheel}"

[tool.cibuildwheel.windows]
archs = "auto"

0 comments on commit 7064227

Please sign in to comment.