mirror of
https://github.com/pybind/pybind11.git
synced 2026-03-14 20:27:47 +00:00
Add pkgconf-pypi entrypoint (#5552)
- This allows `pkgconf --cflags pybind11` and similar commands to work as expected if pkgconf is installed from pypi
This commit is contained in:
4
setup.py
4
setup.py
@@ -144,6 +144,10 @@ with remove_output("pybind11/include", "pybind11/share"):
|
||||
stderr=sys.stderr,
|
||||
)
|
||||
|
||||
# pkgconf-pypi needs pybind11/share/pkgconfig to be importable
|
||||
Path("pybind11/share/__init__.py").touch()
|
||||
Path("pybind11/share/pkgconfig/__init__.py").touch()
|
||||
|
||||
txt = get_and_replace(setup_py, version=version, extra_cmd=extra_cmd)
|
||||
code = compile(txt, setup_py, "exec")
|
||||
exec(code, {"SDist": SDist})
|
||||
|
||||
@@ -106,6 +106,8 @@ py_files = {
|
||||
"commands.py",
|
||||
"py.typed",
|
||||
"setup_helpers.py",
|
||||
"share/__init__.py",
|
||||
"share/pkgconfig/__init__.py",
|
||||
}
|
||||
|
||||
headers = main_headers | conduit_headers | detail_headers | eigen_headers | stl_headers
|
||||
|
||||
@@ -18,6 +18,7 @@ setup(
|
||||
"pybind11.include.pybind11.detail",
|
||||
"pybind11.include.pybind11.eigen",
|
||||
"pybind11.include.pybind11.stl",
|
||||
"pybind11.share",
|
||||
"pybind11.share.cmake.pybind11",
|
||||
"pybind11.share.pkgconfig",
|
||||
],
|
||||
@@ -40,7 +41,10 @@ setup(
|
||||
],
|
||||
"pipx.run": [
|
||||
"pybind11 = pybind11.__main__:main",
|
||||
]
|
||||
],
|
||||
"pkg_config": [
|
||||
"pybind11 = pybind11.share.pkgconfig",
|
||||
],
|
||||
},
|
||||
cmdclass=cmdclass
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user