We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
python -m pybind11 --includes
1 parent 34b7b54 commit 6b442ffCopy full SHA for 6b442ff
pybind11/__main__.py
@@ -0,0 +1,31 @@
1
+from __future__ import print_function
2
+
3
+import argparse
4
+import sys
5
+import sysconfig
6
7
+from . import get_include
8
9
10
+def print_includes():
11
+ dirs = [sysconfig.get_path('include')]
12
+ if sysconfig.get_path('platinclude') not in dirs:
13
+ dirs.append(sysconfig.get_path('platinclude'))
14
+ if get_include() not in dirs:
15
+ dirs.append(get_include())
16
+ print(' '.join('-I' + d for d in dirs))
17
18
19
+def main():
20
+ parser = argparse.ArgumentParser(prog='python -m pybind11')
21
+ parser.add_argument('--includes', action='store_true',
22
+ help='Include flags for both pybind11 and Python headers.')
23
+ args = parser.parse_args()
24
+ if not sys.argv[1:]:
25
+ parser.print_help()
26
+ if args.includes:
27
+ print_includes()
28
29
30
+if __name__ == '__main__':
31
+ main()
0 commit comments