Skip to content

Commit

Permalink
fix: quote paths from pybind11-config
Browse files Browse the repository at this point in the history
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
  • Loading branch information
henryiii committed Aug 13, 2024
1 parent 1a0ff40 commit b4f8e4e
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions pybind11/__main__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# pylint: disable=missing-function-docstring

import argparse
import shlex
import sys
import sysconfig

Expand All @@ -21,7 +22,7 @@ def print_includes() -> None:
if d and d not in unique_dirs:
unique_dirs.append(d)

print(" ".join("-I" + d for d in unique_dirs))
print(" ".join(shlex.quote(f"-I{d}") for d in unique_dirs))


def main() -> None:
Expand Down Expand Up @@ -53,9 +54,9 @@ def main() -> None:
if args.includes:
print_includes()
if args.cmakedir:
print(get_cmake_dir())
print(shlex.quote(get_cmake_dir()))
if args.pkgconfigdir:
print(get_pkgconfig_dir())
print(shlex.quote(get_pkgconfig_dir()))


if __name__ == "__main__":
Expand Down

0 comments on commit b4f8e4e

Please sign in to comment.