Open icanhasmath opened 1 month ago
I tried to push a branch, but this is the proposed fix:
diff --git a/pyproject.toml b/pyproject.toml
index af0470e..6ad5e5a 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -1,7 +1,7 @@
# Package ######################################################################
[build-system]
-requires = ["setuptools", "pybind11"]
+requires = ["setuptools", "pybind11>=2.12.0"]
build-backend = "setuptools.build_meta"
[project]
Hi @icanhasmath, have you tried the main branch?
pip3 install git+https://github.com/metaopt/optree.git
Pip3 install works just fine - there is no problem there.
This case arises building with python3 directly from source, in an isolated environment, with an older version of pybind11.
I think PR #151 resolved this.
Previously, cmake
may look for system pybind11
rather than the one installed inside the virtual environment.
Apologies - I should probably have called this an enhancement rather than a bug. There is nothing wrong with the standard build process - the request here is to clarify the pybind11
specification, purely for accuracy. I'm happy to close this issue if you want to leave it unpinned.
Required prerequisites
What version of OpTree are you using?
0.12.x
System information
Python 3.10, Building from source on Linux x86_64, and Windows amd64.
Problem description
The compilation fails with older versions of pybind11.
Reproducible example code
Standard Compilation from source of Optree 1.12.x with pybind 2.11.x.
Traceback
Expected behavior
Expected that there is a restriction in the pyproject toml to prevent an incompatible selection.
Additional context
You can see my test builds here, I tried a few different combinations to pin down the range: https://platform.activestate.com/ActiveStateBE/optree/releases