Scarab  v2.9.1
Project 8 C++ Utility Library
__main__.py
Go to the documentation of this file.
1 from __future__ import print_function
2 
3 import argparse
4 import sys
5 import sysconfig
6 
7 from . import get_include
8 
9 
11  dirs = [sysconfig.get_path('include'),
12  sysconfig.get_path('platinclude'),
13  get_include(),
14  get_include(True)]
15 
16  # Make unique but preserve order
17  unique_dirs = []
18  for d in dirs:
19  if d not in unique_dirs:
20  unique_dirs.append(d)
21 
22  print(' '.join('-I' + d for d in unique_dirs))
23 
24 
25 def main():
26  parser = argparse.ArgumentParser(prog='python -m pybind11')
27  parser.add_argument('--includes', action='store_true',
28  help='Include flags for both pybind11 and Python headers.')
29  args = parser.parse_args()
30  if not sys.argv[1:]:
31  parser.print_help()
32  if args.includes:
34 
35 
36 if __name__ == '__main__':
37  main()
def print_includes()
Definition: __main__.py:10
def get_include(user=False)
void print(Args &&...args)
Definition: pybind11.h:1849
std::string join(const T &v, std::string delim=",")
Simple function to join a string.
Definition: CLI11.hpp:277