pybind / cmake_example

Example pybind11 module built with a CMake-based build system
Other
606 stars 215 forks source link

Move pybind11 from submodule to pyproject.toml:build-system.requires. #171

Open hzhangxyz opened 7 months ago

hzhangxyz commented 7 months ago

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.

hzhangxyz commented 7 months ago

Is there any body know how to install pybind11 when checking format in precommit?

henryiii commented 7 months ago

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.