Skip to content

feat: add entrypoint for cmake modules dir #4258

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Merged
merged 1 commit into from
Oct 20, 2022

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
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
@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 <henryschreineriii@gmail.com>

Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
@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
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants