Open hzhangxyz opened 7 months ago
Is there any body know how to install pybind11 when checking format in precommit?
Yes, you can add it to the .pre-commit-config.yaml file. See https://learn.scientific-python.org/development/guides/style/#type-checking.
On the pyproject.tmol, this is shown in the scikit_build_core example, and new projects should really be using that instead, and having different mechanisms broadens the overall scope of the examples. Though I think it does make sense here, so I'd still be in favor. Can see if any other maintainers have opinions.
Since we can specify setup dependencies in pyproject.toml, pybind11 could be added here instead of placed directly under the root of the repo, which make the repo structure more compact. And the path of pybind11 cmake config could be set by pybind11_DIR in setup.py.