wrap
pybind11
pybind11
__main__.py
Go to the documentation of this file.
1
# pylint: disable=missing-function-docstring
2
3
import
argparse
4
import
sys
5
import
sysconfig
6
7
from
.commands
import
get_cmake_dir, get_include
8
9
10
def
print_includes
() -> None:
11
dirs = [
12
sysconfig.get_path(
"include"
),
13
sysconfig.get_path(
"platinclude"
),
14
get_include
(),
15
]
16
17
# Make unique but preserve order
18
unique_dirs = []
19
for
d
in
dirs:
20
if
d
and
d
not
in
unique_dirs:
21
unique_dirs.append(d)
22
23
print
(
" "
.join(
"-I"
+ d
for
d
in
unique_dirs))
24
25
26
def
main
() -> None:
27
28
parser = argparse.ArgumentParser()
29
parser.add_argument(
30
"--includes"
,
31
action=
"store_true"
,
32
help=
"Include flags for both pybind11 and Python headers."
,
33
)
34
parser.add_argument(
35
"--cmakedir"
,
36
action=
"store_true"
,
37
help=
"Print the CMake module directory, ideal for setting -Dpybind11_ROOT in CMake."
,
38
)
39
args = parser.parse_args()
40
if
not
sys.argv[1:]:
41
parser.print_help()
42
if
args.includes:
43
print_includes
()
44
if
args.cmakedir:
45
print
(
get_cmake_dir
())
46
47
48
if
__name__ ==
"__main__"
:
49
main
()
pybind11.__main__.print_includes
def print_includes()
Definition:
__main__.py:10
Eigen::internal::print
EIGEN_STRONG_INLINE Packet4f print(const Packet4f &a)
Definition:
NEON/PacketMath.h:3115
pybind11.__main__.main
def main()
Definition:
__main__.py:26
pybind11.commands.get_include
def get_include
Definition:
commands.py:6
pybind11.commands.get_cmake_dir
def get_cmake_dir()
Definition:
commands.py:16
gtsam
Author(s):
autogenerated on Tue Jul 4 2023 02:33:53