Skip to content

Commit fabbf26

Browse files
committed
Add numpy to build requirements for PEP 517 build isolation
The C++ extension includes pybind11/numpy.h which requires numpy headers during compilation. Previously numpy was only listed as a runtime dependency, causing isolated builds (pip install ., cibuildwheel) to fail with: fatal error: numpy/arrayobject.h: No such file or directory This adds numpy>=1.16 to [build-system].requires to ensure it's available in the build environment before compilation begins. Fixes: Build failures in isolated environments Required for: Proper PEP 517 compliance and cibuildwheel support
1 parent 0af8870 commit fabbf26

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[build-system]
2-
requires = ["setuptools>=61.0", "wheel", "cmake>=3.22", "pybind11>=2.9.0"]
2+
requires = ["setuptools>=61.0", "wheel", "cmake>=3.22", "pybind11>=2.9.0", "numpy>=1.16"]
33
build-backend = "setuptools.build_meta"
44

55
[project]

0 commit comments

Comments
 (0)