[build-system]
requires = ["setuptools", "wheel", "cython"]

[tool.cibuildwheel]
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"
skip = "cp313-win32"
