Skip to content

Commit d0aa055

Browse files
committed
Apply the correct fix with PIP_CONSTRAINTS
1 parent e78db20 commit d0aa055

1 file changed

Lines changed: 9 additions & 4 deletions

File tree

pyproject.toml

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,11 +49,14 @@ archs = ["native"]
4949
# Pass LLVM_VERSION from the host environment to cibuildwheel.
5050
environment-pass = ["LLVM_VERSION"]
5151
# We use miniconda3 to get the clang/llvm toolchain on Linux.
52-
before-build = ["rm -rf build dist src/*.egg-info"]
52+
before-build = [
53+
"rm -rf build dist src/*.egg-info",
54+
# llvmlite needs setuptools < 82 to build from source, if needed. Create a
55+
# constraints file used by PIP_CONSTRAINT to enforce this in isolated
56+
# builds.
57+
"echo 'setuptools<82' > /tmp/constraints.txt",
58+
]
5359
skip = ["*-musllinux_*", "cp38-*"]
54-
# llvmlite needs setuptools < 82, and we may need to build from source, so we
55-
# ensure that setuptools is in the correct version range.
56-
test-requires = ["setuptools>=75.3,<82"]
5760
test-command = [
5861
# Run host OpenMP tests.
5962
"TEST_DEVICES=0 RUN_TARGET=0 python -m numba.runtests -v -- numba.openmp.tests.test_openmp",
@@ -64,6 +67,8 @@ test-command = [
6467
[tool.cibuildwheel.environment]
6568
USE_CXX11_ABI = "1"
6669
PIP_NO_INPUT = "1"
70+
# Enforce setuptools version even in isolated builds for llvmlite compatibility.
71+
PIP_CONSTRAINT = "/tmp/constraints.txt"
6772

6873
[tool.cibuildwheel.linux]
6974
before-all = [

0 commit comments

Comments
 (0)