Skip to content

Commit bb792ec

Browse files
committed
Add numpy test dependency where possible
1 parent 9f1c0ee commit bb792ec

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

pyproject.toml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ skip = "*-musllinux_*"
7474

7575
environment = { SDL_VIDEODRIVER="dummy", SDL_AUDIODRIVER="disk" }
7676
test-command = "python -m pygame.tests -v --exclude opengl,music,timing --time_out 300"
77+
test-requires = ["numpy"]
7778

7879
[tool.cibuildwheel.config-settings]
7980
setup-args = [
@@ -91,3 +92,17 @@ exclude = [
9192

9293
[tool.ruff.format]
9394
quote-style = "preserve"
95+
96+
# numpy is a test dependency, but we build for systems that numpy doesn't have
97+
# binary wheels for. In such cases, we do not want to waste CI time building
98+
# numpy from source. So, we are gonna force numpy to be "only-binary" and skip
99+
# numpy on platforms that it doesn't have wheels for
100+
[tool.uv.pip]
101+
only-binary = ["numpy"]
102+
103+
# 1. skip all 32-bit manylinux (i686)
104+
# 2. skip all pypy+arm combinations
105+
# 3. skip all pypy 310 because it is so new numpy does not have wheels for it
106+
[[tool.cibuildwheel.overrides]]
107+
select = "{*-manylinux_i686,pp*-*{arm64,aarch64},pp310-*}"
108+
test-requires = []

0 commit comments

Comments
 (0)