Skip to content

Commit d225b29

Browse files
authored
Tell cibuildwheel to consider Scientific Python wheels (#1021)
On some OS + Python version combinations, binary wheels of NumPy and/or Pandas are not available, and qsim builds take extra long. Based on a tip described in the cibuildwheel documentation at https://cibuildwheel.pypa.io/en/stable/faq/#building-with-numpy, it can help to configure cibuildwheel such that it tells pip to look for binary wheels in additional locations such as pypi.anaconda.org.
1 parent b69cd97 commit d225b29

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

pyproject.toml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,14 @@ pytest -n auto -s -v {package}/qsimcirq_tests/qsimcirq_test.py &&
135135
mv /tmp/qsimcirq {package}
136136
"""
137137

138+
[[tool.cibuildwheel.overrides]]
139+
# Help increase the chances that pip will find binary wheels for NumPy.
140+
# See https://cibuildwheel.pypa.io/en/stable/faq/#building-with-numpy
141+
select = ["cp314*"]
142+
inherit.environment = "append"
143+
environment.PIP_EXTRA_INDEX_URL = "https://pypi.anaconda.org/scientific-python-nightly-wheels/simple/"
144+
environment.PIP_PRERELEASE = "allow"
145+
138146
[tool.cibuildwheel.macos]
139147
before-build = """
140148
brew install -q libomp llvm@19 &&

0 commit comments

Comments
 (0)