Skip to content

Commit cbcd269

Browse files
committed
feat: add entrypoint for cmake modules dir
Signed-off-by: Henry Schreiner <[email protected]>
1 parent fab1eeb commit cbcd269

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

setup.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,7 @@ def remove_output(*sources: str) -> Iterator[None]:
144144
stdout=sys.stdout,
145145
stderr=sys.stderr,
146146
)
147+
Path("pybind11/share/cmake/pybind11/__init__.py").touch()
147148

148149
txt = get_and_replace(setup_py, version=version, extra_cmd=extra_cmd)
149150
code = compile(txt, setup_py, "exec")

tools/setup_main.py.in

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,9 @@ setup(
3838
],
3939
"pipx.run": [
4040
"pybind11 = pybind11.__main__:main",
41+
],
42+
"cmake.modules": [
43+
"pybind11 = pybind11.share.cmake.pybind11",
4144
]
4245
},
4346
cmdclass=cmdclass

0 commit comments

Comments
 (0)