μHAL (v2.8.19)
Part of the IPbus software repository
Loading...
Searching...
No Matches
python
pybind11-python2
pybind11
__main__.py
Go to the documentation of this file.
1
# -*- coding: utf-8 -*-
2
from
__future__
import
print_function
3
4
import
argparse
5
import
sys
6
import
sysconfig
7
8
from
.commands
import
get_cmake_dir, get_include
9
10
11
def
print_includes
():
12
# type: () -> None
13
dirs = [
14
sysconfig.get_path(
"include"
),
15
sysconfig.get_path(
"platinclude"
),
16
get_include(),
17
]
18
19
# Make unique but preserve order
20
unique_dirs = []
21
for
d
in
dirs:
22
if
d
and
d
not
in
unique_dirs:
23
unique_dirs.append(d)
24
25
print(
" "
.join(
"-I"
+ d
for
d
in
unique_dirs))
26
27
28
def
main
():
29
# type: () -> None
30
31
parser = argparse.ArgumentParser()
32
parser.add_argument(
33
"--includes"
,
34
action=
"store_true"
,
35
help=
"Include flags for both pybind11 and Python headers."
,
36
)
37
parser.add_argument(
38
"--cmakedir"
,
39
action=
"store_true"
,
40
help=
"Print the CMake module directory, ideal for setting -Dpybind11_ROOT in CMake."
,
41
)
42
args = parser.parse_args()
43
if
not
sys.argv[1:]:
44
parser.print_help()
45
if
args.includes:
46
print_includes
()
47
if
args.cmakedir:
48
print(get_cmake_dir())
49
50
51
if
__name__ ==
"__main__"
:
52
main
()
pybind11.__main__.main
def main()
Definition:
__main__.py:28
pybind11.__main__.print_includes
def print_includes()
Definition:
__main__.py:11
Generated on Tue Aug 12 2025 00:01:02 for μHAL (v2.8.19) by
1.9.5