Skip to content

Conversation

@henryiii
Copy link
Collaborator

@henryiii henryiii commented Oct 19, 2022

Description

This can be used by tools (like scikit-build-core) to access the cmake modules directory. Suggested use:

module_dirs = importlib.metadata.entry_points(group="cmake.modules")
dirs = (importlib.resources.files(ep.load()) for ep in module_dirs)
paths_str = ";".join(str(p) for p in dirs)
cmake_arg = f"-DCMAKE_PREFIX_PATH={paths_str}"

Suggested changelog entry:

* Experimental support for ``cmake.modules`` entrypoint.

@henryiii henryiii force-pushed the henryiii/feat/entrypoint branch 2 times, most recently from cbcd269 to adeea8f Compare October 19, 2022 21:13
@henryiii henryiii force-pushed the henryiii/feat/entrypoint branch from 5177f73 to 7893bab Compare October 20, 2022 13:56
@henryiii henryiii merged commit 1d4a65e into pybind:master Oct 20, 2022
@henryiii henryiii deleted the henryiii/feat/entrypoint branch October 20, 2022 14:35
@henryiii henryiii added the needs changelog Possibly needs a changelog entry label Oct 20, 2022
henryiii added a commit to henryiii/pybind11 that referenced this pull request Oct 20, 2022
Signed-off-by: Henry Schreiner <[email protected]>

Signed-off-by: Henry Schreiner <[email protected]>
@henryiii henryiii removed the needs changelog Possibly needs a changelog entry label Oct 20, 2022
henryiii added a commit that referenced this pull request Oct 21, 2022
henryiii added a commit that referenced this pull request Oct 21, 2022
* Revert "feat: add entrypoint for cmake modules dir (#4258)"

This reverts commit 1d4a65e.

* docs: revert changelog mention too
henryiii added a commit to henryiii/pybind11 that referenced this pull request Oct 21, 2022
* Revert "feat: add entrypoint for cmake modules dir (pybind#4258)"

This reverts commit 1d4a65e.

* docs: revert changelog mention too
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants