Skip to content

Commit

Permalink
feat: add entrypoint for cmake modules dir
Browse files Browse the repository at this point in the history
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
  • Loading branch information
henryiii committed Oct 19, 2022
1 parent fab1eeb commit adeea8f
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,7 @@ def remove_output(*sources: str) -> Iterator[None]:
stdout=sys.stdout,
stderr=sys.stderr,
)
Path("pybind11/share/cmake/pybind11/__init__.py").touch()

txt = get_and_replace(setup_py, version=version, extra_cmd=extra_cmd)
code = compile(txt, setup_py, "exec")
Expand Down
1 change: 1 addition & 0 deletions tests/extra_python_package/test_files.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@
}

cmake_files = {
"share/cmake/pybind11/__init__.py",
"share/cmake/pybind11/FindPythonLibsNew.cmake",
"share/cmake/pybind11/pybind11Common.cmake",
"share/cmake/pybind11/pybind11Config.cmake",
Expand Down
3 changes: 3 additions & 0 deletions tools/setup_main.py.in
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ setup(
],
"pipx.run": [
"pybind11 = pybind11.__main__:main",
],
"cmake.modules": [
"pybind11 = pybind11.share.cmake.pybind11",
]
},
cmdclass=cmdclass
Expand Down

0 comments on commit adeea8f

Please sign in to comment.