commands.py
Go to the documentation of this file.
1 import os
2 
3 DIR = os.path.abspath(os.path.dirname(__file__))
4 
5 
6 def get_include(user: bool = False) -> str: # pylint: disable=unused-argument
7  """
8  Return the path to the pybind11 include directory. The historical "user"
9  argument is unused, and may be removed.
10  """
11  installed_path = os.path.join(DIR, "include")
12  source_path = os.path.join(os.path.dirname(DIR), "include")
13  return installed_path if os.path.exists(installed_path) else source_path
14 
15 
16 def get_cmake_dir() -> str:
17  """
18  Return the path to the pybind11 CMake module directory.
19  """
20  cmake_installed_path = os.path.join(DIR, "share", "cmake", "pybind11")
21  if os.path.exists(cmake_installed_path):
22  return cmake_installed_path
23 
24  msg = "pybind11 not installed, installation required to access the CMake files"
25  raise ImportError(msg)
def get_cmake_dir()
Definition: commands.py:16


gtsam
Author(s):
autogenerated on Tue Jul 4 2023 02:34:02