__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_include, get_cmake_dir
9 
10 
12  dirs = [
13  sysconfig.get_path("include"),
14  sysconfig.get_path("platinclude"),
15  get_include(),
16  ]
17 
18  # Make unique but preserve order
19  unique_dirs = []
20  for d in dirs:
21  if d not in unique_dirs:
22  unique_dirs.append(d)
23 
24  print(" ".join("-I" + d for d in unique_dirs))
25 
26 
27 def main():
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:
44  if args.cmakedir:
46 
47 
48 if __name__ == "__main__":
49  main()
void print(const Matrix &A, const string &s, ostream &stream)
Definition: Matrix.cpp:155
def print_includes()
Definition: __main__.py:11
def get_cmake_dir()
Definition: commands.py:14
def get_include(user=False)
Definition: commands.py:8


gtsam
Author(s):
autogenerated on Sat May 8 2021 02:41:36