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:
Dustin Spicuzza
2025-03-06 14:21:24 -05:00
committed by GitHub
parent 79be5c8316
commit ded70fe605
3 changed files with 11 additions and 1 deletions

View File

@@ -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})